Skip to content

Commit 5f9aac4

Browse files
random-zebrafurszy
authored andcommitted
Refactor: remove duplicated coll. confirmation check in MNModel::data
Github-Pull: #2530 Rebased-From: f0fd8ac
1 parent 2a947c0 commit 5f9aac4

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/qt/pivx/mnmodel.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,7 @@ QVariant MNModel::data(const QModelIndex &index, int role) const
106106
return "Not available";
107107
}
108108
case WAS_COLLATERAL_ACCEPTED:{
109-
if (!isAvailable) return false;
110-
std::string txHash = rec->vin.prevout.hash.GetHex();
111-
if (!collateralTxAccepted.value(txHash) && walletModel) {
112-
return walletModel->getWalletTxDepth(rec->vin.prevout.hash) > 0;
113-
}
114-
return true;
109+
return isAvailable && collateralTxAccepted.value(rec->vin.prevout.hash.GetHex());
115110
}
116111
}
117112
}

0 commit comments

Comments
 (0)