Enable input in bits/BTC to reload the debit card

This commit is contained in:
Gustavo Maximiliano Cortez 2017-03-27 11:31:46 -03:00
commit bc2d530e90
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
13 changed files with 84 additions and 101 deletions

View file

@ -53,30 +53,6 @@ angular.module('copayApp.services').factory('glideraService', function($http, $l
return 'USD';
};
root.parseAmount = function(amount, currency) {
var config = configService.getSync().wallet.settings;
var satToBtc = 1 / 100000000;
var unitToSatoshi = config.unitToSatoshi;
var amountUnitStr;
// IF 'USD'
if (currency) {
amountUnitStr = $filter('formatFiatAmount')(amount) + ' ' + currency;
} else {
var amountSat = parseInt((amount * unitToSatoshi).toFixed(0));
amountUnitStr = txFormatService.formatAmountStr(amountSat);
// convert unit to BTC
amount = (amountSat * satToBtc).toFixed(8);
currency = 'BTC';
}
return {
amount: amount,
currency: currency,
amountUnitStr: amountUnitStr
};
};
root.getSignupUrl = function() {
return credentials.HOST + '/register';
}