mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 20:25:48 +00:00
Support source.amount in getPaths and destination.minAmount in preparePayment
This commit is contained in:
@@ -48,7 +48,7 @@ describe('RippleAPI', function() {
|
||||
}, instructions);
|
||||
return this.api.preparePayment(
|
||||
address, requests.preparePayment, localInstructions).then(
|
||||
_.partial(checkResult, responses.preparePayment, 'prepare'));
|
||||
_.partial(checkResult, responses.preparePayment.normal, 'prepare'));
|
||||
});
|
||||
|
||||
it('preparePayment with all options specified', function() {
|
||||
@@ -59,7 +59,7 @@ describe('RippleAPI', function() {
|
||||
};
|
||||
return this.api.preparePayment(
|
||||
address, requests.preparePaymentAllOptions, localInstructions).then(
|
||||
_.partial(checkResult, responses.preparePaymentAllOptions, 'prepare'));
|
||||
_.partial(checkResult, responses.preparePayment.allOptions, 'prepare'));
|
||||
});
|
||||
});
|
||||
|
||||
@@ -67,10 +67,16 @@ describe('RippleAPI', function() {
|
||||
const localInstructions = _.defaults({sequence: 23}, instructions);
|
||||
return this.api.preparePayment(
|
||||
address, requests.preparePaymentNoCounterparty, localInstructions).then(
|
||||
_.partial(checkResult, responses.preparePaymentNoCounterparty,
|
||||
_.partial(checkResult, responses.preparePayment.noCounterparty,
|
||||
'prepare'));
|
||||
});
|
||||
|
||||
it('preparePayment - destination.minAmount', function() {
|
||||
return this.api.preparePayment(address, responses.getPaths.sendAll[0],
|
||||
instructions).then(_.partial(checkResult,
|
||||
responses.preparePayment.minAmount, 'prepare'));
|
||||
});
|
||||
|
||||
it('prepareOrder - buy order', function() {
|
||||
return this.api.prepareOrder(address, requests.prepareOrder, instructions)
|
||||
.then(_.partial(checkResult, responses.prepareOrder, 'prepare'));
|
||||
@@ -639,6 +645,11 @@ describe('RippleAPI', function() {
|
||||
});
|
||||
});
|
||||
|
||||
it('getPaths - send all', function() {
|
||||
return this.api.getPaths(requests.getPaths.sendAll).then(
|
||||
_.partial(checkResult, responses.getPaths.sendAll, 'getPaths'));
|
||||
});
|
||||
|
||||
it('getLedgerVersion', function(done) {
|
||||
this.api.getLedgerVersion().then((ver) => {
|
||||
assert.strictEqual(ver, 8819951);
|
||||
|
||||
Reference in New Issue
Block a user