Re-add extension load init (#2602)

This commit is contained in:
Jaco Greeff 2020-04-22 22:01:47 +02:00 committed by GitHub
parent 142339b58a
commit a95f73e90f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,7 +45,11 @@ interface ChainData {
systemVersion: string;
}
const injectedPromise = web3Enable('polkadot-js/apps');
const injectedPromise = new Promise<InjectedExtension[]>((resolve): void => {
window.addEventListener('load', (): void => {
resolve(web3Enable('polkadot-js/apps'));
});
});
const DEFAULT_DECIMALS = registry.createType('u32', 12);
const DEFAULT_SS58 = registry.createType('u32', addressDefaults.prefix);