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

fix: wait on solana confirmed tx #11515

Merged
merged 2 commits into from
Mar 11, 2024
Merged

Conversation

AdamSchinzel
Copy link
Contributor

Description

Followup on #11033 because I don't have permissions to push to Vaccumlabs fork.

This PR improves both parts of the old PR but still it's not a final solution for handling transaction status on Solana. It would be better to handle it with pending state in transaction list and more or less make it the same UX as on other chains but let's do it later

  1. 1e1a116 - Waiting on transaction status inside the modal is made using the "correct" approach so not using deprecated method. More on how I find the "correct" approach can be found here.
  2. 766c424 - Just UI/UX improvements for the waiting time using loader and different button text.

Screenshots:

Screenshot 2024-03-08 at 2 19 43 PM

Comment on lines +105 to +106
blockhash,
lastValidBlockHeight,
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't these values be based of the blockhash included in the transaction? That's why I originally didn't do it because it would be harder to refactor the code to pass in the correct values.

However I suppose it's not a huge deal, as the only drawback is that the user will simply wait longer for the transaction to fail, but still.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it could be like that because it's working and also some thread on Solana StackOverflow is saying the same

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok. If pending transactions ever are implemented then I'd suggest to fix this part as well to include the blockchash from the transaction and its corresponding lastValidBlockHeight. As I mentioned in the previous comment - the only drawback of the solution in this PR should be longer than necessary wait times for transaction failure.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the difference in blockhashes might be, that the txn will be considered expired later (due to this blockhash being younger than the one in the txn). But success / failure should return normally

@AdamSchinzel AdamSchinzel merged commit 3cb139f into develop Mar 11, 2024
6 of 7 checks passed
@AdamSchinzel AdamSchinzel deleted the fix/wait-on-solana-confirmed-tx branch March 11, 2024 19:29
komret pushed a commit that referenced this pull request Mar 27, 2024
* fix(blockchain-link): confirm solana transactions

* fix(suite): wait on solana transaction confirmation in review

(cherry picked from commit 3cb139f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants