mirror of https://github.com/BTCPrivate/copay.git
add old scanner to tab send
This commit is contained in:
parent
c932e0d23c
commit
b17e38dea2
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('tabSendController', function($scope, $rootScope, $log, $timeout, $ionicScrollDelegate, addressbookService, profileService, lodash, $state, walletService, incomingData, popupService, platformInfo, bwcError, gettextCatalog) {
|
||||
angular.module('copayApp.controllers').controller('tabSendController', function($scope, $rootScope, $log, $timeout, $ionicScrollDelegate, addressbookService, profileService, lodash, $state, walletService, incomingData, popupService, platformInfo, bwcError, gettextCatalog, scannerService) {
|
||||
|
||||
var originalList;
|
||||
var CONTACTS_SHOW_LIMIT;
|
||||
|
@ -120,7 +120,20 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
|
|||
};
|
||||
|
||||
$scope.openScanner = function() {
|
||||
var isWindowsPhoneApp = platformInfo.isWP && platformInfo.isCordova;
|
||||
|
||||
if (!isWindowsPhoneApp) {
|
||||
$state.go('tabs.scan');
|
||||
return;
|
||||
}
|
||||
|
||||
scannerService.useOldScanner(function(err, contents) {
|
||||
if (err) {
|
||||
popupService.showAlert(gettextCatalog.getString('Error'), err);
|
||||
return;
|
||||
}
|
||||
incomingData.redir(contents);
|
||||
});
|
||||
};
|
||||
|
||||
$scope.showMore = function() {
|
||||
|
|
Loading…
Reference in New Issue