Fix multisig when the proxy pallet is not available (#11435)
* Fix multisig when the proxy pallet is not available * Use isFunction
This commit is contained in:
parent
563181a048
commit
9b0b98ab8c
@ -148,7 +148,8 @@ async function queryForMultisig (api: ApiPromise, requestAddress: string | null,
|
||||
if (isFunction(api.query[multiModule]?.multisigs)) {
|
||||
const address = isProxyActive ? proxyAddress : requestAddress;
|
||||
const { threshold, who } = extractExternal(address);
|
||||
const hash = (address ? api.tx.proxy.proxy(requestAddress || '', null, tx) : tx).method.hash;
|
||||
const isProxyPalletAvailable = isFunction(api.tx.proxy?.proxy);
|
||||
const hash = (address && isProxyPalletAvailable ? api.tx.proxy.proxy(requestAddress || '', null, tx) : tx).method.hash;
|
||||
|
||||
const optMulti = await api.query[multiModule].multisigs<Option<Multisig>>(address, hash);
|
||||
const multi = optMulti.unwrapOr(null);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user