Skip to content

Conversation

@danjm
Copy link
Contributor

@danjm danjm commented Mar 30, 2021

Found during QA of v9.3.0

  • on binance, swap an ERC20 token to any other token, but don't swap away all of your tokens
  • this will require the "approval" fee on the first swap
  • then try to swap the same token again, every request for quotes will fail

The problem was that we had one hard coded instance of the mainnet swaps contract address. This was being used when checking whether a token had been approved. This PR fixes the issue by making the contract address network specific via SWAPS_CHAINID_CONTRACT_ADDRESS_MAP[chainId]

@danjm danjm requested a review from a team as a code owner March 30, 2021 18:31
@danjm danjm requested a review from darkwing March 30, 2021 18:31
@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot
Copy link
Collaborator

Builds ready [0425660]
Page Load Metrics (584 ± 58 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint47725884
domContentLoaded35882758212158
load36082858412058
domInteractive35882658212158

Copy link
Contributor

@darkwing darkwing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, my swaps all worked great!

@danjm danjm merged commit 2dadf43 into develop Mar 30, 2021
@danjm danjm deleted the contract-address-swaps-approval-check branch March 30, 2021 18:55
@github-actions github-actions bot locked and limited conversation to collaborators Mar 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants