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 /liquidPayments.js | |
| parent | e527ae46599e3328917a8d84fb49751c955d5cbd (diff) | |
| download | coinos-server-5eb6950c8f6dfea83c230c403c51c64234f23e3d.tar.gz coinos-server-5eb6950c8f6dfea83c230c403c51c64234f23e3d.zip | |
generate new address on receive
Diffstat (limited to 'liquidPayments.js')
| -rw-r--r-- | liquidPayments.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/liquidPayments.js b/liquidPayments.js index 6498be40..19e1d8e7 100644 --- a/liquidPayments.js +++ b/liquidPayments.js @@ -65,6 +65,10 @@ module.exports = (app, db, addresses, payments, emit) => { user.pending += value; } + user.confidential = await bc.getNewAddress(); + user.liquid = (await bc.getAddressInfo(user.confidential)).unconfidential; + addresses[user.liquid] = user.username; + await user.save(); emit(user.username, "user", user); |
