Skip to content

Commit

Permalink
fix(send): eth and bch correct fees
Browse files Browse the repository at this point in the history
  • Loading branch information
plondon committed Apr 21, 2021
1 parent f97053d commit 8e99378
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export default ({
'DEFAULT'
)
const fee =
response.fees.find(({ symbol }) => symbol === 'BTC')
response.fees.find(({ symbol }) => symbol === 'BCH')
?.minorValue || '0'
payment = yield payment.from(
payloadT.label,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export default ({
'DEFAULT'
)
const fee =
response.fees.find(({ symbol }) => symbol === 'BTC')
response.fees.find(({ symbol }) => symbol === 'ETH')
?.minorValue || '0'
source = fromPayload.label
payment = yield payment.from(
Expand Down
10 changes: 5 additions & 5 deletions packages/blockchain-wallet-v4/src/redux/payment/eth/sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,16 +226,16 @@ export default ({ api }) => {
let account = origin

if (p.from && p.from.type === 'CUSTODIAL') {
const fee = Exchange.convertEtherToEther({
const feeInGwei = Exchange.convertEtherToEther({
value,
fromUnit: 'GWEI',
toUnit: 'WEI'
fromUnit: 'WEI',
toUnit: 'GWEI'
}).value

return makePayment(
mergeRight(p, {
feeInGwei: value,
fee
feeInGwei,
fee: value
})
)
}
Expand Down

0 comments on commit 8e99378

Please sign in to comment.