parent
7b28837640
commit
6246e62962
2 changed files with 5 additions and 6 deletions
|
|
@ -112,7 +112,7 @@ angular.module('copayApp.controllers').controller('SendController',
|
|||
|
||||
var uri;
|
||||
if (address.indexOf('bitcoin:') === 0) {
|
||||
uri = copay.HDPath.parseBitcoinURI(address);
|
||||
uri = new bitcore.BIP21(address).data;
|
||||
} else if (address.indexOf('Merchant: ') === 0) {
|
||||
uri = {
|
||||
merchant: address.split(/\s+/)[1]
|
||||
|
|
@ -411,7 +411,7 @@ angular.module('copayApp.controllers').controller('SendController',
|
|||
merchant: value
|
||||
};
|
||||
} else {
|
||||
uri = copay.HDPath.parseBitcoinURI(value);
|
||||
uri = new bitcore.BIP21(value).data;
|
||||
}
|
||||
if (!uri || !uri.merchant) {
|
||||
return;
|
||||
|
|
@ -476,7 +476,7 @@ angular.module('copayApp.controllers').controller('SendController',
|
|||
// delete the `merchant` property from the scope.
|
||||
var unregister = scope.$watch('address', function() {
|
||||
var val = scope.sendForm.address.$viewValue || '';
|
||||
var uri = copay.HDPath.parseBitcoinURI(val);
|
||||
var uri = new bitcore.BIP21(val).data;
|
||||
if (!uri || !uri.merchant) {
|
||||
delete $rootScope.merchant;
|
||||
scope.sendForm.amount.$setViewValue('');
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ var http = require('http');
|
|||
var EventEmitter = require('events').EventEmitter;
|
||||
var async = require('async');
|
||||
var preconditions = require('preconditions').singleton();
|
||||
var parseBitcoinURI = require('./HDPath').parseBitcoinURI;
|
||||
var util = require('util');
|
||||
|
||||
var bitcore = require('bitcore');
|
||||
|
|
@ -46,7 +45,7 @@ function Wallet(opts) {
|
|||
this.log('creating ' + opts.requiredCopayers + ' of ' + opts.totalCopayers + ' wallet');
|
||||
|
||||
this.id = opts.id || Wallet.getRandomId();
|
||||
this.lock = new WalletLock(this.storage, this.id, opts.lockTimeOutMin);
|
||||
this.lock = new WalletLock(this.storage, this.id, opts.lockTimeOutMin);
|
||||
|
||||
|
||||
this.name = opts.name;
|
||||
|
|
@ -777,7 +776,7 @@ Wallet.prototype.createPaymentTx = function(options, cb) {
|
|||
options.uri = options.uri || options.url;
|
||||
|
||||
if (options.uri.indexOf('bitcoin:') === 0) {
|
||||
options.uri = parseBitcoinURI(options.uri).merchant;
|
||||
options.uri = new bitcore.BIP21(options.uri).data.merchant;
|
||||
if (!options.uri) {
|
||||
return cb(new Error('No URI.'));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue