Skip to content

Commit

Permalink
Add two commands for web wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
ihook98 committed Feb 8, 2018
1 parent 091b0ca commit 56ad50b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/bitcoinrpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1177,7 +1177,7 @@ Array RPCConvertValues(const std::string &strMethod, const std::vector<std::stri
if (strMethod == "move" && n > 3) ConvertTo<boost::int64_t>(params[3]);
if (strMethod == "sendfrom" && n > 2) ConvertTo<double>(params[2]);
if (strMethod == "sendfrom" && n > 3) ConvertTo<boost::int64_t>(params[3]);
// ihook98
// ihook98 2018-02-08
if (strMethod == "sendfromaddress" && n > 2) ConvertTo<double>(params[2]);
if (strMethod == "sendfromaddress" && n > 3) ConvertTo<boost::int64_t>(params[3]);
if (strMethod == "getbalancefromaddress" && n > 1) ConvertTo<boost::int64_t>(params[1]);
Expand Down
2 changes: 1 addition & 1 deletion src/bitcoinrpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ extern json_spirit::Value getinterest(const json_spirit::Array& params, bool fHe

extern json_spirit::Value getunconfirmedbalance(const json_spirit::Array& params, bool fHelp);

// ihook98
// ihook98 2018-02-08
extern json_spirit::Value getbalancefromaddress(const json_spirit::Array& params, bool fHelp);
extern json_spirit::Value sendfromaddress(const json_spirit::Array& params, bool fHelp);
#endif
4 changes: 2 additions & 2 deletions src/rpcwallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1719,8 +1719,8 @@ Value listlockunspent(const Array& params, bool fHelp)
}

/**
* ihook98
*/
* ihook98 2018-02-08
*/
Value getbalancefromaddress(const Array& params, bool fHelp)
{
if (fHelp || params.size() > 2 || params.size() < 1)
Expand Down
4 changes: 2 additions & 2 deletions src/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2484,8 +2484,8 @@ void CWallet::ListLockedCoins(std::vector<COutPoint>& vOutpts)
}

/**
* ihook98
*/
* ihook98 2018-02-08
*/
// populate vCoins with vector of spendable COutputs by address
void CWallet::AvailableCoinsByAddress(const CTxDestination &fromAddress, vector<COutput>& vCoins, bool fOnlyConfirmed, const CCoinControl *coinControl) const
{
Expand Down
2 changes: 1 addition & 1 deletion src/wallet.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class CWallet : public CCryptoKeyStore
std::string SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, bool fAskFee=false);
std::string SendMoneyToDestination(const CTxDestination &address, int64 nValue, CWalletTx& wtxNew, bool fAskFee=false);

// ihook98
// ihook98 2018-02-08
void AvailableCoinsByAddress(const CTxDestination &fromAddress, std::vector<COutput>& vCoins, bool fOnlyConfirmed=true, const CCoinControl *coinControl=NULL) const;
bool SelectCoinsFromAddress(const CTxDestination &fromAddress, int64 nTargetValue, std::set<std::pair<const CWalletTx*,unsigned int> >& setCoinsRet, int64& nValueRet, const CCoinControl *coinControl=NULL) const;
bool CreateTransaction(const CTxDestination &fromAddress, CScript scriptPubKey, int64 nValue,
Expand Down

0 comments on commit 56ad50b

Please sign in to comment.