fix mobile scanner when QR code is a paypro
This commit is contained in:
parent
f329284210
commit
a08695e94e
2 changed files with 9 additions and 11 deletions
|
|
@ -941,7 +941,7 @@ input[type='submit']
|
||||||
|
|
||||||
|
|
||||||
input[type=date], input[type=datetime-local], input[type=datetime], input[type=email], input[type=month], input[type=number], input[type=password], input[type=search], input[type=tel], input[type=text], input[type=time], input[type=url], input[type=week], textarea {
|
input[type=date], input[type=datetime-local], input[type=datetime], input[type=email], input[type=month], input[type=number], input[type=password], input[type=search], input[type=tel], input[type=text], input[type=time], input[type=url], input[type=week], textarea {
|
||||||
color: #7A8C9E;
|
color: #343c43;
|
||||||
margin-bottom: 1.3rem;
|
margin-bottom: 1.3rem;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ angular.module('copayApp.controllers').controller('SendController',
|
||||||
$scope.rateService = rateService;
|
$scope.rateService = rateService;
|
||||||
$scope.showScanner = false;
|
$scope.showScanner = false;
|
||||||
$scope.myId = w.getMyCopayerId();
|
$scope.myId = w.getMyCopayerId();
|
||||||
|
$scope.isMobile = isMobile.any();
|
||||||
|
|
||||||
rateService.whenAvailable(function() {
|
rateService.whenAvailable(function() {
|
||||||
$scope.isRateAvailable = true;
|
$scope.isRateAvailable = true;
|
||||||
|
|
@ -96,7 +97,6 @@ angular.module('copayApp.controllers').controller('SendController',
|
||||||
|
|
||||||
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
|
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
|
||||||
window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;
|
window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;
|
||||||
$scope.isMobile = isMobile.any();
|
|
||||||
|
|
||||||
if (!window.cordova && !navigator.getUserMedia)
|
if (!window.cordova && !navigator.getUserMedia)
|
||||||
$scope.disableScanner = 1;
|
$scope.disableScanner = 1;
|
||||||
|
|
@ -287,15 +287,13 @@ angular.module('copayApp.controllers').controller('SendController',
|
||||||
function onSuccess(result) {
|
function onSuccess(result) {
|
||||||
if (result.cancelled) return;
|
if (result.cancelled) return;
|
||||||
|
|
||||||
var bip21 = new bitcore.BIP21(result.text);
|
$timeout(function() {
|
||||||
$scope.address = bip21.address + '';
|
var data = result.text;
|
||||||
$scope.commentText = bip21.data.message;
|
$scope.$apply(function() {
|
||||||
|
$scope.sendForm.address.$setViewValue(result.text);
|
||||||
if (bip21.data.amount) {
|
$scope.sendForm.address.$render();
|
||||||
$scope.amount = bip21.data.amount * bitcore.util.COIN * satToUnit;
|
});
|
||||||
}
|
}, 1000);
|
||||||
|
|
||||||
$rootScope.$digest();
|
|
||||||
},
|
},
|
||||||
function onError(error) {
|
function onError(error) {
|
||||||
alert('Scanning error');
|
alert('Scanning error');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue