Merge pull request #172 from Bitcoin-com/wallet/hotfix/372

Wallet/hotfix/372
This commit is contained in:
Sam Cheng Hung 2018-06-12 10:44:30 +05:30 committed by GitHub
commit 9c26d1bec6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 15 deletions

View file

@ -80,7 +80,7 @@
"load-grunt-tasks": "^3.5.0",
"shelljs": "^0.3.0",
"android-versions": "^1.2.1",
"bitcoincashjs": "^0.1.7"
"bitcoincashjs-fork": "^1.0.3"
},
"scripts": {
"postinstall": "bower install",

View file

@ -1,5 +1,5 @@
var bitcoinCashJsModule = angular.module('bitcoinCashJsModule', []);
var bchjs = require('../node_modules/bitcoincashjs');
var bchjs = require('../node_modules/bitcoincashjs-fork');
bitcoinCashJsModule.constant('MODULE_VERSION', '1.0.0');

View file

@ -104,12 +104,12 @@ angular.module('copayApp.controllers').controller('searchController', function($
};
$scope.searchOnBlockchain = function(searchTerm) {
const url = 'https://explorer.bitcoin.com/'+$scope.wallet.coin+'/search/' + searchTerm;
const optIn = true;
const title = null;
const message = gettextCatalog.getString('Search on Explorer.Bitcoin.com');
const okText = gettextCatalog.getString('Open Explorer');
const cancelText = gettextCatalog.getString('Go Back');
var url = 'https://explorer.bitcoin.com/'+$scope.wallet.coin+'/search/' + searchTerm;
var optIn = true;
var title = null;
var message = gettextCatalog.getString('Search on Explorer.Bitcoin.com');
var okText = gettextCatalog.getString('Open Explorer');
var cancelText = gettextCatalog.getString('Go Back');
externalLinkService.open(url, optIn, title, message, okText, cancelText);
};

View file

@ -60,11 +60,14 @@ angular.module('copayApp.controllers').controller('tabScanController', function(
});
$scope.$on("$ionicView.afterEnter", function() {
// try initializing and refreshing status any time the view is entered
if(!scannerService.isInitialized()) {
scannerService.gentleInitialize();
var capabilities = scannerService.getCapabilities();
if (capabilities.hasPermission) {
// try initializing and refreshing status any time the view is entered
if(!scannerService.isInitialized()) {
scannerService.gentleInitialize();
}
activate();
}
activate();
});
function activate(){

View file

@ -1179,12 +1179,13 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
if (signedTxp.status == 'accepted') {
ongoingProcess.set('broadcastingTx', true, customStatusHandler);
function handleBroadcastTx(err, broadcastedTxp) {
var handleBroadcastTx = function(err, broadcastedTxp) {
ongoingProcess.set('broadcastingTx', false, customStatusHandler);
if (err) return cb(bwcError.msg(err));
if (err) return cb(bwcError.msg(err));
$rootScope.$emit('Local/TxAction', wallet.id);
return cb(null, broadcastedTxp);
}
};
if (signedTxp.payProUrl && signedTxp.coin == 'bch') {
payproService.broadcastBchTx(signedTxp, handleBroadcastTx);