Fix amount input (angular directive)
This commit is contained in:
parent
871099c9c1
commit
29f4e91423
2 changed files with 3 additions and 4 deletions
|
|
@ -91,15 +91,14 @@ angular.module('copayApp.directives')
|
|||
])
|
||||
.directive('validAmount', ['$rootScope', '$locale',
|
||||
function($rootScope, locale) {
|
||||
var w = $rootScope.wallet;
|
||||
preconditions.checkState(w);
|
||||
preconditions.checkState(w.settings.unitToSatoshi);
|
||||
var formats = locale.NUMBER_FORMATS;
|
||||
|
||||
return {
|
||||
require: 'ngModel',
|
||||
link: function(scope, element, attrs, ctrl) {
|
||||
var val = function(value) {
|
||||
var w = $rootScope.wallet;
|
||||
preconditions.checkState(w);
|
||||
var vNum = Number((value * w.settings.unitToSatoshi).toFixed(0));
|
||||
|
||||
if (typeof value == 'undefined') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue