diff options
| author | Adam Soltys <[email protected]> | 2026-08-07 23:00:25 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-08-07 23:29:26 -0700 |
| commit | 8e7ffe3e33e36396fa7d2c17486e1707a2da4f43 (patch) | |
| tree | d4ed379a210ac1e8913d214f59ed63bdeaaae1a0 /lib/utils.ts | |
| parent | c07dfe050b7c79917744d7eddbf934d319cb9c89 (diff) | |
| download | coinos-server-8e7ffe3e33e36396fa7d2c17486e1707a2da4f43.tar.gz coinos-server-8e7ffe3e33e36396fa7d2c17486e1707a2da4f43.zip | |
users: sum sub-account balances in the deleteSelf guard (S12)
The "withdraw your balance before deleting" guard summed only the main
account, but the deletion loop wipes every sub-account's balance:/pending:
keys unconditionally. A user with dust in the main account and savings in
a sub-account passed the guard and silently lost the sub-account funds.
Sum balance+pending across all ${id}:accounts before refusing.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Diffstat (limited to 'lib/utils.ts')
0 files changed, 0 insertions, 0 deletions
