Skip to content

Commit

Permalink
wallet: use brhash for http after param
Browse files Browse the repository at this point in the history
  • Loading branch information
braydonf committed Dec 20, 2018
1 parent ff01a4a commit f1aa81b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/wallet/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -768,10 +768,7 @@ class HTTP extends Server {
const reverse = valid.bool('reverse', false);
const limit = valid.u32('limit', 100);

// TODO consider using brhash and accepting the
// `tx.txid()` vs. `tx.hash()`. This may include adding
// the `tx.txid()` to the results in `toDetails()`.
const after = valid.bhash('after');
const after = valid.brhash('after');
const time = valid.u32('time');

enforce(limit <= 100, 'Limit above max of 100.');
Expand All @@ -780,7 +777,7 @@ class HTTP extends Server {

if (after) {
txs = await req.wallet.listHistoryAfter(acct, {
txid: after.reverse(),
txid: after,
limit,
reverse
});
Expand Down

0 comments on commit f1aa81b

Please sign in to comment.