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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user