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: staking claim [SW-160] #4167

Merged
merged 5 commits into from
Sep 13, 2024
Merged

Feat: staking claim [SW-160] #4167

merged 5 commits into from
Sep 13, 2024

Conversation

compojoom
Copy link
Contributor

What it solves

Ads decoding views for stake claim txs

Resolves #

How this PR fixes it

How to test it

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

Copy link

Copy link

github-actions bot commented Sep 12, 2024

Copy link

github-actions bot commented Sep 12, 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

Copy link

github-actions bot commented Sep 12, 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 953.62 KB (🟡 +279 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 Sep 12, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
78.23% (-0.03% 🔻)
11956/15284
🔴 Branches
58.19% (-0.11% 🔻)
3053/5247
🟡 Functions
65.35% (-0.08% 🔻)
1888/2889
🟡 Lines
79.73% (-0.01% 🔻)
10792/13536
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / index.tsx
75% 100% 0% 100%
🟢
... / index.tsx
80% 100% 0% 100%
🟢
... / Withdraw.tsx
83.33% 100% 0% 100%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟡
... / transaction-guards.ts
69.27% (-1% 🔻)
33.87% (-2.34% 🔻)
67.8% (-0.62% 🔻)
70.68% (-1.2% 🔻)
🟡
... / extractTxInfo.ts
68.75%
37.74% (-1.48% 🔻)
100% 68.09%
🟢
... / index.tsx
87.5% (+0.66% 🔼)
38.24% (-1.16% 🔻)
50%
86.84% (+0.73% 🔼)
🔴
... / index.tsx
42.86% (-2.6% 🔻)
0% 0%
46.15% (-3.85% 🔻)
🟡
... / useTransactionType.tsx
60.87% (-1.35% 🔻)
36.96% (-0.82% 🔻)
100%
61.36% (-1.43% 🔻)

Test suite run success

1484 tests passing in 203 suites.

Report generated by 🧪jest coverage report action from 5d8367f


export const getStakeTitle = (txs: BaseTransaction[] | undefined) => {
const hashToLabel = {
[WITHDRAW_SIGHASH]: 'Withdraw request',
[CLAIM_SIGHASH]: 'Claim',
Copy link
Member

Choose a reason for hiding this comment

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

Can’t these titles be deduced from the txInfo/txConfirmation type?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As discussed in the call - we currently do this because the app title is a component that is rendered before the modal content and as such it doesn't have access to the txInfo. This would need a refactoring (since you guys are working on the txflow #4157 you can consider it there)

@katspaugh
Copy link
Member

Tested, it works correctly ✅

Tx comfirmation:
Screenshot 2024-09-13 at 14 27 08

Tx details in the queue:
Screenshot 2024-09-13 at 14 27 38

I'm not convinced it's a good idea to say "Receive" in one place but "Amount" in another for the exact same thing (rewards mount). @TanyaEfremova shall we unify the phrasing maybe?

@katspaugh
Copy link
Member

katspaugh commented Sep 13, 2024

@compojoom also I would make the gap between these two blocks a tiny bit bigger (notice that the space above Receive is bigger than below):
Screenshot 2024-09-13 at 14 29 30

@TanyaEfremova
Copy link
Contributor

@katspaugh You're right, it's not intended to say 'Amount'. Both screens (transaction summary and transaction confirmation) are now aligned in Figma.

@katspaugh katspaugh changed the title Feat staking claim [SW-160] Feat: staking claim [SW-160] Sep 13, 2024
@katspaugh katspaugh merged commit 3ddc84d into dev Sep 13, 2024
15 of 16 checks passed
@katspaugh katspaugh deleted the feat-staking-claim branch September 13, 2024 18:24
@github-actions github-actions bot locked and limited conversation to collaborators Sep 13, 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.

3 participants