Merge pull request #503 from cmgustavo/bug/scan-qr-01

Fixes the back button after scan a qr code
This commit is contained in:
Matias Alejo Garcia 2016-10-17 18:23:05 -03:00 committed by GitHub
commit c49e8474f5
1 changed files with 5 additions and 3 deletions

View File

@ -1,11 +1,11 @@
'use strict';
angular.module('copayApp.services').factory('incomingData', function($log, $state, $window, bitcore, lodash) {
angular.module('copayApp.services').factory('incomingData', function($log, $state, $window, $timeout, bitcore, lodash) {
var root = {};
root.redir = function(data) {
$log.debug('Processing incoming data:' +data);
$log.debug('Processing incoming data: ' + data);
function sanitizeUri(data) {
// Fixes when a region uses comma to separate decimals
@ -53,7 +53,9 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
var amount = parsed.amount ? parsed.amount : '';
$state.go('tabs.send').then(function() {
$state.go('tabs.send');
// Timeout is required to enable the "Back" button
$timeout(function() {
if (parsed.r) {
$state.transitionTo('tabs.send.confirm', {paypro: parsed.r});
} else {