File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,9 @@ function SupportAlby() {
70
70
return ;
71
71
}
72
72
73
- const maxAmount = Math . floor ( parsedAmount * 1.01 ) + 10 ; // with fee reserve
73
+ // TODO: extract below code as is duplicated with ZapPlanner
74
+ // with fee reserve of max(1% or 10 sats) + 30% to avoid nwc_budget_warning (see transactions service)
75
+ const maxAmount = Math . floor ( ( parsedAmount * 1.01 + 10 ) * 1.3 ) ;
74
76
const isolated = false ;
75
77
76
78
const createAppRequest : CreateAppRequest = {
Original file line number Diff line number Diff line change @@ -118,7 +118,8 @@ export function ZapPlanner() {
118
118
throw new Error ( "Invalid amount" ) ;
119
119
}
120
120
121
- const maxAmount = Math . floor ( parsedAmount * 1.01 ) + 10 ; // with fee reserve
121
+ // with fee reserve of max(1% or 10 sats) + 30% to avoid nwc_budget_warning (see transactions service)
122
+ const maxAmount = Math . floor ( ( parsedAmount * 1.01 + 10 ) * 1.3 ) ;
122
123
const isolated = false ;
123
124
124
125
const createAppRequest : CreateAppRequest = {
You can’t perform that action at this time.
0 commit comments