@@ -335,7 +335,7 @@ describe('Remote', function () {
335
335
} ) ;
336
336
337
337
it ( 'requestAccountLines, account and callback' , function ( ) {
338
- var callback = function ( ) { } ;
338
+ function callback ( ) { }
339
339
var remote = new Remote ( {
340
340
servers : [ { host : 's-west.ripple.com' , port : 443 , secure : true } ]
341
341
} ) ;
@@ -354,7 +354,7 @@ describe('Remote', function () {
354
354
} ) ;
355
355
356
356
it ( 'requestAccountLines, ledger, peer' , function ( ) {
357
- var callback = function ( ) { } ;
357
+ function callback ( ) { }
358
358
var remote = new Remote ( {
359
359
servers : [ { host : 's-west.ripple.com' , port : 443 , secure : true } ]
360
360
} ) ;
@@ -379,7 +379,7 @@ describe('Remote', function () {
379
379
} ) ;
380
380
381
381
it ( 'requestAccountLines, ledger, peer, limit and marker' , function ( ) {
382
- var callback = function ( ) { } ;
382
+ function callback ( ) { }
383
383
var remote = new Remote ( {
384
384
servers : [ { host : 's-west.ripple.com' , port : 443 , secure : true } ]
385
385
} ) ;
@@ -408,7 +408,7 @@ describe('Remote', function () {
408
408
} ) ;
409
409
410
410
it ( 'requestAccountOffers, ledger, peer, limit and marker' , function ( ) {
411
- var callback = function ( ) { } ;
411
+ function callback ( ) { }
412
412
var remote = new Remote ( {
413
413
servers : [ { host : 's-west.ripple.com' , port : 443 , secure : true } ]
414
414
} ) ;
@@ -437,7 +437,7 @@ describe('Remote', function () {
437
437
} ) ;
438
438
439
439
it ( 'requestBookOffers, ledger' , function ( ) {
440
- var callback = function ( ) { } ;
440
+ function callback ( ) { }
441
441
var remote = new Remote ( {
442
442
servers : [ { host : 's-west.ripple.com' , port : 443 , secure : true } ]
443
443
} ) ;
@@ -472,6 +472,44 @@ describe('Remote', function () {
472
472
assert ( request . requested ) ;
473
473
} ) ;
474
474
475
+ it ( 'requestBookOffers, ledger and limit' , function ( ) {
476
+ function callback ( ) { }
477
+
478
+ var remote = new Remote ( {
479
+ servers : [ { host : 's-west.ripple.com' , port : 443 , secure : true } ]
480
+ } ) ;
481
+ var request = remote . requestBookOffers (
482
+ {
483
+ gets : {
484
+ currency : 'USD' ,
485
+ issuer : ADDRESS
486
+ } ,
487
+ pays : {
488
+ currency : 'XRP'
489
+ } ,
490
+ ledger : LEDGER_HASH ,
491
+ limit : 10
492
+ } ,
493
+ callback
494
+ ) ;
495
+
496
+ assert . deepEqual ( request . message , {
497
+ command : 'book_offers' ,
498
+ id : undefined ,
499
+ taker_gets : {
500
+ currency : Currency . from_human ( 'USD' ) . to_hex ( ) ,
501
+ issuer : ADDRESS
502
+ } ,
503
+ taker_pays : {
504
+ currency : Currency . from_human ( 'XRP' ) . to_hex ( )
505
+ } ,
506
+ taker : UInt160 . ACCOUNT_ONE ,
507
+ ledger_hash : LEDGER_HASH ,
508
+ limit : 10
509
+ } ) ;
510
+
511
+ assert ( request . requested ) ;
512
+ } ) ;
475
513
476
514
it ( 'create remote and get pending transactions' , function ( ) {
477
515
before ( function ( ) {
0 commit comments