1
0

qml wizard: enforce homogeneous master keys in multisig

- {xpub, Ypub, Zpub} categories cannot be mixed
- old mpk must not be used in multisig
This commit is contained in:
SomberNight
2023-05-11 09:55:19 +00:00
parent f40d603e64
commit d2cf21fc2b
7 changed files with 76 additions and 23 deletions

View File

@@ -42,10 +42,14 @@ WizardComponent {
if (cosigner) {
applyMasterKey(key)
if (wiz.hasDuplicateKeys(wizard_data)) {
if (wiz.hasDuplicateMasterKeys(wizard_data)) {
validationtext.text = qsTr('Error: duplicate master public key')
return false
}
if (wiz.hasHeterogeneousMasterKeys(wizard_data)) {
validationtext.text = qsTr('Error: master public key types do not match')
return false
}
}
return valid = true

View File

@@ -65,9 +65,12 @@ WizardComponent {
return
} else {
apply()
if (wiz.hasDuplicateKeys(wizard_data)) {
if (wiz.hasDuplicateMasterKeys(wizard_data)) {
validationtext.text = qsTr('Error: duplicate master public key')
return
} else if (wiz.hasHeterogeneousMasterKeys(wizard_data)) {
validationtext.text = qsTr('Error: master public key types do not match')
return
} else {
valid = true
}