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()
187187 return ;
188188 }
189189
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 )
192197 {
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);
195206 return ;
196207 }
208+ // already unlocked or not encrypted at all
209+ send (recipients);
210+ }
197211
212+ void SendCoinsDialog::send (QList<SendCoinsRecipient> recipients)
213+ {
198214 WalletModel::SendCoinsReturn sendstatus;
199215 if (!model->getOptionsModel () || !model->getOptionsModel ()->getCoinControlFeatures ())
200216 sendstatus = model->sendCoins (recipients);
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ public slots:
5050 bool fNewRecipientAllowed ;
5151 bool boolCheckedBalance;
5252 int cachedNumBlocks;
53+ void send (QList<SendCoinsRecipient> recipients);
5354
5455private slots:
5556 void on_sendButton_clicked ();
You can’t perform that action at this time.
0 commit comments