safe-global / safe-wallet-web

Safe{Wallet} – smart contract wallet for Ethereum (ex-Gnosis Safe multisig)
https://app.safe.global
GNU General Public License v3.0
311 stars 360 forks source link

chore: Upgrade protocol-kit to v4 #3844

Open usame-algan opened 2 weeks ago

usame-algan commented 2 weeks ago

What it solves

Resolves #3750

ToDos

How this PR fixes it

How to test it

All the flows that require the protocol-kit need to be tested

Checklist

github-actions[bot] commented 2 weeks ago

Branch preview

✅ Deploy successful!

Website: https://upgrade_protocol_kit--walletweb.review.5afe.dev/home?safe=eth:0xA77DE01e157f9f57C7c4A326eeE9C4874D0598b6

Storybook: https://upgrade_protocol_kit--walletweb.review.5afe.dev/storybook/

github-actions[bot] commented 2 weeks ago

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A

Report generated by eslint-plus-action

github-actions[bot] commented 2 weeks ago

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

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

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 925.93 KB (🟢 -74.06 KB)
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!

Twelve Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/apps 50.13 KB (🟡 +2 B) 976.05 KB
/apps/custom 41.74 KB (🟡 +2 B) 967.67 KB
/apps/open 53.36 KB (🟡 +3 B) 979.29 KB
/home 58.63 KB (-1 B) 984.56 KB
/new-safe/create 33.81 KB (🟢 -11 B) 959.73 KB
/settings/safe-apps 25.55 KB (🟡 +2 B) 951.48 KB
/swap 30.07 KB (🟡 +1 B) 956 KB
/transactions 73.74 KB (-2 B) 999.67 KB
/transactions/history 73.71 KB (-2 B) 999.63 KB
/transactions/queue 30.94 KB (-2 B) 956.87 KB
/transactions/tx 20.71 KB (-2 B) 946.63 KB
/wc 687 B (🟢 -2 B) 926.6 KB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

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

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

github-actions[bot] commented 2 weeks ago

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟡 Statements
78.61% (-0.13% 🔻)
11311/14388
🔴 Branches
58.04% (-0.14% 🔻)
2735/4712
🟡 Functions
65.68% (-0.04% 🔻)
1818/2768
🟡 Lines
79.95% (-0.15% 🔻)
10194/12750
Show files with reduced coverage 🔻
|
St.:grey_question:
| File | Statements | Branches | Functions | Lines | | :-: | :- | :- | :- | :- | :- | | 🔴 |
`...` / web3.ts
|
59.09% (-4.17% 🔻)
| 8.33% |
16.67% (-11.9% 🔻)
|
52.94% (-4.95% 🔻)
| | 🟡 |
`...` / safeContracts.ts
|
69.01% (-10.99% 🔻)
|
40% (-60% 🔻)
|
54.55% (-3.79% 🔻)
|
63.93% (-11.07% 🔻)
| | 🟡 |
`...` / sdk.ts
|
63.92% (-2.42% 🔻)
|
33.33% (-4.76% 🔻)
| 57.14% |
62.79% (-2.76% 🔻)
| | 🔴 |
`...` / SafeTxProvider.tsx
| 28.57% | 0% |
44.44% (-11.11% 🔻)
| 29.17% | | 🟡 |
`...` / useIsValidExecution.ts
|
71.11% (-15.85% 🔻)
|
58.33% (-8.33% 🔻)
|
60% (-20% 🔻)
|
71.43% (-16.94% 🔻)
| | 🟡 |
`...` / index.tsx
|
65.79% (-0.88% 🔻)
|
42.86% (+1% 🔼)
| 61.54% |
65.74% (-0.93% 🔻)
| | 🟡 |
`...` / ReviewSignMessageOnChain.tsx
|
74.29% (-11.83% 🔻)
|
47.62% (-14.29% 🔻)
| 83.33% |
74.24% (-12.52% 🔻)
|

Test suite run success

1409 tests passing in 195 suites.

Report generated by 🧪jest coverage report action from 9d2d5f9d0ab26f5353836357089b57e3b94814b2

mike10ca commented 2 weeks ago

@usame-algan , we use protocol kit in our Cypress tests, in happy path: sendfunds_connected_wallet.cy.js, sendfunds_queue_1.cy.js, sendfunds_relay.cy.js

These are happy path tests and are not included into Smoke tests and won’t be there. Please have a look at the tests for breaking changes and make adjustments.

You can run them locally off your branch inside Cypress client. I tried running a tests and got this first error right away (enclosed).

Screenshot 2024-06-19 at 19 00 26

github-actions[bot] commented 1 week ago

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A

Report generated by eslint-plus-action

usame-algan commented 1 week ago

These are happy path tests and are not included into Smoke tests and won’t be there. Please have a look at the tests for breaking changes and make adjustments.

Thanks for noticing! I will take a look and update those as well.

github-actions[bot] commented 1 week ago

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A

Report generated by eslint-plus-action

usame-algan commented 1 week ago

One thing we should decide is how to access the RPC URL.

Imo _getConnection() seems like its intended to only be used internally so it might not be as stable/robust.