From 2aec283f939759f0a3812377f5f939a3b197bfdf Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 8 Feb 2020 17:55:29 -0500 Subject: default usd --- users.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/users.js b/users.js index e9530ecf..51246dcf 100644 --- a/users.js +++ b/users.js @@ -78,8 +78,10 @@ module.exports = (addresses, auth, app, bc, db, emit) => { if (ip === "127.0.0.1") user.currency = "CAD"; - else - user.currency = countries[(await axios.get(`http://api.ipstack.com/${ip}?access_key=${config.ipstack}`)).data.country_code] || "EUR"; + else { + let info = await axios.get(`http://api.ipstack.com/${ip}?access_key=${config.ipstack}`); + user.currency = countries[info.data.country_code] || "USD"; + } user.currencies = [user.currency]; -- cgit v1.2.3