Skip to content

Commit

Permalink
handle receive small amounts from dapp
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigoncalves committed Sep 15, 2023
1 parent 578365f commit 048e6ad
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,18 +170,19 @@ export const ReviewTransactionContainer = ({
// get usd values
const tokenUsd = convertToUSD(Number(value), tokenQuote)
const feeUsd = convertToUSD(Number(feeValue), feeQuote)
const smallAmount = !Number(tokenUsd) && !!Number(value)

return {
transaction: {
tokenValue: {
balance: value.toString(),
symbolType: 'icon',
symbol: symbol || feeSymbol,
symbolType: 'icon',
balance: value.toString(),
},
usdValue: {
balance: tokenUsd,
symbol: smallAmount ? '<' : '$',
symbolType: 'usd',
symbol: '$',
balance: smallAmount ? '0.01' : tokenUsd,
},
fee: {
tokenValue: feeValue,
Expand Down

0 comments on commit 048e6ad

Please sign in to comment.