Skip to content

Commit

Permalink
feat(web-client): add error handling for account locked
Browse files Browse the repository at this point in the history
  • Loading branch information
billguo99 committed Aug 3, 2023
1 parent 6818666 commit 80644c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions web-client/src/app/state/session.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ export class SessionService {
} else if ('Failed' in result) {
console.error(result);
throw new Error(result.Failed);
} else if ('AccountLocked' in result) {
return 'You have failed to enter the correct pin 3 times. Please reset your pin in order to access your account.';
} else {
throw never(result);
}
Expand Down
1 change: 1 addition & 0 deletions web-client/src/schema/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export type OpenWallet = {
export type OpenWalletResult =
| { Opened: WalletDisplay }
| { InvalidAuth: null }
| { AccountLocked: null }
| { Failed: string };

export type UpdateOtpPhoneNumber = {
Expand Down

0 comments on commit 80644c0

Please sign in to comment.