Skip to content

Commit

Permalink
Round the bitcoin balance before it goes to BigNumber because BN does…
Browse files Browse the repository at this point in the history
… not support decimals. (#339)
  • Loading branch information
jessgusclark authored Nov 11, 2022
1 parent f6c36bd commit 57a657d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/screens/home/BalanceCardComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const BitcoinCardComponent: React.FC<{
}> = ({ symbol, balance, isSelected, contractAddress, onPress }) => {
const containerStyles = useContainerStyles(isSelected, symbol)
const balanceBigNumber = React.useMemo(
() => BigNumber.from(balance * 10e8),
() => BigNumber.from(Math.round(balance * 10e8)),
[balance],
)
const { state } = useSocketsState()
Expand Down

0 comments on commit 57a657d

Please sign in to comment.