fix import QR code from main scan button

This commit is contained in:
JDonadio 2017-03-08 16:19:29 -03:00
commit 8013781043
2 changed files with 9 additions and 2 deletions

View file

@ -327,7 +327,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,