Skip to content
Snippets Groups Projects

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

Merge request pipeline #667145928 passed

Merge request pipeline passed for 1a921b14

Test coverage 56.90% (-0.10%) from 1 job
Deployed to integ‎ration‎ 2 years ago
Test summary results are being parsed

Merged by PlutoPluto 2 years ago (Oct 14, 2022 3:05pm UTC)

Loading

Pipeline #667171073 passed

Pipeline passed for 27a9691d on develop

Test coverage 56.90% (-0.10%) from 1 job
Deployed to integ‎ration‎ 2 years ago

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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")):
  • 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())) {
  • closed

  • Multipartite marked this merge request as draft

    marked this merge request as draft

  • reopened

  • Multipartite added 2 commits

    added 2 commits

    • 11761a72 - handler_swap.go handleV98, no logic changes
    • aa2e3bd9 - GetChain (and fee) from target asset, not address

    Compare with previous version

  • Multipartite marked this merge request as ready

    marked this merge request as ready

  • Ursa (9R) approved this merge request

    approved this merge request

  • Eridanus (9R) approved this merge request

    approved this merge request

  • Multipartite added 6 commits

    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

    Compare with previous version

  • Son of Odin approved this merge request

    approved this merge request

  • Multipartite added 4 commits

    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

    Compare with previous version

  • Asmund THORSec approved this merge request

    approved this merge request

  • Multipartite added 9 commits

    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

    Compare with previous version

  • ( @the_eridanus / @ursa9r / @son-of-odin / @AsmundTHORSec )
    Approvals reset from manual rebase (merge conflict with !2605 (merged)).

  • Multipartite changed title from GetChain from msg.TargetAsset, not msg.Destination to GetFee's GetChain from msg.TargetAsset, not msg.Destination

    changed title from GetChain from msg.TargetAsset, not msg.Destination to GetFee's GetChain from msg.TargetAsset, not msg.Destination

  • Eridanus (9R) approved this merge request

    approved this merge request

  • Ursa (9R) approved this merge request

    approved this merge request

  • akrokr approved this merge request

    approved this merge request

  • akrokr changed milestone to %Release-1.98.0

    changed milestone to %Release-1.98.0

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading