Merge pull request #5740 from JDonadio/bug/import-qr

Fix import QR code from main scan button
This commit is contained in:
Gabriel Edgardo Bazán 2017-03-08 17:06:13 -03:00 committed by GitHub
commit b9fa8bcb21
2 changed files with 9 additions and 2 deletions

View file

@ -328,7 +328,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
}
})
.state('tabs.add.import', {
url: '/import',
url: '/import/:code',
views: {
'tab-home@tabs': {
templateUrl: 'views/import.html',

View file

@ -220,8 +220,15 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
data: data,
type: 'privateKey'
});
} else {
} else if (data && ((data.substring(0, 2) == '1|') || (data.substring(0, 2) == '2|') || (data.substring(0, 2) == '3|'))) {
$state.go('tabs.home').then(function() {
$state.transitionTo('tabs.add.import', {
code: data
});
});
return true;
} else {
if ($state.includes('tabs.scan')) {
root.showMenu({
data: data,