Skip to content

Commit

Permalink
Merge pull request #581 from enkryptcom/fix/sending-nft-fee-calc
Browse files Browse the repository at this point in the history
Fix/sending nft fee calc
  • Loading branch information
gamalielhere authored Jan 9, 2025
2 parents 3564783 + 9002ec6 commit 653361b
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,18 @@ const hasEnoughBalance = computed(() => {
return false;
}
// check if user has enough balance for fees
if (
toBN(
toBase(
gasCostValues.value[selectedFee.value].nativeValue,
props.network.decimals,
),
).gt(toBN(nativeBalance.value))
) {
return false;
}
return toBN(selectedAsset.value.balance ?? '0').gte(
toBN(toBase(sendAmount.value ?? '0', selectedAsset.value.decimals!)),
);
Expand Down

0 comments on commit 653361b

Please sign in to comment.