Skip to content

Commit

Permalink
refactor: remove optional chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
esaminu committed Mar 25, 2022
1 parent 3c78e65 commit f661ae4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/account_multisig.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/account_multisig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ export class Account2FA extends AccountMultisig {

const accessKeyInfo = await this.findAccessKey(this.accountId, actions);

if(accessKeyInfo?.accessKey?.permission !== 'FullAccess') {
if(accessKeyInfo && accessKeyInfo.accessKey && accessKeyInfo.accessKey.permission !== 'FullAccess') {
throw new TypedError(`No full access key found in keystore. Unable to bypass multisig`, 'NoFAKFound');
}

Expand Down

0 comments on commit f661ae4

Please sign in to comment.