Merge pull request #144 from Bitcoin-com/wallet/task/357
Wallet/task/357
This commit is contained in:
commit
ae38e6efbf
2 changed files with 8 additions and 2 deletions
|
|
@ -61,7 +61,10 @@ angular.module('copayApp.controllers').controller('tabScanController', function(
|
|||
|
||||
$scope.$on("$ionicView.afterEnter", function() {
|
||||
// try initializing and refreshing status any time the view is entered
|
||||
scannerService.gentleInitialize();
|
||||
if(!scannerService.isInitialized()) {
|
||||
scannerService.gentleInitialize();
|
||||
}
|
||||
activate();
|
||||
});
|
||||
|
||||
function activate(){
|
||||
|
|
@ -102,6 +105,9 @@ angular.module('copayApp.controllers').controller('tabScanController', function(
|
|||
function handleSuccessfulScan(contents){
|
||||
$log.debug('Scan returned: "' + contents + '"');
|
||||
scannerService.pausePreview();
|
||||
// Sometimes (testing in Chrome, when reading QR Code) data is an object
|
||||
// that has a string data.result.
|
||||
contents = contents.result || contents;
|
||||
incomingData.redir(contents);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
|
|||
root.redir = function(data, shapeshiftData) {
|
||||
var originalAddress = null;
|
||||
var noPrefixInAddress = 0;
|
||||
|
||||
|
||||
if (data.toLowerCase().indexOf('bitcoin') < 0) {
|
||||
noPrefixInAddress = 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue