File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ angular.module('copayApp.controllers').controller('SendController',
112112
113113 var uri ;
114114 if ( address . indexOf ( 'bitcoin:' ) === 0 ) {
115- uri = copay . HDPath . parseBitcoinURI ( address ) ;
115+ uri = new bitcore . BIP21 ( address ) . data ;
116116 } else if ( address . indexOf ( 'Merchant: ' ) === 0 ) {
117117 uri = {
118118 merchant : address . split ( / \s + / ) [ 1 ]
@@ -411,7 +411,7 @@ angular.module('copayApp.controllers').controller('SendController',
411411 merchant : value
412412 } ;
413413 } else {
414- uri = copay . HDPath . parseBitcoinURI ( value ) ;
414+ uri = new bitcore . BIP21 ( value ) . data ;
415415 }
416416 if ( ! uri || ! uri . merchant ) {
417417 return ;
@@ -476,7 +476,7 @@ angular.module('copayApp.controllers').controller('SendController',
476476 // delete the `merchant` property from the scope.
477477 var unregister = scope . $watch ( 'address' , function ( ) {
478478 var val = scope . sendForm . address . $viewValue || '' ;
479- var uri = copay . HDPath . parseBitcoinURI ( val ) ;
479+ var uri = new bitcore . BIP21 ( val ) . data ;
480480 if ( ! uri || ! uri . merchant ) {
481481 delete $rootScope . merchant ;
482482 scope . sendForm . amount . $setViewValue ( '' ) ;
Original file line number Diff line number Diff line change 11'use strict' ;
22
3- var http = require ( 'http' ) ;
43var EventEmitter = require ( 'events' ) . EventEmitter ;
54var async = require ( 'async' ) ;
65var preconditions = require ( 'preconditions' ) . singleton ( ) ;
7- var parseBitcoinURI = require ( './HDPath' ) . parseBitcoinURI ;
86var util = require ( 'util' ) ;
97
108var bitcore = require ( 'bitcore' ) ;
@@ -46,7 +44,7 @@ function Wallet(opts) {
4644 this . log ( 'creating ' + opts . requiredCopayers + ' of ' + opts . totalCopayers + ' wallet' ) ;
4745
4846 this . id = opts . id || Wallet . getRandomId ( ) ;
49- this . lock = new WalletLock ( this . storage , this . id , opts . lockTimeOutMin ) ;
47+ this . lock = new WalletLock ( this . storage , this . id , opts . lockTimeOutMin ) ;
5048
5149
5250 this . name = opts . name ;
@@ -777,7 +775,7 @@ Wallet.prototype.createPaymentTx = function(options, cb) {
777775 options . uri = options . uri || options . url ;
778776
779777 if ( options . uri . indexOf ( 'bitcoin:' ) === 0 ) {
780- options . uri = parseBitcoinURI ( options . uri ) . merchant ;
778+ options . uri = new bitcore . BIP21 ( options . uri ) . data . merchant ;
781779 if ( ! options . uri ) {
782780 return cb ( new Error ( 'No URI.' ) ) ;
783781 }
You can’t perform that action at this time.
0 commit comments