This commit is contained in:
Ace Nassri 2018-06-22 14:51:01 -07:00
parent 9620c9bb1c
commit 1fa7b44c83
3 changed files with 18 additions and 6 deletions

View file

@ -65,7 +65,7 @@ function _carry (amount) {
*/
function getSupportedCurrencies (call, callback) {
_getCurrencyData((data) => {
callback(null, {currency_codes: data.keys()});
callback(null, {currency_codes: Object.keys(data)});
});
}
@ -91,7 +91,7 @@ function convert (call, callback) {
});
target.fractional = Math.round(target.fractional);
callback(null, {amount: target});
callback(null, {currency_code: request.to_code, amount: target});
});
} catch (err) {
callback(err.message);