Skip to content

Commit

Permalink
display fiat value for actual total send (#1983)
Browse files Browse the repository at this point in the history
- This fixes an issue where fiat value was displayed for a send
value when it should be for 'send value + txfee' which is the `totalSend`.
  • Loading branch information
ukane-philemon committed Dec 6, 2022
1 parent 4685064 commit 8d11eee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client/webserver/site/src/js/wallets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,10 @@ export default class WalletsPage extends BasePage {
page.vSendDestinationAmt.textContent = Doc.formatFullPrecision(value, ui)
const totalSend = value + txfee
page.vTotalSend.textContent = Doc.formatFullPrecision(totalSend, ui)
this.showFiatValue(assetID, value, page.vTotalSendFiat)
this.showFiatValue(assetID, totalSend, page.vTotalSendFiat)
const bal = wallet.balance.available - totalSend
// handle edge cases where bal is not enough to cover totalSend.
// we don't want a minus display of user bal.
// handle edge cases where bal is not enough to cover totalSend. we don't
// want a minus display of user balance after send.
if (bal <= 0) {
page.balanceAfterSend.textContent = Doc.formatFullPrecision(0, ui)
this.showFiatValue(assetID, 0, page.balanceAfterSendFiat)
Expand Down

0 comments on commit 8d11eee

Please sign in to comment.