aboutsummaryrefslogtreecommitdiffstats
path: root/HANDOFF.md
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-06-27 11:52:58 -0700
committerAdam Soltys <[email protected]>2026-06-27 11:52:58 -0700
commit76eacb57aeaddc08b122005b8c142021d0a41ed5 (patch)
tree66e7d938907b06d5e91287e37c6cc083c4a918b6 /HANDOFF.md
parent3c79da0976b8b1c5c5ce7d5ea1b90221b1a96b48 (diff)
downloadcoinosv3-76eacb57aeaddc08b122005b8c142021d0a41ed5.tar.gz
coinosv3-76eacb57aeaddc08b122005b8c142021d0a41ed5.zip
Add a per-wallet settings page (cog from the accounts list)
The accounts list now shows a settings cog (instead of a rename pencil) that opens a per-wallet settings page: edit name, set auto-logout (moved here from the global settings tab), reveal the recovery phrase, and show the public key (zpub) — all read from the account itself, so it works for any wallet, not just the active one. Room for more per-wallet settings later. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Diffstat (limited to 'HANDOFF.md')
0 files changed, 0 insertions, 0 deletions
me the previous revision' href='/coinos-server.git/blame/lightningPayments.js?h=tdex&id=087fdd27f3683a1deb9376b7a72aa608e6fd8e6a'>^
3b841f05 ^

b0e279af ^
c3ed4317 ^
765c6a42 ^

3b841f05 ^
765c6a42 ^
43c2abbe ^
765c6a42 ^
b0e279af ^
3b841f05 ^
765c6a42 ^







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

                            












                                                         

                             
                            

                                                   
                             
                                     

                         
                      
                                       
                                                                        
 
                                            
                                      







                                              
const l = require("pino")();

module.exports = (app, db, lna, lnb, emit, payments) => {
  const handlePayment = async msg => {
    if (!msg.settled) return;

    let payment = await db.Payment.findOne({
      include: { model: db.User, as: "user" },
      where: {
        hash: msg.payment_request
      }
    });

    if (!payment) return;

    const { user } = payment;

    payment.received = true;
    user.balance += parseInt(msg.value);
    payment.rate = app.get("rates")[user.currency];
    payment.confirmed = true;
    payment.currency = user.currency;

    await payment.save();
    await user.save();
    payments.push(msg.payment_request);
    l.info("lightning payment received", user.username, payment.amount);

    emit(user.username, "payment", payment);
    emit(user.username, "user", user);
  };

  const invoices = lna.subscribeInvoices({});
  invoices.on("data", handlePayment);

  const invoicesb = lnb.subscribeInvoices({});
  invoicesb.on("data", handlePayment);
};