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: Hide transaction checks block if features are disabled #4008

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

usame-algan
Copy link
Member

What it solves

Resolves #3584

How this PR fixes it

  • Hides the Transaction checks block if both redefine and simulation flags are disabled

How to test it

  1. Open a safe on a network without stransaction checks like zksync era
  2. Create a transaction
  3. Observe no Transaction checks block

Screenshots

Screenshot 2024-07-29 at 19 12 00

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) 🧑‍💻

@usame-algan usame-algan requested a review from jmealy July 29, 2024 17:12
Copy link

github-actions bot commented Jul 29, 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 Decreased

Page Size (compressed)
global 1 MB (-2 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

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
78.96% (-0.1% 🔻)
11718/14840
🔴 Branches
58.78% (-0.11% 🔻)
2919/4966
🟡 Functions
66.09% (-0.07% 🔻)
1875/2837
🟢 Lines
80.38% (-0.08% 🔻)
10564/13143
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴
... / index.tsx
52.54% (-16.95% 🔻)
2.94% (-14.71% 🔻)
8.33% (-8.33% 🔻)
57.69% (-15.38% 🔻)
🔴
... / index.tsx
50% (-19.05% 🔻)
0% (-12.5% 🔻)
0% (-33.33% 🔻)
52.5% (-15% 🔻)
🔴
... / TxInfoProvider.tsx
31.58% (-5.26% 🔻)
0% 0% 37.5%

Test suite run success

1446 tests passing in 200 suites.

Report generated by 🧪jest coverage report action from 5440e19

@@ -140,9 +140,7 @@ export function RecoverAccountFlowReview({ params }: { params: RecoverAccountFlo
<RedefineBalanceChanges />
</TxCard>

<TxCard>
Copy link
Member

Choose a reason for hiding this comment

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

I would keep TxCard here and make it disappear if empty via CSS (:empty { display: none; } )

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 tried this and while it works there is a slightly larger gap because TxCard itself is not empty but its child element CardContent while TxCard applies some margin.

Screenshot 2024-07-29 at 19 47 39

Copy link
Contributor

@jmealy jmealy left a comment

Choose a reason for hiding this comment

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

No gap, looks ok to me

@liliya-soroka
Copy link
Member

Verified

Also enabling/disabling feature works for me on staging without caching issue

@usame-algan usame-algan merged commit 81d6d3b into dev Aug 1, 2024
14 checks passed
@usame-algan usame-algan deleted the hide-tx-checks branch August 1, 2024 10:29
@github-actions github-actions bot locked and limited conversation to collaborators Aug 1, 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.

Hide "Transaction checks" block if transaction checks are disabled for the network
4 participants