diff options
| author | Adam Soltys <[email protected]> | 2020-01-27 09:52:01 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2020-01-27 09:52:01 -0800 |
| commit | 5eb6950c8f6dfea83c230c403c51c64234f23e3d (patch) | |
| tree | f0973cc09177990457b1fe338b0d25082ed36a01 /bitcoinPayments.js | |
| parent | e527ae46599e3328917a8d84fb49751c955d5cbd (diff) | |
| download | coinos-server-5eb6950c8f6dfea83c230c403c51c64234f23e3d.tar.gz coinos-server-5eb6950c8f6dfea83c230c403c51c64234f23e3d.zip | |
generate new address on receive
Diffstat (limited to 'bitcoinPayments.js')
| -rw-r--r-- | bitcoinPayments.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bitcoinPayments.js b/bitcoinPayments.js index 90d7836a..abdc072d 100644 --- a/bitcoinPayments.js +++ b/bitcoinPayments.js @@ -71,9 +71,10 @@ module.exports = (app, bc, db, addresses, payments, emit) => { user.pending += o.value; } + user.address = await bc.getNewAddress("", "bech32"); + addresses[user.address] = user.username; await user.save(); emit(user.username, "user", user); - l("output:", o); const payment = await db.Payment.create({ user_id: user.id, |
