Skip to content

Commit

Permalink
fixed: remove console
Browse files Browse the repository at this point in the history
  • Loading branch information
zzggo committed Dec 17, 2024
1 parent 72a998c commit 7c45a8a
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/background/service/keyring/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ class KeyringService extends EventEmitter {
});
})
.then((firstKeyring) => {
console.log('firstKeyring ', firstKeyring);
keyring = firstKeyring;
return firstKeyring.getAccounts();
})
Expand Down Expand Up @@ -250,21 +249,18 @@ class KeyringService extends EventEmitter {
* @returns {Promise<Object>} A Promise that resolves to the state.
*/
async createKeyringWithMnemonics(seed: string): Promise<any> {
console.log('createKeyringWithMnemonics ================== ', seed);
if (!bip39.validateMnemonic(seed)) {
return Promise.reject(new Error(i18n.t('mnemonic phrase is invalid')));
}
let keyring;
return this.persistAllKeyrings()
.then(() => {
console.log('seed ', seed);
return this.addNewKeyring('HD Key Tree', {
mnemonic: seed,
activeIndexes: [0],
});
})
.then((firstKeyring) => {
console.log('firstKeyring ================== ', firstKeyring);
keyring = firstKeyring;
return firstKeyring.getAccounts();
})
Expand All @@ -281,7 +277,6 @@ class KeyringService extends EventEmitter {
}

async addKeyring(keyring) {
console.log('addKeyring ================== ', keyring);
return keyring
.getAccounts()
.then((accounts) => {
Expand Down Expand Up @@ -336,10 +331,8 @@ class KeyringService extends EventEmitter {
async submitPassword(password: string): Promise<MemStoreState> {
await this.verifyPassword(password);
this.password = password;
console.log('this.verifyPassword ================== ', password);
try {
this.keyrings = await this.unlockKeyrings(password);
console.log('this.keyrings ================== ', this.keyrings);
} catch {
//
} finally {
Expand Down Expand Up @@ -380,7 +373,6 @@ class KeyringService extends EventEmitter {
*/
addNewKeyring(type: string, opts?: unknown): Promise<any> {
const Keyring = this.getKeyringClassForType(type);
console.log('Keyring ================== ', Keyring);
const keyring = new Keyring(opts);
return this.addKeyring(keyring);
}
Expand Down Expand Up @@ -846,7 +838,6 @@ class KeyringService extends EventEmitter {
);

await this._updateMemStoreKeyrings();
console.log('Final keyrings state:', this.keyrings);
return this.keyrings;
}

Expand Down

0 comments on commit 7c45a8a

Please sign in to comment.