Skip to content

Commit

Permalink
refactor: format switch statement
Browse files Browse the repository at this point in the history
Co-authored-by: Daryl Collins <daryl@darylcollins.com>
  • Loading branch information
esaminu and MaximusHaximus authored Mar 15, 2022
1 parent c299da0 commit 394a41e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/account_multisig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,12 @@ export class Account2FA extends AccountMultisig {

const multisigStateStatus = await this.checkMultisigStateStatus(contractBytes);
switch (multisigStateStatus) {
case MultisigStateStatus.NOT_INITIALIZED: return await super.signAndSendTransactionWithAccount(accountId, newFunctionCallActionBatch);
case MultisigStateStatus.VALID: return await super.signAndSendTransactionWithAccount(accountId, actions);
case MultisigStateStatus.INVALID_STATE: throw this.contractHasExistingStateError;
case MultisigStateStatus.NOT_INITIALIZED:
return await super.signAndSendTransactionWithAccount(accountId, newFunctionCallActionBatch);
case MultisigStateStatus.VALID:
return await super.signAndSendTransactionWithAccount(accountId, actions);
case MultisigStateStatus.INVALID_STATE:
throw this.contractHasExistingStateError;
}
}

Expand Down

0 comments on commit 394a41e

Please sign in to comment.