Skip to content

Commit

Permalink
minor revert change
Browse files Browse the repository at this point in the history
  • Loading branch information
jscriptcoder committed Jun 6, 2023
1 parent 99fc662 commit 3fd08b0
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions packages/bridge-ui/src/components/BridgeForm/BridgeForm.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -475,15 +475,7 @@
});
const requiredGas = gasEstimate.mul(feeData.gasPrice);
// We might have decimals. BigNumber can't take strings
// with decimals. E.g. BigNumber.from('1.0') will throw an error.
// We can get a BigNumber by parsing, passing the right amount
// of decimals: ethers.utils.parseUnits('1.0', decimals)
const userBalance = ethers.utils.parseUnits(
tokenBalance,
$token.decimals || 18, // defaults to 18 decimals
);
const userBalance = await $signer.getBalance('latest');
// Let's start with substracting the estimated required gas to bridge
let balanceAvailableForTx = userBalance.sub(requiredGas);
Expand Down

0 comments on commit 3fd08b0

Please sign in to comment.