Skip to content

Commit

Permalink
trim USD amount to 2 decimals
Browse files Browse the repository at this point in the history
  • Loading branch information
artursapek committed Sep 23, 2024
1 parent 283ab24 commit a620f65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wormhole-connect/src/hooks/useUSDamountGetter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const useUSDamountGetter = (): ((args: {
const tokenPrice = Number(getTokenPrice(prices, config.tokens[token]));
const USDAmount = tokenPrice * numericAmount;

return isNaN(USDAmount) ? undefined : USDAmount;
return isNaN(USDAmount) ? undefined : parseFloat(USDAmount.toFixed(2));
},
[data],
);
Expand Down

0 comments on commit a620f65

Please sign in to comment.