aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/createExceptions.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-06-14 12:34:12 -0700
committerAdam Soltys <[email protected]>2026-06-17 07:47:47 -0700
commit51847c5e05ad70e936fd374e01e62e0e4b5e3c72 (patch)
tree83d6c25a90a94e2469e1fae2f7d837cce765a838 /scripts/createExceptions.js
parente55165307096093d769893475a7481c781457f94 (diff)
downloadcoinos-server-51847c5e05ad70e936fd374e01e62e0e4b5e3c72.tar.gz
coinos-server-51847c5e05ad70e936fd374e01e62e0e4b5e3c72.zip
finalize: don't crash on non-integer fee delta (tbRefund NaN)
Port of master 8aba0bc2, adapted to this stack's tbRefund. When xpay's response shape is unexpected (or a zero-amount invoice's decoded amount_msat is undefined) the computed p.fee becomes NaN, and the refund delta crashes the balance write, leaving finalize partial (user loses up to maxfee). Validate the computed fee is a finite integer; if not, keep the originally-reserved maxfee (zero refund, no balance corruption) and warn. Same guard on the refund delta before tbRefund. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Diffstat (limited to 'scripts/createExceptions.js')
0 files changed, 0 insertions, 0 deletions