From be20fa2178f75c35c541d7e77b3f1c0f68b41ac4 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 25 Jan 2023 11:12:17 -0800 Subject: default to usd --- lib/register.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/register.js b/lib/register.js index 90df18e2..e8b826e3 100644 --- a/lib/register.js +++ b/lib/register.js @@ -24,10 +24,10 @@ export default async (user, ip, requireChallenge) => { user.password = await bcrypt.hash(password, 1); } - if (!config.ipxapi || ip.startsWith("127") || ip.startsWith("192")) { - user.currency = "USD"; - } else { + user.currency = "USD"; + if (config.ipxapi) { let countryCode = "US"; + try { let r = await got(`https://ipxapi.com/api/ip?ip=${ip}`, { headers: { authorization: `Bearer ${config.ipxapi}` } -- cgit v1.2.3