Loading
Batch: resolve issues #2747, #2746, #2745, #2743, #2742, #2741, #2729, #2749
Resolve #2747 Resolve #2746 Resolve #2745 Resolve #2743 Resolve #2742 Resolve #2741 Resolve #2729 Resolve #2749
This MR implements the changes described in issues #2747, #2746, #2745, #2743, #2742, #2741, #2729, #2749.
Summary
- #2747: Guard zero
assetDisbursementinclaimingSwapRuneToTCY— skip swap when TCY pool cannot provide meaningful output, preventing non-atomic failure from zero-amount coin transfer - #2746 & #2745: Reorder
redeemSynthAssetToReserveto performSendFromModuleToModulebeforeSetPoolandSetPoolRagnarokStart, and return the error instead of swallowing it — ensures state is only mutated when RUNE transfer succeeds - #2743: Reorder
payPoolRewardsto transfer RUNE from Reserve to Asgard before updating pool'sBalanceRunein state — prevents phantom RUNE on transfer failure - #2742: Only zero
pool.BalanceRuneandpool.PendingInboundRuneinwithdrawLiquidityafter confirmingSendFromModuleToModulesucceeds — preserves accurate accounting on transfer failure - #2741: Replace stale
return errwithreturn nilat end ofwithdrawLiquidity— all errors in tail section are intentionally non-fatal and already logged - #2729: Add
continuewhenGetTxOutfails inmigrateFunds— skip the height instead of using empty TxOut that inflates available coin calculations - #2749: Use
common.NewTxID()instead of directTxIDcast increateSwapToOverSolvency— follows codebase convention of uppercasing TxIDs