Merge pull request #1371 from matiaspando/error/informPasswordNotMatching
Error/inform password not matching
This commit is contained in:
commit
d4ec48aadd
5 changed files with 119 additions and 76 deletions
|
|
@ -7,7 +7,7 @@ angular.module('copayApp.controllers').controller('JoinController',
|
|||
$scope.loading = false;
|
||||
$scope.isMobile = !!window.cordova;
|
||||
|
||||
// QR code Scanner
|
||||
// QR code Scanner
|
||||
var cameraInput;
|
||||
var video;
|
||||
var canvas;
|
||||
|
|
@ -15,14 +15,13 @@ angular.module('copayApp.controllers').controller('JoinController',
|
|||
var context;
|
||||
var localMediaStream;
|
||||
|
||||
$scope.hideAdv=true;
|
||||
|
||||
$scope.hideAdv = true;
|
||||
|
||||
|
||||
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
|
||||
|
||||
if (!window.cordova && !navigator.getUserMedia)
|
||||
$scope.disableScanner =1;
|
||||
if (!window.cordova && !navigator.getUserMedia)
|
||||
$scope.disableScanner = 1;
|
||||
|
||||
var _scan = function(evt) {
|
||||
if (localMediaStream) {
|
||||
|
|
|
|||
|
|
@ -6,17 +6,16 @@ var bignum = bitcore.Bignum;
|
|||
var preconditions = require('preconditions').singleton();
|
||||
|
||||
angular.module('copayApp.directives')
|
||||
.directive('validAddress', ['$rootScope', function($rootScope) {
|
||||
|
||||
.directive('validAddress', ['$rootScope',
|
||||
function($rootScope) {
|
||||
return {
|
||||
require: 'ngModel',
|
||||
link: function(scope, elem, attrs, ctrl) {
|
||||
var validator = function(value) {
|
||||
|
||||
// If we're setting the domain, ignore the change.
|
||||
if ($rootScope.merchant
|
||||
&& $rootScope.merchant.domain
|
||||
&& value === $rootScope.merchant.domain) {
|
||||
if ($rootScope.merchant && $rootScope.merchant.domain && value === $rootScope.merchant.domain) {
|
||||
ctrl.$setValidity('validAddress', true);
|
||||
return value;
|
||||
}
|
||||
|
|
@ -27,6 +26,7 @@ angular.module('copayApp.directives')
|
|||
return value;
|
||||
}
|
||||
|
||||
|
||||
// Bip21 uri
|
||||
if (/^bitcoin:/.test(value)) {
|
||||
var uri = new bitcore.BIP21(value);
|
||||
|
|
@ -41,11 +41,13 @@ angular.module('copayApp.directives')
|
|||
return value;
|
||||
};
|
||||
|
||||
|
||||
ctrl.$parsers.unshift(validator);
|
||||
ctrl.$formatters.unshift(validator);
|
||||
}
|
||||
};
|
||||
}])
|
||||
}
|
||||
])
|
||||
.directive('enoughAmount', ['$rootScope',
|
||||
function($rootScope) {
|
||||
var w = $rootScope.wallet;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue