Skip to content

Commit 4fd5d8e

Browse files
committed
fix: handle unsuccessful fund transfers by increasing LP balance
1 parent 10b14d1 commit 4fd5d8e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

contracts/PegInContract.sol

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,10 @@ contract PegInContract is
439439
refundAmount,
440440
success
441441
);
442+
if (!success) {
443+
// transfer funds to LP instead, if for some reason transfer to rskRefundAddress was unsuccessful
444+
_increaseBalance(quote.liquidityProviderRskAddress, refundAmount);
445+
}
442446
}
443447
}
444448

0 commit comments

Comments
 (0)