fix type
This commit is contained in:
parent
4821567b1d
commit
7a610c1b5b
4 changed files with 5 additions and 5 deletions
|
|
@ -378,7 +378,6 @@ angular.module('copayApp.controllers').controller('SendController',
|
|||
$scope.getAvailableAmount = function() {
|
||||
if (!$rootScope.safeUnspentCount) return null;
|
||||
|
||||
// Each signature takes
|
||||
var estimatedFee = copay.Wallet.estimatedFee($rootScope.safeUnspentCount);
|
||||
var amount = ((($rootScope.availableBalance * w.settings.unitToSatoshi).toFixed(0) - estimatedFee) / w.settings.unitToSatoshi);
|
||||
|
||||
|
|
|
|||
|
|
@ -2335,9 +2335,8 @@ Wallet.prototype.createTx = function(toAddress, amountSatStr, comment, opts, cb)
|
|||
var ntxid;
|
||||
try {
|
||||
ntxid = self.createTxSync(toAddress, amountSatStr, comment, safeUnspent, opts);
|
||||
log.debub('TX Created: ntxid', ntxid); //TODO
|
||||
log.debug('TX Created: ntxid', ntxid); //TODO
|
||||
} catch (e) {
|
||||
console.log('[Wallet.js.2340]', e); //TODO
|
||||
return cb(e);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ describe("Unit: Controllers", function() {
|
|||
beforeEach(inject(function($controller, $rootScope) {
|
||||
scope = $rootScope.$new();
|
||||
$rootScope.iden = sinon.stub();
|
||||
$rootScope.safeUnspentCount = 1;
|
||||
|
||||
var w = {};
|
||||
w.isReady = sinon.stub().returns(true);
|
||||
|
|
@ -467,6 +468,7 @@ describe("Unit: Controllers", function() {
|
|||
expect(form.amount.$pristine).to.equal(false);
|
||||
});
|
||||
it('should return available amount', function() {
|
||||
form.amount.$setViewValue(123356);
|
||||
var amount = scope.getAvailableAmount();
|
||||
expect(amount).to.equal(123356);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@
|
|||
<div class="row collapse m0">
|
||||
<div class="large-6 columns">
|
||||
<form name="sendForm" ng-submit="submitForm(sendForm)" novalidate>
|
||||
<p class="text-warning size-12"
|
||||
<p class="text-warning size-16"
|
||||
ng-show="error">
|
||||
<i class="fi-x"></i>
|
||||
<i class="fi-alert"></i>
|
||||
{{error|translate}}
|
||||
</p>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue