Skip to content

Commit

Permalink
fix(swap): btc fee amount displayed in preview swap screen
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLeoB committed Nov 18, 2020
1 parent 1b8e08b commit 272e904
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ class PreviewSwap extends PureComponent<InjectedFormProps<{}, Props> & Props> {
this.props.swapActions.createOrder()
}

networkFee = value => {
return value.coin === 'BTC' || value.coin === 'BCH'
? value.selection.fee
: value.fee
}

render () {
if (
!this.props.initSwapFormValues?.BASE ||
Expand Down Expand Up @@ -168,7 +174,7 @@ class PreviewSwap extends PureComponent<InjectedFormProps<{}, Props> & Props> {
{coinToString({
value: convertBaseToStandard(
BASE.baseCoin,
value ? value.fee : 0
value ? this.networkFee(value) : 0
),
unit: { symbol: coins[BASE.baseCoin].coinTicker }
})}
Expand Down

0 comments on commit 272e904

Please sign in to comment.