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

🪣 Reinforce Transaction Related Flows on the Client #8791

Open
timolegros opened this issue Aug 7, 2024 · 0 comments
Open

🪣 Reinforce Transaction Related Flows on the Client #8791

timolegros opened this issue Aug 7, 2024 · 0 comments
Labels
5 Few days task enhancement New feature or request

Comments

@timolegros
Copy link
Collaborator

timolegros commented Aug 7, 2024

Describe the bug

We have 2 flows (that I know of) on the client that are extremely brittle because they require both a transaction and an API request to complete successfully in the same sequence to result in a 'success' state:

These flows are brittle because if the transaction succeeds but the user exits the browser or loses their network connection before the API request can complete, the user is left in an inconsistent state. For example, if a user creates a namespace with a txn but the subsequent API request fails, the namespace they created is now reserved and they must start again with a completely new namespace. The reverse is also problematic, if the transaction and API request for creating a namespace initially succeed but the transaction is removed from the chain during a reorganization, the database will still store the namespace info (address/name) but it will no longer exist on-chain (this scenario is rare but arguably worse from a user perspective).

We need to build flows that are resilient to such issues. Possible strategies include:

  • Require a certain number of confirmations before a transaction is considered final
  • Separate the transaction and API request into separate steps e.g.:
    • Create the namespace with a transaction
    • "Attach" to community in the next step
      • If this step fails we can prompt the user to retry completing their namespace integration by querying the chain directly for the associated namespace
  • Use Alchemy-reinforced transactions

Outcomes

  • Research and reinforce all transaction-related flows on the client
  • Define a pattern for future transaction flows that are inherently resistant to transaction or API failures.

Additional context

Related to:

@timolegros timolegros added enhancement New feature or request 5 Few days task labels Aug 7, 2024
@timolegros timolegros changed the title Reinforce Transaction Related Flows on the Client 🪣 Reinforce Transaction Related Flows on the Client Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 Few days task enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant