You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
string strError = _("Error: Wallet locked, unable to create transaction!");
1501
+
strError = _("Error: Wallet locked, unable to create transaction!");
1498
1502
LogPrintf("SendMoney() : %s", strError);
1499
1503
return strError;
1500
1504
}
1501
-
string strError;
1505
+
1506
+
// Parse Bitcoin address
1507
+
CScript scriptPubKey;
1508
+
scriptPubKey.SetDestination(address);
1509
+
1510
+
// Create and send the transaction
1511
+
CReserveKey reservekey(this);
1512
+
int64_t nFeeRequired;
1502
1513
if (!CreateTransaction(scriptPubKey, nValue, wtxNew, reservekey, nFeeRequired, strError))
1503
1514
{
1504
1515
if (nValue + nFeeRequired > GetBalance())
1505
1516
strError = strprintf(_("Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!"), FormatMoney(nFeeRequired));
1506
1517
LogPrintf("SendMoney() : %s\n", strError);
1507
1518
return strError;
1508
1519
}
1509
-
1510
1520
if (!CommitTransaction(wtxNew, reservekey))
1511
1521
return_("Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.");
0 commit comments