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: visually group transactions executed in bulk in the transaction history #3772

Merged
merged 23 commits into from
Jun 20, 2024

Conversation

jmealy
Copy link
Contributor

@jmealy jmealy commented May 30, 2024

What it solves

Resolves #3443

How this PR fixes it

  • Transactions with the same transaction hash are displayed in a group, similar to conflicting transactions in the queue.

How to test it

  • Queue multiple transactions and then execute them in bulk.
  • After execution these transactions should be grouped together
  • If the transactions are sending tokens to another safe, the receive transactions should also be grouped.

Screenshots

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

github-actions bot commented May 30, 2024

Copy link

github-actions bot commented May 30, 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 May 30, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
79.41% (+0.26% 🔼)
11547/14541
🔴 Branches
58.51% (+0.2% 🔼)
2799/4784
🟡 Functions
66.7% (+0.58% 🔼)
1851/2775
🟢 Lines
80.74% (+0.27% 🔼)
10411/12894
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟡
... / index.tsx
58.82% 0% 0% 66.67%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟡
... / safeContracts.ts
78.26% (-1.74% 🔻)
50% (-50% 🔻)
60% (+1.67% 🔼)
75%
🔴
... / dispatch.ts
38.54% (-0.2% 🔻)
34.48% 26.09%
37.43% (-0.21% 🔻)
🟢
... / recovery-state.ts
95.16% (-0.08% 🔻)
86.67% (+2.46% 🔼)
85.71%
96.49% (-0.06% 🔻)
🟡
... / index.tsx
73.08% (-21.04% 🔻)
25% (+25% 🔼)
66.67% (-33.33% 🔻)
72.73% (-20.13% 🔻)

Test suite run success

1438 tests passing in 199 suites.

Report generated by 🧪jest coverage report action from f20be5d

Copy link

github-actions bot commented May 30, 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 1003.82 KB (🟡 +78 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!

Eleven Pages Changed Size

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

Page Size (compressed) First Load
/apps 46.56 KB (🟢 -3.56 KB) 1.03 MB
/apps/custom 38.18 KB (🟢 -3.56 KB) 1.02 MB
/apps/open 48.69 KB (🟢 -2.85 KB) 1.03 MB
/home 56.57 KB (🟢 -3.47 KB) 1.04 MB
/settings/safe-apps 22.39 KB (🟢 -3.56 KB) 1 MB
/swap 26.35 KB (🟢 -3.56 KB) 1.01 MB
/transactions 74.63 KB (🟡 +723 B) 1.05 MB
/transactions/history 74.6 KB (🟡 +724 B) 1.05 MB
/transactions/messages 35.58 KB (🟡 +725 B) 1.02 MB
/transactions/queue 29.87 KB (🟡 +721 B) 1.01 MB
/transactions/tx 19.63 KB (🟡 +736 B) 1023.45 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.

@jmealy jmealy marked this pull request as ready for review May 30, 2024 09:55
Copy link

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

@jmealy
Copy link
Contributor Author

jmealy commented Jun 7, 2024

@iamacook gave some feedback that it is confusing to have the txHash displayed in the actions column
@TanyaEfremova what do you think?

@TanyaEfremova
Copy link
Contributor

Sure, that does make sense!
How about we show the amount of transactions batched instead, and show a button separately? A couple ideas:

cc @katspaugh could you also provide feedback here please?

@katspaugh
Copy link
Member

@TanyaEfremova I like this version:
Screenshot 2024-06-07 at 16 40 00

It also has a much bigger clickable are on the explorer link, so it's better overall.

Showing a single transaction hash was an important detail, because that's the confusing part about these transactions. They all have the same tx hash, so the user might be going in circles when debugging transactions. So I would keep the hash where it was but also add this View on explorer button instead of the tiny arrow icon next to the hash.

@TanyaEfremova
Copy link
Contributor

Perfect, this exact layout can work well for grouping swap transactions (with limitations) in hitory.

Copy link

github-actions bot commented Jun 10, 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
Member

@katspaugh katspaugh left a comment

Choose a reason for hiding this comment

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

Nice work!

src/components/transactions/BulkTxListGroup/index.tsx Outdated Show resolved Hide resolved
src/components/transactions/TxList/index.tsx Outdated Show resolved Hide resolved
src/utils/tx-list.ts Show resolved Hide resolved
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
Member

@usame-algan usame-algan 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 👍

Copy link

github-actions bot commented Jun 19, 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

@TanyaEfremova
Copy link
Contributor

The last thing, that I just noticed, but minor. The number of transactions displayed in the 2nd column should use label-secondary color style.

@jmealy jmealy merged commit 2ecbdb8 into dev Jun 20, 2024
14 checks passed
@jmealy jmealy deleted the feat/bulk-groups branch June 20, 2024 13:07
@github-actions github-actions bot locked and limited conversation to collaborators Jun 20, 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.

Visually group multisend-executed txs in the history
5 participants