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: fetch safe overviews including untrusted token fiatTotal #4495

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

schmanu
Copy link
Member

@schmanu schmanu commented Nov 6, 2024

What it solves

Resolves #4479

How this PR fixes it

Requests fiatTotal in SafeOverviews using trusted=false as we otherwise receive 0 balances for Safes on networks without Default tokenlists.

How to test it

  • Open a Safe with ERC20 tokens on a network without default token list.
  • Compare the balance in the sidebar / network selector with the one in e.g. the dashboard

Screenshots

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

@schmanu schmanu requested a review from iamacook November 6, 2024 13:18
Copy link

github-actions bot commented Nov 6, 2024

Copy link

Copy link

github-actions bot commented Nov 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 1012.9 KB (🟡 +1 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 Nov 6, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
74.03% (-0.25% 🔻)
13908/18786
🔴 Branches
52.68% (-0.19% 🔻)
3424/6500
🔴 Functions
57.84% (-0.32% 🔻)
2029/3508
🟡 Lines
75.7% (-0.22% 🔻)
12637/16693
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / useDelegates.ts
86.67% 100% 66.67% 100%
🔴
... / DelegateForm.tsx
38.3% 0% 0% 41.86%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴
... / batchSlice.ts
36.36% (-13.64% 🔻)
0% (-25% 🔻)
0% (-40% 🔻)
41.18% (-11.76% 🔻)
🟡
... / useDraftBatch.ts
65.52% (-17.24% 🔻)
0%
20% (-40% 🔻)
65.38% (-15.38% 🔻)
🟢
... / index.tsx
97.06% (-0.16% 🔻)
95.24% (-0.92% 🔻)
100% 100%
🟢
... / useIsOnlySpendingLimitBeneficiary.tsx
88.24% (-1.24% 🔻)
75% (+15% 🔼)
50%
93.33% (-0.78% 🔻)
🟢
... / SignOrExecuteForm.tsx
85.54% (-0.17% 🔻)
78.75% (+2.28% 🔼)
42.86%
84.81% (-0.19% 🔻)
🟢
... / index.tsx
87.5% (-0.96% 🔻)
50% (+2.63% 🔼)
50%
86.96% (-1.04% 🔻)
🟢
... / useTxPendingStatuses.ts
83.64% (-0.91% 🔻)
68.33% (-1.67% 🔻)
75%
92.63% (-1.05% 🔻)
🟡
... / index.tsx
58.97% (-29.66% 🔻)
0% (-70.59% 🔻)
0% (-50% 🔻)
63.89% (-28.79% 🔻)
🟡
... / index.tsx
62.5% (-37.5% 🔻)
0% (-50% 🔻)
0% (-100% 🔻)
71.43% (-28.57% 🔻)
🔴
... / index.tsx
36.76% (-30.88% 🔻)
0% (-42.11% 🔻)
0% (-20% 🔻)
39.68% (-30.16% 🔻)
🟢
... / index.tsx
72.73% (-9.09% 🔻)
0% 0% 80%
🟢
... / index.tsx
75% (-25% 🔻)
0% (-50% 🔻)
100% 100%
🟢
... / index.tsx
80% (-20% 🔻)
100%
0% (-100% 🔻)
88.89% (-11.11% 🔻)
🔴
... / BatchTooltip.tsx
36.84% (-47.37% 🔻)
100%
0% (-57.14% 🔻)
46.67% (-46.67% 🔻)
🟡
... / index.tsx
50% (-50% 🔻)
100%
0% (-100% 🔻)
60% (-40% 🔻)
🔴
... / useSafeTokenEnabled.ts
50% (-50% 🔻)
0% (-66.67% 🔻)
0% (-100% 🔻)
50% (-50% 🔻)

Test suite run success

1593 tests passing in 215 suites.

Report generated by 🧪jest coverage report action from fef19f5

Copy link
Member

@iamacook iamacook left a comment

Choose a reason for hiding this comment

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

Nit: let's add the reasoning to the desc.

@liliya-soroka
Copy link
Member

Verified in the notion

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.

Aggregated Multichain balances are wrong for networks without default tokenlists
3 participants