mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 12:15:51 +00:00
Fix PendingLedgerVersionError message and export FormattedTransactionType (#941)
This commit is contained in:
@@ -70,7 +70,7 @@ class MissingLedgerHistoryError extends RippleError {
|
|||||||
|
|
||||||
class PendingLedgerVersionError extends RippleError {
|
class PendingLedgerVersionError extends RippleError {
|
||||||
constructor(message?: string) {
|
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')
|
' validated ledger')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
|
|
||||||
|
|
||||||
export {RippleAPI} from './api'
|
export {RippleAPI} from './api'
|
||||||
|
|
||||||
|
export {
|
||||||
|
FormattedTransactionType
|
||||||
|
} from './transaction/types'
|
||||||
|
|
||||||
// Broadcast api is experimental
|
// Broadcast api is experimental
|
||||||
export {RippleAPIBroadcast} from './broadcast'
|
export {RippleAPIBroadcast} from './broadcast'
|
||||||
|
|||||||
@@ -1629,6 +1629,8 @@ describe('RippleAPI', function () {
|
|||||||
assert(false, 'Should throw PendingLedgerVersionError');
|
assert(false, 'Should throw PendingLedgerVersionError');
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
assert(error instanceof this.api.errors.PendingLedgerVersionError);
|
assert(error instanceof this.api.errors.PendingLedgerVersionError);
|
||||||
|
assert.strictEqual(error.message, 'maxLedgerVersion is greater than server\'s'
|
||||||
|
+ ' most recent validated ledger')
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user