aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2019-01-02 20:29:04 -0800
committerAdam Soltys <[email protected]>2019-02-05 20:53:45 -0800
commit248fa476eba281c4b96cc18bbab61358dea45977 (patch)
tree5b86d02dd3e0660c1ca8bc05033315efc90d183b
parentf66684433bac3a756336861731cbff68ed4946f2 (diff)
downloadcoinos-server-248fa476eba281c4b96cc18bbab61358dea45977.tar.gz
coinos-server-248fa476eba281c4b96cc18bbab61358dea45977.zip
confirm friends payments
-rw-r--r--index.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/index.js b/index.js
index 5f3e8228..4d5b68fa 100644
--- a/index.js
+++ b/index.js
@@ -184,8 +184,11 @@ const l = console.log
let tip = null
if (invoices.length) tip = invoices[0].tip
+ let confirmed = false
+
if (user.friend)
user.balance += o.value
+ confirmed = true
else
user.pending += o.value
@@ -200,7 +203,7 @@ const l = console.log
rate: app.get('rates').ask,
received: true,
tip,
- confirmed: false,
+ confirmed,
})
socket.to(sids[user.username]).emit('tx', message)