Added tests for single slash. Removed some unused code.
This commit is contained in:
parent
3b74ab7d8c
commit
217b02504a
2 changed files with 22 additions and 13 deletions
|
|
@ -12,24 +12,12 @@
|
|||
function bitcoinUriService(bitcoinCashJsService, bwcService, $log) {
|
||||
var bch = bitcoinCashJsService.getBitcoinCashJs();
|
||||
var bitcore = bwcService.getBitcore();
|
||||
var cashAddrRe = /^((?:q|p)[a-z0-9]{41})|((?:Q|P)[A-Z0-9]{41})$/;
|
||||
|
||||
var service = {
|
||||
parse: parse
|
||||
};
|
||||
|
||||
return service;
|
||||
|
||||
function generateTestData() {
|
||||
var privateKey = new bch.PrivateKey('testnet');
|
||||
var address1 = privateKey.toAddress();
|
||||
console.log('legacy pub:', address1.toString());
|
||||
//var addrss = bitcoinCashJsService.readAddress(address1);
|
||||
//console.log('generated:', addrss.cashaddr);
|
||||
//bch.Address.fromString(address1, 'testnet');
|
||||
console.log('generated:', address1.toString('cashaddr'));
|
||||
|
||||
}
|
||||
|
||||
function bitpayAddrOnMainnet(address) {
|
||||
var Address = bch.Address;
|
||||
|
|
@ -52,7 +40,6 @@
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
function cashAddrOnMainnet(address) {
|
||||
var Address = bch.Address;
|
||||
var CashAddrFormat = Address.CashAddrFormat;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue