mirror of https://github.com/BTCPrivate/copay.git
send form
This commit is contained in:
parent
22a533377b
commit
38495f11b7
|
@ -3,7 +3,7 @@ var bitcore = require('bitcore');
|
||||||
var preconditions = require('preconditions').singleton();
|
var preconditions = require('preconditions').singleton();
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('SendController',
|
angular.module('copayApp.controllers').controller('SendController',
|
||||||
function($scope, $rootScope, $window, $timeout, $modal, $filter, notification, isMobile, rateService, txStatus) {
|
function($scope, $rootScope, $window, $timeout, $modal, $filter, notification, isMobile, rateService, txStatus, isCordova) {
|
||||||
|
|
||||||
var satToUnit;
|
var satToUnit;
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ angular.module('copayApp.controllers').controller('SendController',
|
||||||
}
|
}
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$rootScope.$digest();
|
$rootScope.$digest();
|
||||||
}, 1);
|
}, 100);
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.setInputs = function() {
|
$scope.setInputs = function() {
|
||||||
|
@ -178,6 +178,11 @@ angular.module('copayApp.controllers').controller('SendController',
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.loading = true;
|
$scope.loading = true;
|
||||||
|
$scope.creatingTX = true;
|
||||||
|
if ($scope.isWindowsPhoneApp)
|
||||||
|
$rootScope.wpInputFocused = true;
|
||||||
|
|
||||||
|
$timeout(function () {
|
||||||
var comment = form.comment.$modelValue;
|
var comment = form.comment.$modelValue;
|
||||||
var merchantData = $scope._merchantData;
|
var merchantData = $scope._merchantData;
|
||||||
var address, amount;
|
var address, amount;
|
||||||
|
@ -191,13 +196,18 @@ angular.module('copayApp.controllers').controller('SendController',
|
||||||
toAddress: address,
|
toAddress: address,
|
||||||
amountSat: amount,
|
amountSat: amount,
|
||||||
comment: comment,
|
comment: comment,
|
||||||
}, function(err, txid, status) {
|
}, function (err, txid, status) {
|
||||||
$scope.loading = false;
|
$scope.loading = false;
|
||||||
|
$scope.creatingTX = false;
|
||||||
|
if ($scope.isWindowsPhoneApp)
|
||||||
|
$rootScope.wpInputFocused = false;
|
||||||
|
|
||||||
if (err)
|
if (err)
|
||||||
return $scope.setError(err);
|
return $scope.setError(err);
|
||||||
txStatus.notify(status);
|
txStatus.notify(status);
|
||||||
$scope.resetForm();
|
$scope.resetForm();
|
||||||
});
|
});
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// QR code Scanner
|
// QR code Scanner
|
||||||
|
|
|
@ -29,7 +29,23 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" ng-show="!fetchingURL">
|
<div class="row" ng-show="creatingTX">
|
||||||
|
<div class="large-12 columns">
|
||||||
|
<div class="panel">
|
||||||
|
<div class="box-notification">
|
||||||
|
<div class="box-icon secondary">
|
||||||
|
<i class="fi-bitcoin-circle icon-rotate spinner size-24"></i>
|
||||||
|
</div>
|
||||||
|
<span class="text-secondary size-14">
|
||||||
|
Creating Transaction...
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row" ng-show="!fetchingURL && !creatingTX">
|
||||||
<div class="large-8 large-centered columns">
|
<div class="large-8 large-centered columns">
|
||||||
<form name="sendForm" ng-submit="submitForm(sendForm)" novalidate>
|
<form name="sendForm" ng-submit="submitForm(sendForm)" novalidate>
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
|
|
Loading…
Reference in New Issue