Check for account balance in place of sufficient funds in cosmos gas calculation
This commit is contained in:
parent
96c0a4df06
commit
ca4c11893e
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user