Skip to content

Commit

Permalink
Refactor: remove duplicated coll. confirmation check in MNModel::data
Browse files Browse the repository at this point in the history
  • Loading branch information
random-zebra committed Aug 25, 2021
1 parent 8ac28b8 commit f0fd8ac
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/qt/pivx/mnmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,7 @@ QVariant MNModel::data(const QModelIndex &index, int role) const
return "Not available";
}
case WAS_COLLATERAL_ACCEPTED:{
if (!isAvailable) return false;
std::string txHash = rec->vin.prevout.hash.GetHex();
if (!collateralTxAccepted.value(txHash) && walletModel) {
return walletModel->getWalletTxDepth(rec->vin.prevout.hash) > 0;
}
return true;
return isAvailable && collateralTxAccepted.value(rec->vin.prevout.hash.GetHex());
}
}
}
Expand Down

0 comments on commit f0fd8ac

Please sign in to comment.