Accommodate new account_tx

This commit is contained in:
wltsmrz
2013-09-04 14:34:37 -07:00
parent 700c6f0430
commit 7a6d46acd3

View File

@@ -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];
} }
} }