mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-22 05:05:48 +00:00
Accommodate new account_tx
This commit is contained in:
@@ -581,7 +581,7 @@ Remote.prototype.request_ledger = function (ledger, opts, callback) {
|
|||||||
'full'
|
'full'
|
||||||
, 'expand'
|
, 'expand'
|
||||||
, 'transactions'
|
, 'transactions'
|
||||||
, 'accounts'
|
, 'accounts'
|
||||||
];
|
];
|
||||||
|
|
||||||
switch (typeof opts) {
|
switch (typeof opts) {
|
||||||
@@ -828,18 +828,23 @@ Remote.prototype.request_account_tx = function (obj, callback) {
|
|||||||
|
|
||||||
request.message.account = obj.account;
|
request.message.account = obj.account;
|
||||||
|
|
||||||
var props = [
|
var request_fields = [
|
||||||
'ledger_index_min'
|
'ledger_index_min' //earliest
|
||||||
, 'ledger_index_max'
|
, 'ledger_index_max' //latest
|
||||||
, 'binary'
|
, 'binary' //false
|
||||||
, 'count'
|
, 'count' //false
|
||||||
, 'descending'
|
, 'descending' //false
|
||||||
, 'offset'
|
, 'offset' //0
|
||||||
, 'limit'
|
, 'limit'
|
||||||
|
|
||||||
|
//extended account_tx
|
||||||
|
, 'forward' //false
|
||||||
|
, 'fwd_marker'
|
||||||
|
, 'rev_marker'
|
||||||
];
|
];
|
||||||
|
|
||||||
for (var key in obj) {
|
for (var key in obj) {
|
||||||
if (~props.indexOf(key)) {
|
if (~request_fields.indexOf(key)) {
|
||||||
request.message[key] = obj[key];
|
request.message[key] = obj[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user