From ed0814ebc1e25b428522f80b7a98777be9346276 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Oliveira?= Date: Wed, 3 Nov 2021 21:30:24 +0000 Subject: [PATCH] fix: fx rate value from coincap --- lib/forex.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/forex.js b/lib/forex.js index 0cdcd300..011eb2e4 100644 --- a/lib/forex.js +++ b/lib/forex.js @@ -27,7 +27,7 @@ function getCoinCapFxRate (fiatCode, fiatCodeProperty, rateProperty) { return axios.get('https://api.coincap.io/v2/rates') .then(response => { const fxRates = response.data.data - const fxRate = findCurrencyRates(fxRates, fiatCode, fiatCodeProperty, rateProperty) + const fxRate = new BN(1).div(findCurrencyRates(fxRates, fiatCode, fiatCodeProperty, rateProperty)) return { fxRate }