Moved the fix for reading the QR code higher up the call stack, so it would only be used when needed.
This commit is contained in:
parent
6ec9a3af68
commit
576bb2098a
2 changed files with 3 additions and 4 deletions
|
|
@ -105,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,10 +11,6 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
|
|||
root.redir = function(data, shapeshiftData) {
|
||||
var originalAddress = null;
|
||||
var noPrefixInAddress = 0;
|
||||
|
||||
// Sometimes (testing in Chrome, when reading QR Code) data is an object
|
||||
// that has a string data.result.
|
||||
data = data.result || data;
|
||||
|
||||
if (data.toLowerCase().indexOf('bitcoin') < 0) {
|
||||
noPrefixInAddress = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue