Skip to content

Commit

Permalink
[FIX] change handling of requestLedger options
Browse files Browse the repository at this point in the history
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
  • Loading branch information
shekenahglory committed Sep 27, 2014
1 parent eeba86f commit 57b7030
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/js/ripple/remote.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 57b7030

Please # to comment.