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: Disable transaction buttons until sdk is initialized #4405

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

usame-algan
Copy link
Member

What it solves

Resolves #4404

This should make our e2e tests more robust

How this PR fixes it

  • Adds a check for the sdk inside CheckWallet which will disable all buttons it wraps until the SDK is initialized

How to test it

  1. Create and queue a transaction
  2. Go to the queue
  3. Reload the app
  4. Observe the Confirm button is disabled until the SDK is ready

Checklist

  • I've tested the branch on mobile 📱
  • I've documented how it affects the analytics (if at all) 📊
  • I've written a unit/e2e test for it (if applicable) 🧑‍💻

Copy link

github-actions bot commented Oct 22, 2024

@usame-algan
Copy link
Member Author

@mike10ca The e2e tests can be tested in this PR. Lets see if they still fail as often as before. Do we have a list of e2e test where we know this error happens?

Copy link

github-actions bot commented Oct 22, 2024

📦 Next.js Bundle Analysis for safe-wallet-web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 1014.47 KB (🟡 +73 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Copy link

github-actions bot commented Oct 22, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
74.27% (+0.01% 🔼)
14069/18944
🔴 Branches
52.59% (+0.02% 🔼)
3480/6617
🔴 Functions 58.04% 2053/3537
🟡 Lines
75.89% (+0.01% 🔼)
12781/16841

Test suite run success

1620 tests passing in 217 suites.

Report generated by 🧪jest coverage report action from 6c92cb7

@mike10ca
Copy link
Contributor

@mike10ca The e2e tests can be tested in this PR. Lets see if they still fail as often as before. Do we have a list of e2e test where we know this error happens?

@usame-algan yes, this was associated with sending out an NFT. I tested it locally few times and it seems to work. Let's merge it and observe the tests further.

@usame-algan
Copy link
Member Author

@francovenica I suggest we test the app with different safe versions. Basically we disable a lot of buttons now if the SDK could not be initialized so we need to make sure it still works even with older safe versions where the SDK might not work.

@francovenica
Copy link
Contributor

So for me it works fine, and shows the tooltip about the sdk not being enabled.
image

I tried in old safes versions, safes 1.1.1 and 1.3.0 and I also there I got the button being disabled for a second just with no tooltip.

Since it works fine, let's see if automation works fine now since it is the reason we are doing this mostly

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.

Error when trying to sign/execute transaction too fast after page refresh
5 participants