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> {
9191 const req = new LOOP . LoopInRequest ( ) ;
9292 req . setAmt ( amount . toString ( ) ) ;
9393 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 ( ) ) ;
9596 req . setInitiator ( LOOP_INITIATOR ) ;
9697 if ( lastHop ) req . setLastHop ( b64 ( lastHop ) ) ;
9798 if ( confTarget ) req . setHtlcConfTarget ( confTarget ) ;
@@ -113,7 +114,8 @@ class LoopApi extends BaseApi<LoopEvents> {
113114 const req = new LOOP . LoopOutRequest ( ) ;
114115 req . setAmt ( amount . toString ( ) ) ;
115116 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 ( ) ) ;
117119 req . setMaxPrepayAmt ( quote . prepayAmount . toString ( ) ) ;
118120 req . setMaxSwapRoutingFee ( this . _calcRoutingFee ( amount ) . toString ( ) ) ;
119121 req . setMaxPrepayRoutingFee ( this . _calcRoutingFee ( quote . prepayAmount ) . toString ( ) ) ;
You can’t perform that action at this time.
0 commit comments