diff options
| author | Adam Soltys <[email protected]> | 2023-01-25 11:12:17 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-01-25 11:12:17 -0800 |
| commit | be20fa2178f75c35c541d7e77b3f1c0f68b41ac4 (patch) | |
| tree | 2e63cf78aebc6520ef7770455d81d9502e6d66e2 /lib/register.js | |
| parent | b933716cc1fc4a2a785796fb91ed2e3a43c2557c (diff) | |
| download | coinos-server-be20fa2178f75c35c541d7e77b3f1c0f68b41ac4.tar.gz coinos-server-be20fa2178f75c35c541d7e77b3f1c0f68b41ac4.zip | |
default to usd
Diffstat (limited to 'lib/register.js')
| -rw-r--r-- | lib/register.js | 6 |
1 files 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}` } |
