File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,9 @@ function SupportAlby() {
7070 return ;
7171 }
7272
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 ) ;
7476 const isolated = false ;
7577
7678 const createAppRequest : CreateAppRequest = {
Original file line number Diff line number Diff line change @@ -118,7 +118,8 @@ export function ZapPlanner() {
118118 throw new Error ( "Invalid amount" ) ;
119119 }
120120
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 ) ;
122123 const isolated = false ;
123124
124125 const createAppRequest : CreateAppRequest = {
You can’t perform that action at this time.
0 commit comments