diff options
| author | Adam Soltys <[email protected]> | 2021-06-01 23:26:18 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2021-06-09 16:07:17 -0700 |
| commit | 2873f6901eaed83824aa0bb4c33c77268bb941b3 (patch) | |
| tree | 94429d044ce44360bba5680e52358e7fc8b931fd /lib/rates.js | |
| parent | 386a3e099a1d8169a722549e1db0b71054ea06e8 (diff) | |
| download | coinos-server-2873f6901eaed83824aa0bb4c33c77268bb941b3.tar.gz coinos-server-2873f6901eaed83824aa0bb4c33c77268bb941b3.zip | |
remove pino from start command
Diffstat (limited to 'lib/rates.js')
| -rw-r--r-- | lib/rates.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rates.js b/lib/rates.js index 80c22bf0..598fc041 100644 --- a/lib/rates.js +++ b/lib/rates.js @@ -9,7 +9,7 @@ let fetchRates; try { ({ date, fx } = JSON.parse(fs.readFileSync("fx"))); - } catch { + } catch(e) { l.warn("Failed to read fx file"); } @@ -30,6 +30,7 @@ let fetchRates; } = await axios.get( `http://data.fixer.io/api/latest?access_key=${config.fixer}` ); + let USD = fx["USD"]; Object.keys(fx).map(k => { fx[k] = parseFloat((fx[k] / fx["USD"]).toFixed(6)); |
