Types cleanup + more API methods onto new request method (#857)

* major types cleanup, more formatted api methods onto new request method

- getPaymentChannel() now uses this.request()
- getSettings() now uses this.request()
- getLedger() now uses this.request()
- transaction types cleaned up a bit, but still some work left to do
This commit is contained in:
Fred K. Schott
2018-03-14 16:08:57 -07:00
committed by Elliot Lee
parent c175e3f58e
commit 187154a2b0
34 changed files with 520 additions and 442 deletions

View File

@@ -1124,9 +1124,11 @@ describe('RippleAPI', function () {
});
it('getSettings - invalid options', function () {
assert.throws(() => {
this.api.getSettings(address, { invalid: 'options' });
}, this.api.errors.ValidationError);
return this.api.getSettings(address, { invalid: 'options' }).then(() => {
assert(false, 'Should throw ValidationError');
}).catch(error => {
assert(error instanceof this.api.errors.ValidationError);
});
});
it('getAccountInfo', function () {