Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
gruve-p committed Feb 3, 2022
1 parent 2d815fa commit 505d695
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions test/wallet_address_validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,14 @@ describe('WAValidator.validate()', function () {
valid('2MxKEf2su6FGAUfCEAHreGFQvEYrfZDahUf', 'groestlcoin', 'testnet');

// segwit addresses
valid('grs1q49qls5kklryt95g5xx4p6msycpgjp8ramfc9jq', 'grs');
valid('grs1qnxt8adg4qk3ljl0qhvp4m0nt56w6ma77vwr2jq', 'grs');
valid('tgrs1qw4z3xrtgx4f6w7akwpp2xa0gupmkv4yauemmm9', 'grs', 'testnet');
valid('GRS1Q49QLS5KKLRYT95G5XX4P6MSYCPGJP8RAMFC9JQ', 'groestlcoin');
valid('grs1qnxt8adg4qk3ljl0qhvp4m0nt56w6ma77vwr2jq', 'groestlcoin');

invalid("grs1q49qls5kklryt95g5xq4p6msycpgjp8ramfc9jq", 'grs'),
invalid("tgrs1qqjd3qhncsxdyh5gt7hz4k6zzvfguslwxwgv23j", 'grs')
valid('tgrs1qw4z3xrtgx4f6w7akwpp2xa0gupmkv4yauemmm9', 'groestlcoin', 'testnet');
valid('tgrs1q7puer6g9ujzrgvc2eldczvd0yyz2v3j4t6m3ph', 'groestlcoin', 'testnet');

invalid("grs1q49qls5kklryt95g5xq4p6msycpgjp8ramfc9jq", 'groestlcoin'),
invalid("tgrs1qqjd3qhncsxdyh5gt7hz4k6zzvfguslwxwgv23j", 'groestlcoin')
});

it('should return true for correct peercoin addresses', function () {
Expand Down Expand Up @@ -887,6 +889,10 @@ describe('WAValidator.validate()', function () {
commonTests('litecoin');
});

it('should return false for incorrect groestlcoin addresses', function () {
commonTests('groestlcoin');
});

it('should return false for incorrect peercoin addresses', function () {
commonTests('peercoin');
});
Expand Down Expand Up @@ -1244,6 +1250,10 @@ describe('invalid results', function () {
commonTests('litecoin');
});

it('should return false for incorrect groestlcoin addresses', function () {
commonTests('groestlcoin');
});

it('should return false for incorrect peercoin addresses', function () {
commonTests('peercoin');
});
Expand Down

0 comments on commit 505d695

Please sign in to comment.