File tree Expand file tree Collapse file tree 2 files changed +21
-4
lines changed Expand file tree Collapse file tree 2 files changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -187,14 +187,30 @@ void SendCoinsDialog::on_sendButton_clicked()
187
187
return ;
188
188
}
189
189
190
- WalletModel::UnlockContext ctx (model->requestUnlock (true ));
191
- if (!ctx.isValid ())
190
+ // request unlock only if was locked or unlocked for mixing:
191
+ // this way we let users unlock by walletpassphrase or by menu
192
+ // and make many transactions while unlocking through this dialog
193
+ // will call relock
194
+ WalletModel::EncryptionStatus encStatus = model->getEncryptionStatus ();
195
+ if (encStatus == model->Locked ||
196
+ encStatus == model->UnlockedForAnonymizationOnly )
192
197
{
193
- // Unlock wallet was cancelled
194
- fNewRecipientAllowed = true ;
198
+ WalletModel::UnlockContext ctx (model->requestUnlock (true ));
199
+ if (!ctx.isValid ())
200
+ {
201
+ // Unlock wallet was cancelled
202
+ fNewRecipientAllowed = true ;
203
+ return ;
204
+ }
205
+ send (recipients);
195
206
return ;
196
207
}
208
+ // already unlocked or not encrypted at all
209
+ send (recipients);
210
+ }
197
211
212
+ void SendCoinsDialog::send (QList<SendCoinsRecipient> recipients)
213
+ {
198
214
WalletModel::SendCoinsReturn sendstatus;
199
215
if (!model->getOptionsModel () || !model->getOptionsModel ()->getCoinControlFeatures ())
200
216
sendstatus = model->sendCoins (recipients);
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ public slots:
50
50
bool fNewRecipientAllowed ;
51
51
bool boolCheckedBalance;
52
52
int cachedNumBlocks;
53
+ void send (QList<SendCoinsRecipient> recipients);
53
54
54
55
private slots:
55
56
void on_sendButton_clicked ();
You can’t perform that action at this time.
0 commit comments