Skip to content

Commit 130f889

Browse files
more coderabbitai comments resolved
1 parent 4de8db1 commit 130f889

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/qt/sendcoinsdialog.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,10 @@ void SendCoinsDialog::on_sendButton_clicked()
355355
CAmount txFee = 0;
356356
CAmount totalAmount = 0;
357357
size_t confirmed, unconfirmed;
358-
if (model->getWallet()->GetPrivateBalance(confirmed, unconfirmed).first > 0 && spark::IsSparkAllowed() && chainActive.Height() < ::Params().GetConsensus().nLelantusGracefulPeriod) {
358+
if (model->getWallet() &&
359+
model->getWallet()->GetPrivateBalance(confirmed, unconfirmed).first > 0 &&
360+
spark::IsSparkAllowed() &&
361+
chainActive.Height() < ::Params().GetConsensus().nLelantusGracefulPeriod) {
359362
MigrateLelantusToSparkDialog migrateLelantusToSpark(model);
360363
bool clickedButton = migrateLelantusToSpark.getClickedButton();
361364
if(!clickedButton) {

src/qt/walletmodel.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ CAmount WalletModel::getBalance(const CCoinControl *coinControl, bool fExcludeLo
9292
CAmount WalletModel::getAnonymizableBalance() const
9393
{
9494
CAmount amount = 0;
95-
if (spark::IsSparkAllowed()){
95+
if (sparkModel && spark::IsSparkAllowed()){
9696
amount = sparkModel->getMintableSparkAmount();
9797
}
9898
return amount;
@@ -1082,9 +1082,9 @@ bool WalletModel::getAvailableLelantusCoins()
10821082
std::list<CLelantusEntry> coins = wallet->GetAvailableLelantusCoins();
10831083
if (coins.size() > 0) {
10841084
return true;
1085-
} else {
1086-
return false;
10871085
}
1086+
1087+
return false;
10881088
}
10891089

10901090
bool WalletModel::migrateLelantusToSpark()

0 commit comments

Comments
 (0)