From 57b70300f5f0c7534ede118ddbb5d8762668a4f8 Mon Sep 17 00:00:00 2001 From: Matthew Fettig Date: Fri, 26 Sep 2014 21:41:22 -0700 Subject: [PATCH] [FIX] change handling of requestLedger options ledger_index and ledger_hash were being set to true instead of the specified value, and according to API docs 'closed','validated', and 'current' can be supplied to the ledger_index field to get the most recent of the specified type --- src/js/ripple/remote.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/js/ripple/remote.js b/src/js/ripple/remote.js index bbd10a316f..e7e19ab662 100644 --- a/src/js/ripple/remote.js +++ b/src/js/ripple/remote.js @@ -949,10 +949,19 @@ Remote.prototype.requestLedger = function(options, callback) { case 'expand': case 'transactions': case 'accounts': - case 'ledger_index': - case 'ledger_hash': request.message[o] = true; break; + + case 'ledger_index': + case 'ledger_hash': + request.message[o] = options[o]; + break; + + case 'closed' : + case 'current' : + case 'validated' : + request.message.ledger_index = o; + break; } }, options); break;