GetFee's GetChain from msg.TargetAsset, not msg.Destination
Credit to Bas1c for finding that Address-received GetChain
(used for handler_swap.go GetFee
) cannot distinguish between ETHChain and AVAXChain,
as well as for the suggestion of using TargetAsset to determine chain instead.
Merge request reports
Activity
159 159 ctx.Logger().Info("receive MsgSwap", "request tx hash", msg.Tx.ID, "source asset", msg.Tx.Coins[0].Asset, "target asset", msg.TargetAsset, "signer", msg.Signer.String()) 160 160 version := h.mgr.GetVersion() 161 161 switch { 162 case version.GTE(semver.MustParse("1.8.0")): changed this line in version 3 of the diff
172 174 } 173 175 } 174 176 175 func (h SwapHandler) handleV95(ctx cosmos.Context, msg MsgSwap) (*cosmos.Result, error) { 177 func (h SwapHandler) handleV98(ctx cosmos.Context, msg MsgSwap) (*cosmos.Result, error) { 176 178 // test that the network we are running matches the destination network 177 if !common.GetCurrentChainNetwork().SoftEquals(msg.Destination.GetNetwork(h.mgr.GetVersion(), msg.Destination.GetChain())) { 179 if !common.GetCurrentChainNetwork().SoftEquals(msg.Destination.GetNetwork(h.mgr.GetVersion(), msg.TargetAsset.GetChain())) { changed this line in version 3 of the diff
added 6 commits
-
aa2e3bd9...996993b4 - 4 commits from branch
thorchain:develop
- 08237710 - handler_swap.go handleV98, no logic changes
- 7bcdcf02 - GetChain (and fee) from target asset, not address
-
aa2e3bd9...996993b4 - 4 commits from branch
added 4 commits
-
7bcdcf02...cc36a3f3 - 2 commits from branch
thorchain:develop
- da39e91f - handler_swap.go handleV98, no logic changes
- 6e9b6e42 - GetChain (and fee) from target asset, not address
-
7bcdcf02...cc36a3f3 - 2 commits from branch
added 9 commits
-
6e9b6e42...db3c98a8 - 7 commits from branch
thorchain:develop
- 85e78e1e - Comments and handler_swap V98, no logic changes
- 6c480c77 - GetChain (and fee) from target asset, not address
-
6e9b6e42...db3c98a8 - 7 commits from branch
( @the_eridanus / @ursa9r / @son-of-odin / @AsmundTHORSec )
Approvals reset from manual rebase (merge conflict with !2605 (merged)).changed milestone to %Release-1.98.0
Please register or sign in to reply