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
312 stars 362 forks source link

feat: return more info in appCommunicator getInfo #3839

Closed compojoom closed 3 weeks ago

compojoom commented 3 weeks ago

The return type of the getInfo endpoint now returns more data about the safe.

What it solves

https://github.com/cowprotocol/cowswap/pull/4508

The appCommunicator getInfo endpoint now returns the same data as api-kit's getSafeInfo. this makes it easier for safe dapp developers to just use the appcommunicator when it is there (and don't have to do an api-kit call to get info such as nonce or modules.

How to test it

This modifies the getInfo endpoint to return additional information. There is no way to test this through the UI.

Screenshots

Checklist

github-actions[bot] commented 3 weeks ago

Branch preview

✅ Deploy successful!

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

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

github-actions[bot] commented 3 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 3 weeks ago

📦 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 951.46 KB (🟡 +3 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!

Six 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.12 KB (🟡 +565 B) 1001.58 KB
/apps/custom 41.74 KB (🟡 +565 B) 993.2 KB
/apps/open 51.54 KB (🟡 +669 B) 1003 KB
/home 60.03 KB (🟡 +676 B) 1011.48 KB
/settings/safe-apps 25.96 KB (🟡 +565 B) 977.41 KB
/swap 29.91 KB (🟡 +671 B) 981.37 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 3 weeks ago

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟡 Statements
79.44% (-0.01% 🔻)
11526/14509
🔴 Branches
58.42% (-0.07% 🔻)
2787/4771
🟡 Functions
66.71% (-0.02% 🔻)
1848/2770
🟢 Lines
80.75% (-0.01% 🔻)
10389/12865
Show files with reduced coverage 🔻
|
St.:grey_question:
| File | Statements | Branches | Functions | Lines | | :-: | :- | :- | :- | :- | :- | | 🟢 |
`...` / useGetSafeInfo.ts
|
84.21% (-4.68% 🔻)
|
20% (-30% 🔻)
|
40% (-10% 🔻)
|
88.24% (-5.51% 🔻)
|

Test suite run success

1444 tests passing in 199 suites.

Report generated by 🧪jest coverage report action from c9ba1132eb52d0480fbdf073e1b9930a46c3d7f5