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

fix: Display cow fallback handler message [SW-33] #3882

Closed usame-algan closed 2 days ago

usame-algan commented 3 days ago

What it solves

Resolves SW-33

How this PR fixes it

How to test it

  1. Open a Safe that has TWAP enabled
  2. Go to Settings -> Modules
  3. Observe a green message above the fallback handler address

Screenshots

Screenshot 2024-07-01 at 16 50 58

Checklist

notion-workspace[bot] commented 3 days ago

CoW’s fallback handler

github-actions[bot] commented 3 days ago

Branch preview

βœ… Deploy successful!

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

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

github-actions[bot] commented 3 days 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 days 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 1000.18 KB (🟑 +12 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!

One Page Changed Size

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

Page Size (compressed) First Load
/settings/modules 9.74 KB (🟑 +121 B) 1009.92 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 days ago

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟑 Statements
78.76% (+0% πŸ”Ό)
11394/14467
πŸ”΄ Branches
58.04% (-0.01% πŸ”»)
2758/4752
🟑 Functions 65.73% 1828/2781
🟒 Lines
80.14% (-0% πŸ”»)
10268/12813
Show files with reduced coverage πŸ”»
|
St.:grey_question:
| File | Statements | Branches | Functions | Lines | | :-: | :- | :- | :- | :- | :- | | 🟒 |
`...` / useGasPrice.ts
|
95% (-1.25% πŸ”»)
|
80.95% (-2.38% πŸ”»)
| 100% |
94.81% (-1.3% πŸ”»)
| | 🟒 |
`...` / index.tsx
| 100% |
96% (-4% πŸ”»)
| 100% | 100% |

Test suite run success

1413 tests passing in 195 suites.

Report generated by πŸ§ͺjest coverage report action from 5e3a2fb7f1e36b3196e744e33078812294d19fa5

compojoom commented 3 days ago

@usame-algan can you ask infra to add title and icon as in the figma design? Or we hardcode all of those in the code?

usame-algan commented 3 days ago

@usame-algan can you ask infra to add title and icon as in the figma design? Or we hardcode all of those in the code?

Good idea! I asked infra to add the fallback handler address to the known contract list.

francovenica commented 2 days ago

LGTM Looks like this right now, so I assume infra did give it the proper icon an title image

The icon is different than in the designs, but I think CowSwap changed it recently so I think is ok: image

TanyaEfremova commented 2 days ago

@francovenica CoW changed their branding slightly, so I will need to update their logos in our design system. The difference is OK for now.

Could we add rounded corners to the icons? E.g. 4px should be fine