mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 06:25:51 +00:00
Merge branch 'master' of github.com:jedmccaleb/NewCoin
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ripple-lib",
|
||||
"version": "0.7.1",
|
||||
"version": "0.7.2",
|
||||
"description": "Ripple JavaScript client library",
|
||||
|
||||
"files": [
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
#ifndef __PEERDOOR__
|
||||
#define __PEERDOOR__
|
||||
|
||||
#include <map>
|
||||
#include <set>
|
||||
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/asio/ssl.hpp>
|
||||
|
||||
|
||||
@@ -559,7 +559,7 @@ Json::Value RPCHandler::accountFromString(Ledger::ref lrLedger, RippleAddress& n
|
||||
}
|
||||
|
||||
// {
|
||||
// ident : <indent>,
|
||||
// account: <indent>,
|
||||
// account_index : <index> // optional
|
||||
// strict: <bool> // true, only allow public keys and addresses. false, default.
|
||||
// ledger_hash : <ledger>
|
||||
@@ -573,10 +573,10 @@ Json::Value RPCHandler::doAccountInfo(Json::Value jvRequest)
|
||||
if (!lpLedger)
|
||||
return jvResult;
|
||||
|
||||
if (!jvRequest.isMember("ident"))
|
||||
if (!jvRequest.isMember("account") && !jvRequest.isMember("ident"))
|
||||
return rpcError(rpcINVALID_PARAMS);
|
||||
|
||||
std::string strIdent = jvRequest["ident"].asString();
|
||||
std::string strIdent = jvRequest.isMember("account") ? jvRequest["account"].asString() : jvRequest["ident"].asString();
|
||||
bool bIndex;
|
||||
int iIndex = jvRequest.isMember("account_index") ? jvRequest["account_index"].asUInt() : 0;
|
||||
bool bStrict = jvRequest.isMember("strict") && jvRequest["strict"].asBool();
|
||||
@@ -742,10 +742,10 @@ Json::Value RPCHandler::doNicknameInfo(Json::Value params)
|
||||
// XXX This would be better if it took the ledger.
|
||||
Json::Value RPCHandler::doOwnerInfo(Json::Value jvRequest)
|
||||
{
|
||||
if (!jvRequest.isMember("ident"))
|
||||
if (!jvRequest.isMember("account") && !jvRequest.isMember("ident"))
|
||||
return rpcError(rpcINVALID_PARAMS);
|
||||
|
||||
std::string strIdent = jvRequest["ident"].asString();
|
||||
std::string strIdent = jvRequest.isMember("account") ? jvRequest["account"].asString() : jvRequest["ident"].asString();
|
||||
bool bIndex;
|
||||
int iIndex = jvRequest.isMember("account_index") ? jvRequest["account_index"].asUInt() : 0;
|
||||
RippleAddress raAccount;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// Routines for working with an account.
|
||||
//
|
||||
// You should not instantiate this class yourself, instead use Remote#account.
|
||||
//
|
||||
// Events:
|
||||
// wallet_clean : True, iff the wallet has been updated.
|
||||
// wallet_dirty : True, iff the wallet needs to be updated.
|
||||
|
||||
@@ -26,6 +26,7 @@ var OrderBook = require('./orderbook').OrderBook;
|
||||
|
||||
var utils = require('./utils');
|
||||
var config = require('./config');
|
||||
var sjcl = require('../../build/sjcl');
|
||||
|
||||
// Request events emitted:
|
||||
// 'success' : Request successful.
|
||||
@@ -890,7 +891,8 @@ Remote.prototype.request_tx = function (hash) {
|
||||
Remote.prototype.request_account_info = function (accountID) {
|
||||
var request = new Request(this, 'account_info');
|
||||
|
||||
request.message.ident = UInt160.json_rewrite(accountID);
|
||||
request.message.ident = UInt160.json_rewrite(accountID); // DEPRECATED
|
||||
request.message.account = UInt160.json_rewrite(accountID);
|
||||
|
||||
return request;
|
||||
};
|
||||
@@ -1030,8 +1032,13 @@ Remote.prototype._server_subscribe = function () {
|
||||
self._stand_alone = !!message.stand_alone;
|
||||
self._testnet = !!message.testnet;
|
||||
|
||||
if (message.random)
|
||||
if ("string" === typeof message.random) {
|
||||
var rand = message.random.match(/[0-9A-F]{8}/ig);
|
||||
while (rand && rand.length)
|
||||
sjcl.random.addEntropy(parseInt(rand.pop(), 16));
|
||||
|
||||
self.emit('random', utils.hexToArray(message.random));
|
||||
}
|
||||
|
||||
if (message.ledger_hash && message.ledger_index) {
|
||||
self._ledger_time = message.ledger_time;
|
||||
@@ -1111,11 +1118,17 @@ Remote.prototype.request_owner_count = function (account, current) {
|
||||
};
|
||||
|
||||
Remote.prototype.account = function (accountId) {
|
||||
accountId = UInt160.json_rewrite(accountId);
|
||||
|
||||
if (!this._accounts[accountId]) {
|
||||
var account = new Account(this, accountId);
|
||||
|
||||
if (!account.is_valid()) return account;
|
||||
|
||||
return this._accounts[account.to_json()] = account;
|
||||
this._accounts[accountId] = account;
|
||||
}
|
||||
|
||||
return this._accounts[accountId];
|
||||
};
|
||||
|
||||
Remote.prototype.book = function (currency_out, issuer_out,
|
||||
@@ -1130,7 +1143,7 @@ Remote.prototype.book = function (currency_out, issuer_out,
|
||||
// Return the next account sequence if possible.
|
||||
// <-- undefined or Sequence
|
||||
Remote.prototype.account_seq = function (account, advance) {
|
||||
var account = UInt160.json_rewrite(account);
|
||||
account = UInt160.json_rewrite(account);
|
||||
var account_info = this.accounts[account];
|
||||
var seq;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user