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(Multichain): Show owner setup warning also when replacing owners and changing threshold [SW-150] #4198

Open
wants to merge 2 commits into
base: epic/multichain-safes
Choose a base branch
from

Conversation

jmealy
Copy link
Contributor

@jmealy jmealy commented Sep 18, 2024

What it solves

Resolves: https://www.notion.so/safe-global/Multichain-Safes-V1-change-ownership-91f4347bbf764d35b7fdfa54179d7972?pvs=4

How this PR fixes it

  • Shows the warning message whenever signer setup is changed.
  • Also changes the blockaid warning to have the same icon as other warnings on the page.

How to test it

  • create a multichain safe
  • change the signer setup of one of the chains.
  • On the tx confirmation screen for adding, removing, replacing, or changing threshold, you should see the warning.

Screenshots

Making icons consistant (before):
image

After:
image

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

Copy link

github-actions bot commented Sep 18, 2024

Copy link

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
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

Copy link

📦 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 978.35 KB (🟡 +38.83 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!

Eighteen Pages Changed Size

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

Page Size (compressed) First Load
/ 511 B (🟢 -24.37 KB) 978.85 KB
/address-book 26.1 KB (🟡 +2 B) 1004.45 KB
/apps/open 54.73 KB (-1 B) 1.01 MB
/balances 30.67 KB (🟡 +2 B) 1009.02 KB
/home 60.24 KB (🟡 +28 B) 1.01 MB
/new-safe/advanced-create 36.53 KB (🟡 +1.39 KB) 1014.88 KB
/new-safe/create 35.79 KB (🟡 +1.38 KB) 1014.14 KB
/new-safe/load 16.42 KB (🟡 +3 B) 994.77 KB
/settings/notifications 27.03 KB (-1 B) 1005.38 KB
/settings/setup 35.98 KB (-1 B) 1014.33 KB
/transactions 73.52 KB (-2 B) 1.03 MB
/transactions/history 73.49 KB (-2 B) 1.03 MB
/transactions/messages 39.16 KB (🟡 +1 B) 1017.51 KB
/transactions/msg 29.51 KB (🟡 +1 B) 1007.86 KB
/transactions/queue 31.26 KB (-1 B) 1009.61 KB
/transactions/tx 21.06 KB (-1 B) 999.41 KB
/welcome 6.77 KB (🟢 -1 B) 985.12 KB
/welcome/accounts 379 B (🟢 -1 B) 978.72 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.

Copy link

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
77.92% (-0.32% 🔻)
12309/15797
🔴 Branches
57.98% (-0.29% 🔻)
3178/5481
🟡 Functions
65.14% (-0.22% 🔻)
1934/2969
🟡 Lines
79.38% (-0.36% 🔻)
11113/13999
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / useSafeCreationData.ts
100% 90.32% 100% 100%
🟢
... / multiChainSafe.ts
80% 88.46% 92.31% 80%
🟢
... / useCompatibleNetworks.ts
100% 100% 100% 100%
🔴
... / index.tsx
38.1% 0% 0% 39.02%
🟢
... / MigrateToL2Information.tsx
80% 0% 0% 100%
🟡
... / ChangeOwnerSetupWarning.tsx
50% 0% 0% 62.5%
🔴
... / useIsMultichainSafe.ts
45.45% 100% 0% 50%
🔴
... / useAllSafesGrouped.ts
23.81% 0% 0% 27.78%
🔴
... / useAllSafes.ts
50% 17.24% 37.5% 55.56%
🟢
... / utils.ts
100% 50% 100% 100%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟡
... / transaction-guards.ts
67.62% (-1.65% 🔻)
30.77% (-3.1% 🔻)
67.74% (-0.05% 🔻)
68.24% (-2.43% 🔻)
🟢
... / deployments.ts
95.24% (-4.76% 🔻)
100%
90% (-10% 🔻)
96.88% (-3.13% 🔻)
🟢
... / safeCoreSDK.ts
92.31% (-3.61% 🔻)
84.62% (-7.05% 🔻)
100%
93.48% (-4.2% 🔻)
🔴
... / utils.ts
37.5% (+0.11% 🔼)
28.85% (-5.53% 🔻)
21.74% (+0.31% 🔼)
38.1% (+0.1% 🔼)
🟢 src/store/common.ts
88.89% (-11.11% 🔻)
50%
75% (-25% 🔻)
84.62% (-15.38% 🔻)
🟢
... / txHistorySlice.ts
89.29% (-1.62% 🔻)
57.14% (-15.58% 🔻)
50% (-10% 🔻)
91.67% (-1.19% 🔻)
🟡
... / addedSafesSlice.ts
65.52% (+2.36% 🔼)
75% (+25% 🔼)
33.33% (-8.33% 🔻)
68.18% (+0.44% 🔼)
🔴
... / undeployedSafesSlice.ts
38.46% (+1.32% 🔼)
33.33%
30% (-7.5% 🔻)
42.86% (-1.14% 🔻)
🔴
... / dispatch.ts
37.19% (-0.63% 🔻)
32.26% (-3.04% 🔻)
25%
36.22% (-0.68% 🔻)
🔴
... / SafeTxProvider.tsx
28.95% (+0.38% 🔼)
0%
40% (-4.44% 🔻)
29.41% (+0.25% 🔼)
🔴
... / index.tsx
50% (-0.85% 🔻)
3.45% 8.33%
52% (-0.94% 🔻)
🟢
... / index.tsx
86.05% (-1.45% 🔻)
37.14% (-1.09% 🔻)
42.86% (-7.14% 🔻)
85.37% (-1.48% 🔻)
🟢
... / index.tsx
95.45% (-4.55% 🔻)
50% (-16.67% 🔻)
100%
95.24% (-4.76% 🔻)
🟢
... / useTxPendingStatuses.ts
82.86% (-0.78% 🔻)
65% (-3.33% 🔻)
75%
92.22% (-0.41% 🔻)
🟡
... / index.tsx
72.73% (-10.61% 🔻)
0% 0%
70% (-10% 🔻)
🟢
... / index.ts
94.74% (-0.72% 🔻)
75% (+8.33% 🔼)
100% 100%
🟡
... / index.tsx
61.59% (-4.48% 🔻)
47.17% (+2.17% 🔼)
58.82% (-2.71% 🔻)
62.02% (-4.02% 🔻)
🟡
... / index.ts
60% (-4.29% 🔻)
31.82% (-9.36% 🔻)
18.18% (-1.82% 🔻)
60.81% (-4.76% 🔻)
🟢
... / utils.ts
91.67% (-8.33% 🔻)
85.71% (-14.29% 🔻)
75% (-25% 🔻)
95.24% (-4.76% 🔻)

Test suite run success

1524 tests passing in 206 suites.

Report generated by 🧪jest coverage report action from a7f4147

@jmealy jmealy changed the base branch from dev to epic/multichain-safes September 18, 2024 12:41
Copy link
Member

@schmanu schmanu left a comment

Choose a reason for hiding this comment

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

Will approve as it fixes the described issue.
But once the refactoring of the Settings Change review screens is merged we should move this warning up to the block that describes the settings change.
I don't think this error makes much sense in the Execute / Sign block.

@jmealy
Copy link
Contributor Author

jmealy commented Sep 19, 2024

Will approve as it fixes the described issue. But once the refactoring of the Settings Change review screens is merged we should move this warning up to the block that describes the settings change. I don't think this error makes much sense in the Execute / Sign block.

True probably makes more sense there!

Copy link
Contributor

@TanyaEfremova TanyaEfremova left a comment

Choose a reason for hiding this comment

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

@schmanu had a valid point, see Figma design

It looks good, but let's move it to the top under the card "new signer" and change alert style to info.

@jmealy
Copy link
Contributor Author

jmealy commented Sep 20, 2024

@schmanu had a valid point, see Figma design

It looks good, but let's move it to the top under the card "new signer" and change alert style to info.

Made the suggested changes:

image
image
image
image

@jmealy jmealy changed the title Fix(Multisig): Show owner setup warning also when replacing owners and changing threshold [SW-150] Fix(Multichain): Show owner setup warning also when replacing owners and changing threshold [SW-150] Sep 23, 2024
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.

4 participants