fix(@desktop/wallet): importing keypairs after Waku backup (point 10)

Point 10 of #11968
This commit is contained in:
Sale Djenic 2023-08-23 14:01:26 +02:00 committed by saledjenic
parent aec5dc62c9
commit 365fd37f99
5 changed files with 7 additions and 9 deletions

View File

@ -98,7 +98,7 @@ StatusDialog {
} }
StatusButton { StatusButton {
type: StatusBaseButton.Type.Danger type: StatusBaseButton.Type.Danger
text: qsTr("Remove keypair & associated accounts") text: qsTr("Remove keypair and derived accounts")
onClicked: root.confirmClicked() onClicked: root.confirmClicked()
Keys.onReturnPressed: function(event) { Keys.onReturnPressed: function(event) {
root.confirmClicked() root.confirmClicked()

View File

@ -94,7 +94,7 @@ StatusMenu {
} }
StatusAction { StatusAction {
text: enabled? qsTr("Remove keypair and associated accounts") : "" text: enabled? qsTr("Remove keypair and derived accounts") : ""
enabled: !!root.keyPair && enabled: !!root.keyPair &&
root.keyPair.pairType !== Constants.keypair.type.profile root.keyPair.pairType !== Constants.keypair.type.profile
type: StatusAction.Type.Danger type: StatusAction.Type.Danger

View File

@ -140,7 +140,7 @@ Item {
function onShowToastKeypairRemoved(keypairName: string) { function onShowToastKeypairRemoved(keypairName: string) {
Global.displayToastMessage( Global.displayToastMessage(
qsTr("“%1” keypair and its associated accounts were successfully removed from all devices").arg(keypairName), qsTr("“%1” keypair and its derived accounts were successfully removed from all devices").arg(keypairName),
"", "",
"checkmark-circle", "checkmark-circle",
false, false,

View File

@ -45,7 +45,7 @@ Item {
Layout.fillWidth: true Layout.fillWidth: true
Layout.leftMargin: d.margin Layout.leftMargin: d.margin
Layout.rightMargin: d.margin Layout.rightMargin: d.margin
text: qsTr("To use the associated accounts on this device, you need to import their keypairs.") text: qsTr("To use the derived accounts on this device, you need to import their keypairs.")
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
} }

View File

@ -846,11 +846,9 @@ QtObject {
} }
if (keypair.operability === Constants.keypair.operability.nonOperable) { if (keypair.operability === Constants.keypair.operability.nonOperable) {
if (keypair.syncedFrom === Constants.keypair.syncedFrom.backup) { if (keypair.syncedFrom === Constants.keypair.syncedFrom.backup) {
if (keypair.pairType === Constants.keypair.type.seedImport) { if (keypair.pairType === Constants.keypair.type.seedImport ||
return qsTr("Restored from backup. Re-enter seed phrase to use.") keypair.pairType === Constants.keypair.type.privateKeyImport) {
} return qsTr("Restored from backup. Import keypair to use derived accounts.")
if (keypair.pairType === Constants.keypair.type.privateKeyImport) {
return qsTr("Restored from backup. Re-enter private key to use.")
} }
} }
if (keypair.syncedFrom !== "") { if (keypair.syncedFrom !== "") {