aboutsummaryrefslogtreecommitdiffstats
path: root/lib/register.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/register.js')
-rw-r--r--lib/register.js6
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}` }