Add promises to keystore singleton service.
This commit is contained in:
parent
8b1de5dcb5
commit
85e41e99b0
@ -10,11 +10,13 @@ export class KeystoreService {
|
||||
constructor() {}
|
||||
|
||||
public static async getKeystore(): Promise<MutableKeyStore> {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
if (!KeystoreService.mutableKeyStore) {
|
||||
this.mutableKeyStore = new MutablePgpKeyStore();
|
||||
await this.mutableKeyStore.loadKeyring();
|
||||
return KeystoreService.mutableKeyStore;
|
||||
return resolve(KeystoreService.mutableKeyStore);
|
||||
}
|
||||
return KeystoreService.mutableKeyStore;
|
||||
return resolve(KeystoreService.mutableKeyStore);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ export const environment = {
|
||||
logLevel: NgxLoggerLevel.ERROR,
|
||||
serverLogLevel: NgxLoggerLevel.OFF,
|
||||
loggingUrl: '',
|
||||
cicMetaUrl: 'https://meta.dev.grassrootseconomics.net',
|
||||
cicMetaUrl: 'https://meta-auth.dev.grassrootseconomics.net',
|
||||
publicKeysUrl: 'https://dev.grassrootseconomics.net/.well-known/publickeys/',
|
||||
cicCacheUrl: 'https://cache.dev.grassrootseconomics.net',
|
||||
web3Provider: 'wss://bloxberg-ws.dev.grassrootseconomics.net',
|
||||
|
@ -6,7 +6,7 @@ export const environment = {
|
||||
logLevel: NgxLoggerLevel.ERROR,
|
||||
serverLogLevel: NgxLoggerLevel.OFF,
|
||||
loggingUrl: '',
|
||||
cicMetaUrl: 'https://meta.dev.grassrootseconomics.net',
|
||||
cicMetaUrl: 'https://meta-auth.dev.grassrootseconomics.net',
|
||||
publicKeysUrl: 'https://dev.grassrootseconomics.net/.well-known/publickeys/',
|
||||
cicCacheUrl: 'https://cache.dev.grassrootseconomics.net',
|
||||
web3Provider: 'wss://bloxberg-ws.dev.grassrootseconomics.net',
|
||||
|
@ -6,7 +6,7 @@ export const environment = {
|
||||
logLevel: NgxLoggerLevel.ERROR,
|
||||
serverLogLevel: NgxLoggerLevel.OFF,
|
||||
loggingUrl: 'http://localhost:8000',
|
||||
cicMetaUrl: 'https://meta.dev.grassrootseconomics.net',
|
||||
cicMetaUrl: 'https://meta-auth.dev.grassrootseconomics.net',
|
||||
publicKeysUrl: 'https://dev.grassrootseconomics.net/.well-known/publickeys/',
|
||||
cicCacheUrl: 'https://cache.dev.grassrootseconomics.net',
|
||||
web3Provider: 'wss://bloxberg-ws.dev.grassrootseconomics.net',
|
||||
|
Loading…
Reference in New Issue
Block a user