From dc977d1bfd18024f01f8f885f18b4b90f95cc03d Mon Sep 17 00:00:00 2001 From: Arthur Britto Date: Mon, 3 Dec 2012 16:05:45 -0800 Subject: [PATCH] Update remote.js for RPC account_tx. --- src/js/remote.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/js/remote.js b/src/js/remote.js index 6b6f1e86f0..0d5a80b4b4 100644 --- a/src/js/remote.js +++ b/src/js/remote.js @@ -724,14 +724,22 @@ Remote.prototype.request_wallet_accounts = function (key) { return request; }; -Remote.prototype.request_account_tx = function (accountID, minLedger, maxLedger) { +Remote.prototype.request_account_tx = function (accountID, ledger_min, ledger_max) { // XXX Does this require the server to be trusted? //assert(this.trusted); var request = new Request(this, 'account_tx'); // XXX Convert API call to JSON - request.message.params = [accountID, minLedger, maxLedger]; + request.message.account = accountID; + + if (ledger_min === ledger_max) { + request.message.ledger = ledger_min; + } + else { + request.message.ledger_min = ledger_min; + request.message.ledger_max = ledger_max; + } return request; };