Skip to content

Commit e704761

Browse files
fix: balance to BigInt convertion no longer crash with big numbers (#1429)
1 parent 54ac335 commit e704761

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/cardano/src/wallet/util/asset-balance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ export const assetBalanceToBigInt = (balanceWithDecimals: string, assetInfo: Ass
2626

2727
if (!decimals) return BigInt(balanceWithDecimals);
2828

29-
return BigInt(new BigNumber(balanceWithDecimals).times(new BigNumber(BASE).pow(decimals)).toString());
29+
return BigInt(new BigNumber(balanceWithDecimals).times(new BigNumber(BASE).pow(decimals)).toFixed(0).toString());
3030
};

0 commit comments

Comments
 (0)