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 27, 2023
1 parent e2815b0 commit abb94e5
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,18 +187,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 abb94e5

Please sign in to comment.