in isValidAddress check that address starting with 'r'

because UInt160 considers valid hex values
This commit is contained in:
Ivan Tivonenko
2015-08-19 04:57:27 +03:00
parent 2515d17a85
commit 0e97f269ab
2 changed files with 10 additions and 1 deletions

View File

@@ -803,4 +803,11 @@ describe('RippleAPI - offline', function() {
const api = new RippleAPI();
assert(!api.isValidAddress(address.slice(0, -1) + 'a'));
});
it('isValidAddress - invalid - hex representation', function() {
const api = new RippleAPI();
const hex = '6e3efa86a5eb0a3c5dc9beb3a204783bb00e1913';
assert(!api.isValidAddress(hex));
});
});