diff --git a/packages/app/src/hooks/useBondGreatestFee/index.tsx b/packages/app/src/hooks/useBondGreatestFee/index.tsx index 2f6b97cd9f..014c449c4d 100644 --- a/packages/app/src/hooks/useBondGreatestFee/index.tsx +++ b/packages/app/src/hooks/useBondGreatestFee/index.tsx @@ -48,8 +48,10 @@ export const useBondGreatestFee = ({ bondFor }: { bondFor: BondFor }) => { tx = new StakingBondExtra(network, BigInt(bond)).tx(); } - if (tx) { - const { partial_fee } = await tx.getPaymentInfo(activeAccount || ''); + if (tx && activeAccount) { + const partial_fee = + (await tx?.getPaymentInfo(activeAccount))?.partial_fee || 0n; + return new BigNumber(partial_fee.toString()); } return new BigNumber(0); diff --git a/packages/app/src/hooks/useSubmitExtrinsic/index.tsx b/packages/app/src/hooks/useSubmitExtrinsic/index.tsx index aa6ac31eff..2a46c96046 100644 --- a/packages/app/src/hooks/useSubmitExtrinsic/index.tsx +++ b/packages/app/src/hooks/useSubmitExtrinsic/index.tsx @@ -276,8 +276,8 @@ export const useSubmitExtrinsic = ({ if (!tx) { return; } - const fee = (await tx.getPaymentInfo(from)).partial_fee; - TxSubmission.updateFee(uid, fee); + const partial_fee = (await tx?.getPaymentInfo(from)?.partial_fee) || 0n; + TxSubmission.updateFee(uid, partial_fee); }; if (uid > 0) { fetchTxFee();