Fix PendingLedgerVersionError message and export FormattedTransactionType (#941)

This commit is contained in:
Elliot Lee
2018-09-04 18:31:24 -07:00
committed by GitHub
parent 4bea69d647
commit 3ff4929a49
3 changed files with 8 additions and 3 deletions

View File

@@ -70,7 +70,7 @@ class MissingLedgerHistoryError extends RippleError {
class PendingLedgerVersionError extends RippleError {
constructor(message?: string) {
super(message || 'maxLedgerVersion is greater than server\'s most recent ' +
super(message || 'maxLedgerVersion is greater than server\'s most recent' +
' validated ledger')
}
}

View File

@@ -1,5 +1,8 @@
export {RippleAPI} from './api'
export {
FormattedTransactionType
} from './transaction/types'
// Broadcast api is experimental
export {RippleAPIBroadcast} from './broadcast'

View File

@@ -1629,6 +1629,8 @@ describe('RippleAPI', function () {
assert(false, 'Should throw PendingLedgerVersionError');
}).catch(error => {
assert(error instanceof this.api.errors.PendingLedgerVersionError);
assert.strictEqual(error.message, 'maxLedgerVersion is greater than server\'s'
+ ' most recent validated ledger')
});
});