Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add button to drop 'unstarted' txs #80

Closed
wants to merge 4 commits into from

Conversation

Farber98
Copy link
Collaborator

@Farber98 Farber98 commented Jun 26, 2024

Description

Under Settings > Key Managment > EVM Chain Accounts > Admin, we already have a button to “abandon all current transactions”.

When clicked, this button hits the /v2/keys/evm/chain endpoint. It will call the Reset method which ends up calling TxStore Abandon method. If we take a look at the EVM implementation, we can see that this button UPDATES evm.txes table to set as abandoned all transactions that are IN ('unconfirmed', 'in_progress', 'unstarted') states for given evm_chain_id and from_address.

Despite some similarities, we need something different.

Through this PR we are adding a new button that optionally receives a subject as a text field and only drops the 'unstarted' txs. The key differences are that:

  • We want to DELETE rather than UPDATE txs to 'abandoned'.
  • We are only interested in 'unstarted' txs and not 'unconfirmed'or 'in_progress' ones.
  • We want an additional text field to optionally send a subject to the API.

Resources

  • Placeholder for the upcoming txmgr PR, actively being worked by Narcis.
  • BCI-2563

Steps to Test

  1. yarn && yarn setup
  2. yarn start
  3. ...etc

Checklist

If this PR creates changes to the operator-ui itself, rather than tests, pipeline changes, etc. Then please create a changeset so that a new release is created, and the changelog is updated. See: https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md#what-is-a-changeset

  • This PR has an accompanying changeset if needed.

@Farber98 Farber98 self-assigned this Jun 26, 2024
Copy link
Collaborator Author

@Farber98 Farber98 Jun 26, 2024

Choose a reason for hiding this comment

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

Assuming we keep the ENDPOINT = '/v2/keys/evm/chain' for this button

@cl-sonarqube-production
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
33.3% Coverage on New Code (required ≥ 75%)
3.1% Duplication on New Code (required ≤ 3%)
8 New Major Issues (required ≤ 5)

See analysis details on SonarQube

Catch issues before they fail your Quality Gate with our IDE extension SonarLint SonarLint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant