diff options
| author | Adam Soltys <[email protected]> | 2023-05-21 22:01:42 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-05-21 22:01:45 -0700 |
| commit | 4d042dac524713773a642eb2a061ddb7c57342db (patch) | |
| tree | 27c44be4a89a3872805cf169004c0c4e769d8a55 | |
| parent | 914b29270f673dfa02a1586ab2a9701d1c98fbc8 (diff) | |
| download | coinos-server-4d042dac524713773a642eb2a061ddb7c57342db.tar.gz coinos-server-4d042dac524713773a642eb2a061ddb7c57342db.zip | |
return pots even with zero balance
| -rw-r--r-- | lib/register.js | 6 | ||||
| -rw-r--r-- | routes/payments.js | 2 |
2 files changed, 1 insertions, 7 deletions
diff --git a/lib/register.js b/lib/register.js index 71b8e17d..9f8f927e 100644 --- a/lib/register.js +++ b/lib/register.js @@ -46,12 +46,6 @@ export default async (user, ip, requireChallenge) => { user.otpsecret = authenticator.generateSecret(); user.migrated = true; - let d = ip.split("."); - ip = ((+d[0] * 256 + +d[1]) * 256 + +d[2]) * 256 + +d[3]; - if (Number.isInteger(ip)) { - user.ip = ip; - } - await s(`user:${id}`, user); await s(`user:${username}`, id); await s(`user:${pubkey}`, id); diff --git a/routes/payments.js b/routes/payments.js index 73ffa1df..8857b355 100644 --- a/routes/payments.js +++ b/routes/payments.js @@ -185,7 +185,7 @@ export default { async pot({ params: { name } }, res) { let amount = await g(`pot:${name}`); - if (!amount) return bail(res, "pot not found"); + if (typeof amount === 'undefined') return bail(res, "pot not found"); let payments = (await db.lRange(`pot:${name}:payments`, 0, -1)) || []; payments = await Promise.all(payments.map(hash => g(`payment:${hash}`))); |
