Skip to content

Commit

Permalink
feat: add isDefaultAccountExist
Browse files Browse the repository at this point in the history
  • Loading branch information
yoojinko committed Sep 18, 2023
1 parent 3023710 commit 597e7b1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/ain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,17 @@ export default class AinModule {
return true;
}

isDefaultAccountExist(): boolean {
if (this.getDefaultAccount())
return false;
return true;
}

setDefaultAccount(privateKey: string) {
this.checkAinInitiated()
this.checkAinInitiated();
this.ain!.wallet.addAndSetDefaultAccount(privateKey);
}

// FIXME(yoojin): check ain error.
getDefaultAccount() {
this.checkAinInitiated();
return this.ain!.wallet.defaultAccount;
Expand Down

0 comments on commit 597e7b1

Please sign in to comment.