-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(@desktop/onboarding):
Lost Keycard
- start using account witho…
…ut keycard This commit introduces: - `Start using account without keycard` flow Closes: #7642
- Loading branch information
1 parent
b00f0a8
commit 841a37e
Showing
29 changed files
with
333 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/app/modules/startup/internal/login_keycard_converted_to_regular_account_state.nim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
type | ||
LoginKeycardConvertedToRegularAccountState* = ref object of State | ||
|
||
proc newLoginKeycardConvertedToRegularAccountState*(flowType: FlowType, backState: State): LoginKeycardConvertedToRegularAccountState = | ||
result = LoginKeycardConvertedToRegularAccountState() | ||
result.setup(flowType, StateType.LoginKeycardConvertedToRegularAccount, backState) | ||
|
||
proc delete*(self: LoginKeycardConvertedToRegularAccountState) = | ||
self.State.delete | ||
|
||
method executePrimaryCommand*(self: LoginKeycardConvertedToRegularAccountState, controller: Controller) = | ||
if self.flowType == FlowType.LostKeycardConvertToRegularAccount: | ||
info "restart the app because of successfully converted keycard account to regular account" | ||
quit() # quit the app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/app/modules/startup/internal/user_profile_wrong_seed_phrase_state.nim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
type | ||
UserProfileWrongSeedPhraseState* = ref object of State | ||
|
||
proc newUserProfileWrongSeedPhraseState*(flowType: FlowType, backState: State): UserProfileWrongSeedPhraseState = | ||
result = UserProfileWrongSeedPhraseState() | ||
result.setup(flowType, StateType.UserProfileWrongSeedPhrase, backState) | ||
|
||
proc delete*(self: UserProfileWrongSeedPhraseState) = | ||
self.State.delete | ||
|
||
method executeBackCommand*(self: UserProfileWrongSeedPhraseState, controller: Controller) = | ||
if self.flowType == FlowType.LostKeycardReplacement or | ||
self.flowType == FlowType.LostKeycardConvertToRegularAccount: | ||
controller.setKeycardData(updatePredefinedKeycardData(controller.getKeycardData(), PredefinedKeycardData.WrongSeedPhrase, add = false)) | ||
|
||
method executePrimaryCommand*(self: UserProfileWrongSeedPhraseState, controller: Controller) = | ||
self.executeBackCommand(controller) | ||
|
||
method getNextPrimaryState*(self: UserProfileWrongSeedPhraseState, controller: Controller): State = | ||
if self.flowType == FlowType.LostKeycardReplacement or | ||
self.flowType == FlowType.LostKeycardConvertToRegularAccount: | ||
return self.getBackState() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.