Skip to content

Commit

Permalink
chore: improve format
Browse files Browse the repository at this point in the history
  • Loading branch information
onmax committed Oct 24, 2024
1 parent 3565cb4 commit d0fbade
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/SwapFeesTooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ class SwapFeesTooltip { // eslint-disable-line no-unused-vars
if (fundTx.type === 'BTC' || redeemTx.type === 'BTC') {
const myFee = fundTx.type === 'BTC'
? fundTx.inputs.reduce((sum, input) => sum + input.witnessUtxo.value, 0)
- fundTx.recipientOutput.value
- (fundTx.changeOutput ? fundTx.changeOutput.value : 0)
- fundTx.recipientOutput.value
- (fundTx.changeOutput ? fundTx.changeOutput.value : 0)
: redeemTx.type === 'BTC'
? redeemTx.input.witnessUtxo.value - redeemTx.output.value
: 0;
Expand Down Expand Up @@ -93,7 +93,9 @@ class SwapFeesTooltip { // eslint-disable-line no-unused-vars
fiatFee,
fiatCurrency,
(myFee + theirFee) / (fundTx.type === 'EUR' || fundTx.type === 'CRC'
? exchangeFromAmount : exchangeToAmount),
? exchangeFromAmount
: exchangeToAmount
),
);
this.$tooltip.appendChild(rows[0]);
this.$tooltip.appendChild(rows[1]);
Expand Down

0 comments on commit d0fbade

Please sign in to comment.