Skip to content

Conversation

@dan437
Copy link
Contributor

@dan437 dan437 commented Apr 28, 2022

Explanation

We can't allow STX if a regular tx is in progress, otherwise there could be a nonce issue.

Screenshots/Screencaps

Warning notification:
image

Disabled STX button + tooltip explanation:
image

Manual testing steps

  • Do a non-STX swap with the lowest gas limit and low fees per gas, that way you will have a regular tx in progress for a while
  • Try to do a smart transaction, it will be disabled

@dan437 dan437 requested a review from a team as a code owner April 28, 2022 09:31
@dan437 dan437 requested a review from mcmire April 28, 2022 09: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.

};

const disableStxIfRegularTxInProgress = (dispatch, transactions) => {
if (transactions?.length > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we instead do this to prevent large nesting?

if (transactions?.length < 0) {
return;
}

@dan437 dan437 merged commit 9daab6a into MetaMask:develop May 3, 2022
@github-actions github-actions bot locked and limited conversation to collaborators May 3, 2022
@dan437 dan437 deleted the stx-invalid-nonce branch July 24, 2023 11:28
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.

3 participants