Returning legacy address for cashAddr.
This commit is contained in:
parent
70f76baad0
commit
ab0b8b19b0
2 changed files with 137 additions and 8 deletions
|
|
@ -2,6 +2,7 @@ fdescribe('bitcoinUriService', function() {
|
|||
var bitcoinUriService;
|
||||
|
||||
beforeEach(function() {
|
||||
module('bitcoinCashJsModule');
|
||||
module('bitcoincom.services');
|
||||
|
||||
inject(function($injector){
|
||||
|
|
@ -18,4 +19,14 @@ fdescribe('bitcoinUriService', function() {
|
|||
expect(parsed.coin).toBeUndefined();
|
||||
expect(parsed.legacyAddress).toBe('1JXeGEu7bNEAYu6URT6dU6g1Ys6ffSAWYW');
|
||||
});
|
||||
|
||||
it('cashAddr', function() {
|
||||
|
||||
var parsed = bitcoinUriService.parse('qqen2y3l28dpk0dzsag8w027ds96u7z4pc0uxtl0nq');
|
||||
|
||||
expect(parsed.isValid).toBe(true);
|
||||
expect(parsed.address).toBe('qqen2y3l28dpk0dzsag8w027ds96u7z4pc0uxtl0nq');
|
||||
expect(parsed.coin).toBe('bch');
|
||||
expect(parsed.legacyAddress).toBe('15fm3EwqgBYcxkndALBfforueps5yWKReJ');
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue