Protect paymentInfo (#2811)
This commit is contained in:
parent
feba08e668
commit
8e30a8620e
@ -27,9 +27,11 @@ function Checks ({ accountId, className = '', extrinsic }: Props): React.ReactEl
|
||||
|
||||
useEffect((): void => {
|
||||
accountId && extrinsic && isFunction(api.rpc.payment?.queryInfo) &&
|
||||
extrinsic
|
||||
.paymentInfo(accountId)
|
||||
.then(setDispatchInfo);
|
||||
Promise.resolve(
|
||||
extrinsic
|
||||
.paymentInfo(accountId)
|
||||
.then(setDispatchInfo)
|
||||
).catch(console.error);
|
||||
}, [api, accountId, extrinsic]);
|
||||
|
||||
if (!dispatchInfo) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user