fix(@desktop/wallet): log warnings for a `null` keypair fixed

This commit is contained in:
Sale Djenic 2023-08-22 11:53:16 +02:00 committed by saledjenic
parent 38377d3c05
commit c469cb32d3
1 changed files with 10 additions and 2 deletions

View File

@ -48,7 +48,11 @@ Column {
readonly property int unimportedNonProfileKeypairs: {
let total = 0
for (var i = 0; i < keypairsRepeater.count; i++) {
let kp = keypairsRepeater.itemAt(i).keyPair
let item = keypairsRepeater.itemAt(i)
if (item == undefined || item == null) {
continue
}
let kp = item.keyPair
if (kp.migratedToKeycard ||
kp.pairType === Constants.keypair.type.profile ||
kp.pairType === Constants.keypair.type.watchOnly ||
@ -63,7 +67,11 @@ Column {
readonly property int allNonProfileKeypairsMigratedToAKeycard: {
for (var i = 0; i < keypairsRepeater.count; i++) {
let kp = keypairsRepeater.itemAt(i).keyPair
let item = keypairsRepeater.itemAt(i)
if (item == undefined || item == null) {
continue
}
let kp = item.keyPair
if (!kp.migratedToKeycard &&
kp.pairType !== Constants.keypair.type.profile &&
kp.pairType !== Constants.keypair.type.watchOnly &&