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:
Brendon Duncan 2018-05-24 18:56:05 -07:00
commit 576bb2098a
2 changed files with 3 additions and 4 deletions

View file

@ -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);
}