mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-08 13:52:58 +00:00
Add wallet budget enforcement for NWC payments
This commit is contained in:
1 parent
7d41964bf5
commit
98ea36bd93
6 files changed
+745
-13
No files matched your search
@@ -303,9 +303,13 @@ export default class ZapController {
|
||||
})
|
||||
.find((message) => message);
|
||||
|
||||
const budgetReceipt = failureReceipts.find((receipt) =>
|
||||
isZapAllowanceExhaustedError(receipt?.error)
|
||||
);
|
||||
const isBudgetExceeded =
|
||||
typeof failureMessage === "string" &&
|
||||
/budget exceeded/i.test(failureMessage);
|
||||
Boolean(budgetReceipt) ||
|
||||
(typeof failureMessage === "string" &&
|
||||
/budget exceeded/i.test(failureMessage));
|
||||
|
||||
let warningMessage;
|
||||
if (isBudgetExceeded) {
|
||||
|
||||
Reference in new issue
Block a user