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

Feat: enable Safe version 1.4.1 #3209

Merged
merged 5 commits into from Feb 14, 2024
Merged

Feat: enable Safe version 1.4.1 #3209

merged 5 commits into from Feb 14, 2024

Conversation

katspaugh
Copy link
Member

@katspaugh katspaugh commented Feb 6, 2024

What it solves

Resolves #2558

Add 1.4.1 to the list of valid Safe versions.

How to test it

  • Create a 1.4.1 Safe via the CLI
  • Open it in the UI
  • Transactions and everything else should work

Copy link

github-actions bot commented Feb 6, 2024

Copy link

github-actions bot commented Feb 6, 2024

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

@katspaugh katspaugh marked this pull request as draft February 6, 2024 13:18
Copy link

github-actions bot commented Feb 6, 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 1.02 MB (🟡 +62 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 Feb 6, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
78.88% (-0.02% 🔻)
11515/14598
🔴 Branches
56.83% (-0.03% 🔻)
2574/4529
🟡 Functions
63.62% (-0.02% 🔻)
1831/2878
🟢 Lines
80.2% (-0.02% 🔻)
10387/12952
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟡
... / index.ts
69.67% (+0.18% 🔼)
62.5% (-1.14% 🔻)
47.06% (+3.31% 🔼)
68.87% (+0.24% 🔼)
🟢
... / index.tsx
82.35% (-8.82% 🔻)
66.67% (-16.67% 🔻)
50% (-12.5% 🔻)
83.87% (-9.68% 🔻)

Test suite run success

1399 tests passing in 190 suites.

Report generated by 🧪jest coverage report action from dc8eb67

@katspaugh katspaugh marked this pull request as ready for review February 6, 2024 16:55
@@ -19,7 +19,7 @@ export const isLegacyVersion = (safeVersion: string): boolean => {
}

export const isValidSafeVersion = (safeVersion?: SafeInfo['version']): safeVersion is SafeVersion => {
const SAFE_VERSIONS: SafeVersion[] = ['1.3.0', '1.2.0', '1.1.1', '1.0.0']
const SAFE_VERSIONS: SafeVersion[] = ['1.4.1', '1.3.0', '1.2.0', '1.1.1', '1.0.0']
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks like a config constant? Why don't we keep it in config/constants.ts next to the LATEST_SAFE_VERSION? Maybe changing it to:

export const LATEST_SAFE_VERSION = process.env.NEXT_PUBLIC_SAFE_VERSION || '1.3.0'
export SUPPORTED_SAFE_VERSION = ['1.4.1', '1.3.0', '1.2.0', '1.1.1', '1.0.0']

This way both const will live next to each other and supporting 1.5 one day would be just changing config/constants.ts file?

Copy link
Member Author

Choose a reason for hiding this comment

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

I would remove this altogether because ultimately it just repeats the same check in the protocol-kit. We can instead look up the version via protocol-kit or safe-deployments.

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.

Looks good to me.

@usame-algan
Copy link
Member

There is also the LATEST_SAFE_VERSION in the constants file which needs to be updated. In the protocol-kit the version still defaults to 1.3.0 so I would suggest we keep setting it via the CI.

@katspaugh
Copy link
Member Author

LATEST_SAFE_VERSION should not be touched for now, as it determines which contract version is used for creating new Safes. This PR only adds support for Safes created outside of the UI.

@liliya-soroka
Copy link
Member

  1. Need to check with back-end if we want to mark Safe: MultiSendCallOnly 1.4.1 as trusted
image

@liliya-soroka
Copy link
Member

  1. send tx as spending limit doesn't work on the PR for 1.4.1 and 1.3.0 safes . At the same time, send tx as spending limit works on dev

Copy link

github-actions bot commented Feb 14, 2024

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

@katspaugh
Copy link
Member Author

Fixed by pulling from dev.

@liliya-soroka
Copy link
Member

Verified

@katspaugh katspaugh merged commit 0ff4d1a into dev Feb 14, 2024
15 checks passed
@katspaugh katspaugh deleted the version branch February 14, 2024 13:20
@github-actions github-actions bot locked and limited conversation to collaborators Feb 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Safe v1.4.1 support
5 participants