File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,8 @@ class LoopApi extends BaseApi<LoopEvents> {
91
91
const req = new LOOP . LoopInRequest ( ) ;
92
92
req . setAmt ( amount . toString ( ) ) ;
93
93
req . setMaxSwapFee ( quote . swapFee . toString ( ) ) ;
94
- req . setMaxMinerFee ( quote . minerFee . toString ( ) ) ;
94
+ // mimic the behavior of loop CLI to avoid swap failures due to rising chain fees
95
+ req . setMaxMinerFee ( quote . minerFee . mul ( 250 ) . toString ( ) ) ;
95
96
req . setInitiator ( LOOP_INITIATOR ) ;
96
97
if ( lastHop ) req . setLastHop ( b64 ( lastHop ) ) ;
97
98
if ( confTarget ) req . setHtlcConfTarget ( confTarget ) ;
@@ -113,7 +114,8 @@ class LoopApi extends BaseApi<LoopEvents> {
113
114
const req = new LOOP . LoopOutRequest ( ) ;
114
115
req . setAmt ( amount . toString ( ) ) ;
115
116
req . setMaxSwapFee ( quote . swapFee . toString ( ) ) ;
116
- req . setMaxMinerFee ( quote . minerFee . toString ( ) ) ;
117
+ // mimic the behavior of loop CLI to avoid swap failures due to rising chain fees
118
+ req . setMaxMinerFee ( quote . minerFee . mul ( 250 ) . toString ( ) ) ;
117
119
req . setMaxPrepayAmt ( quote . prepayAmount . toString ( ) ) ;
118
120
req . setMaxSwapRoutingFee ( this . _calcRoutingFee ( amount ) . toString ( ) ) ;
119
121
req . setMaxPrepayRoutingFee ( this . _calcRoutingFee ( quote . prepayAmount ) . toString ( ) ) ;
You can’t perform that action at this time.
0 commit comments