Check for account balance in place of sufficient funds in cosmos gas calculation

This commit is contained in:
pranavjadhav007 2025-07-24 18:28:28 +05:30
parent 96c0a4df06
commit ca4c11893e

View File

@ -548,7 +548,7 @@ const ApproveTransfer = ({ route }: ApproveTransferProps) => {
if (!cosmosStargateClient) {
return;
}
if (!isSufficientFunds) {
if (!balance) {
return;
}
@ -567,13 +567,15 @@ const ApproveTransfer = ({ route }: ApproveTransferProps) => {
if (!(error instanceof Error)) {
throw error;
}
if (window.Android?.onTransferError) {
window.Android.onTransferError(`Not able to estimate gas`);
}
setTxError(error.message);
setIsTxErrorDialogOpen(true);
}
};
getCosmosGas();
}, [cosmosStargateClient, isSufficientFunds, sendMsg, transaction,txMemo]);
}, [cosmosStargateClient, balance, sendMsg, transaction, txMemo]);
useEffect(() => {
if (balance && !isSufficientFunds && !fees) {