Adds support for EUR and GBP currencies

This commit is contained in:
Gustavo Maximiliano Cortez 2017-06-01 17:16:42 -03:00
commit e0eb06156e
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
5 changed files with 30 additions and 5 deletions

View file

@ -7,7 +7,7 @@ angular.module('copayApp.services').factory('bitpayCardService', function($log,
$log.error(msg);
var error = (e && e.data && e.data.error) ? e.data.error : msg;
return error;
};
};
var _processTransactions = function(invoices, history) {
invoices = invoices ||  [];
@ -41,6 +41,16 @@ angular.module('copayApp.services').factory('bitpayCardService', function($log,
return history;
};
root.getAvailableCurrency = function() {
var config = configService.getSync().wallet.settings;
// ONLY "USD", "EUR" and "GBP"
switch (config.alternativeIsoCode) {
case 'EUR': return 'EUR';
case 'GBP': return 'GBP';
default: return 'USD'
};
};
root.sync = function(apiContext, cb) {
var json = {
method: 'getDebitCards'