fix(@desktop/keycard): few small fixes applied

- missed space added in account already exists popup
- disable close button for shared keycard popup flows identified separately
- crash if built tokens from some other action (like enabling wallet) are received late while
keycard flow is setting up and keypair for processing is not prepared yet
- 3 words name was displayed on login for a keycard user
This commit is contained in:
Sale Djenic 2023-03-03 11:13:48 +01:00 committed by saledjenic
parent 7c1c178d37
commit 21a5b10fab
5 changed files with 17 additions and 7 deletions

View File

@ -639,6 +639,8 @@ proc updateKeyPairItemIfDataAreKnown[T](self: Module[T], address: string, item:
return false
method onTokensRebuilt*[T](self: Module[T], accountsTokens: OrderedTable[string, seq[WalletTokenDto]]) =
if self.getKeyPairForProcessing().isNil:
return
let chainIds = self.controller.getChainIdsOfAllKnownNetworks()
let currency = self.controller.getCurrency()
for address, tokens in accountsTokens.pairs:

View File

@ -419,7 +419,7 @@ QtObject:
let alias = generateAliasFromPk(whisperPublicKey)
var accountDataJson = %* {
"name": alias,
"name": if displayName == "": alias else: displayName,
"display-name": displayName,
"address": address,
"key-uid": keyUid,
@ -442,7 +442,7 @@ QtObject:
{
"public-key": whisperPublicKey,
"address": whisperAddress,
"name": alias,
"name": if displayName == "": alias else: displayName,
"path": PATH_WHISPER,
"chat": true,
"derived-from": ""

View File

@ -143,7 +143,7 @@ OnboardingBasePage {
if (errType === Constants.startupErrorType.setupAccError) {
if (error === Constants.existingAccountError) {
msgDialog.title = qsTr("Keys for this account already exist")
msgDialog.text = qsTr("Keys for this account already exist and can't be added again. If you've lost\
msgDialog.text = qsTr("Keys for this account already exist and can't be added again. If you've lost \
your password, passcode or Keycard, uninstall the app, reinstall and access your keys by entering your seed phrase.")
} else {
msgDialog.title = qsTr("Login failed")
@ -153,8 +153,8 @@ your password, passcode or Keycard, uninstall the app, reinstall and access your
else if (errType === Constants.startupErrorType.importAccError) {
if (error === Constants.existingAccountError) {
msgDialog.title = qsTr("Keys for this account already exist")
msgDialog.text = qsTr("Keys for this account already exist and can't be added again. If you've lost\
your password, passcode or Keycard, uninstall the app, reinstall and access your keys by entering your seed phrase. In\
msgDialog.text = qsTr("Keys for this account already exist and can't be added again. If you've lost \
your password, passcode or Keycard, uninstall the app, reinstall and access your keys by entering your seed phrase. In \
case of Keycard try recovering using PUK or reinstall the app and try login with the Keycard option.")
} else {
msgDialog.title = qsTr("Error importing seed")

View File

@ -13,8 +13,8 @@ StatusModal {
property var emojiPopup
width: Constants.keycard.general.popupWidth
closePolicy: d.disableActionPopupButtons? Popup.NoAutoClose : Popup.CloseOnEscape
hasCloseButton: !d.disableActionPopupButtons
closePolicy: d.disableActionPopupButtons || d.disableCloseButton? Popup.NoAutoClose : Popup.CloseOnEscape
hasCloseButton: !d.disableActionPopupButtons && !d.disableCloseButton
header.title: {
switch (root.sharedKeycardModule.currentState.flowType) {

View File

@ -34,6 +34,14 @@ QtObject {
case Constants.keycardSharedState.importingFromKeycard:
case Constants.keycardSharedState.copyingKeycard:
return true
}
return false
}
// disables only close button (upper right "X" button)
readonly property bool disableCloseButton: {
switch (root.sharedKeycardModule.currentState.stateType) {
case Constants.keycardSharedState.keyPairMigrateSuccess:
return root.sharedKeycardModule.migratingProfileKeyPair()