From 34f337d7b665688169eee4936603258a6187ff8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Mon, 26 Sep 2016 18:03:00 -0300 Subject: [PATCH] add qr scanner to send tab --- public/views/tab-send.html | 13 ++++++++----- src/js/controllers/tab-send.js | 14 ++++++++++++-- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/public/views/tab-send.html b/public/views/tab-send.html index 29af3f48b..d23a0731f 100644 --- a/public/views/tab-send.html +++ b/public/views/tab-send.html @@ -8,11 +8,14 @@
Recipient
diff --git a/src/js/controllers/tab-send.js b/src/js/controllers/tab-send.js index ce2fb7bd6..18cafd1d1 100644 --- a/src/js/controllers/tab-send.js +++ b/src/js/controllers/tab-send.js @@ -86,8 +86,18 @@ angular.module('copayApp.controllers').controller('tabSendController', function( }); }; - $scope.$on("$ionicView.beforeEnter", function(event, data){ - $scope.formData = { search: null }; + $scope.onQrCodeScanned = function(data) { + if (!incomingData.redir(data)) { + $ionicPopup.alert({ + title: 'Invalid data', + }); + } + }; + + $scope.$on("$ionicView.beforeEnter", function(event, data) { + $scope.formData = { + search: null + }; updateList(); });