mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 12:15:51 +00:00
Add isValidAddress
This commit is contained in:
@@ -793,4 +793,14 @@ describe('RippleAPI - offline', function() {
|
||||
requests.computeLedgerHash.transactions);
|
||||
assert.throws(() => api.computeLedgerHash(header));
|
||||
});
|
||||
|
||||
it('isValidAddress - valid', function() {
|
||||
const api = new RippleAPI();
|
||||
assert(api.isValidAddress(address));
|
||||
});
|
||||
|
||||
it('isValidAddress - invalid', function() {
|
||||
const api = new RippleAPI();
|
||||
assert(!api.isValidAddress(address.slice(0, -1) + 'a'));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user