Re-add multisigs for Ethereum (#9212)
This commit is contained in:
parent
5a4b4b01e1
commit
e5fe7dede6
@ -89,7 +89,7 @@ function groupAccounts (accounts: SortedAccount[]): Record<GroupName, string[]>
|
||||
|
||||
function Overview ({ className = '', onStatusChange }: Props): React.ReactElement<Props> {
|
||||
const { t } = useTranslation();
|
||||
const { api, isElectron, isEthereum } = useApi();
|
||||
const { api, isElectron } = useApi();
|
||||
const { allAccounts, hasAccounts } = useAccounts();
|
||||
const { isIpfs } = useIpfs();
|
||||
const { isLedgerEnabled } = useLedger();
|
||||
@ -156,12 +156,9 @@ function Overview ({ className = '', onStatusChange }: Props): React.ReactElemen
|
||||
);
|
||||
|
||||
// detect multisigs
|
||||
// FIXME Currently Ethereum shorter-addresses and the multisig hashing is not quite supported,
|
||||
// somewhere in the chain we need to adjust quite a bit (it would seem). Tracking issue -
|
||||
// https://github.com/polkadot-js/apps/issues/9209
|
||||
const hasPalletMultisig = useMemo(
|
||||
() => !isEthereum && isFunction((api.tx.multisig || api.tx.utility)?.approveAsMulti),
|
||||
[api, isEthereum]
|
||||
() => isFunction((api.tx.multisig || api.tx.utility)?.approveAsMulti),
|
||||
[api]
|
||||
);
|
||||
|
||||
// proxy support
|
||||
|
||||
@ -86,7 +86,7 @@ function MultisigApprove ({ className = '', onClose, ongoing, threshold, who }:
|
||||
setOthers(
|
||||
who
|
||||
.map((w) => api.createType('AccountId', w))
|
||||
.filter((w) => !w.eq(signatory))
|
||||
.filter((w) => !signatory || !w.eq(signatory))
|
||||
);
|
||||
}, [api, signatory, who]);
|
||||
|
||||
|
||||
@ -76,6 +76,8 @@ function createMultisig (signatories: string[], threshold: BN | number, { genesi
|
||||
} catch (error) {
|
||||
status.status = 'error';
|
||||
status.message = (error as Error).message;
|
||||
|
||||
console.error(error);
|
||||
}
|
||||
|
||||
return status;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user