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: Close transaction modals as soon as the transaction is submitted #3676

Merged
merged 3 commits into from
Jun 17, 2024

Conversation

usame-algan
Copy link
Member

@usame-algan usame-algan commented May 8, 2024

What it solves

Resolves #3675

How this PR fixes it

  • Uses the unchecked signer when executing transactions

How to test it

This needs to be tested with MetaMask and at least one other wallet thats not affected e.g. Rabby.
We should also make sure it still works when executing transactions with hardware wallets and nested safes.

The following transaction types need to be tested:

  • Spending limit execution
  • Bulk execution
  • Tx speedup
  • Recovery setup
  • Recovery proposal

The transaction modal should close when the transaction is executed from the wallet.

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 May 8, 2024 12:26
Copy link

github-actions bot commented May 8, 2024

Copy link

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

📦 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 1003.72 KB (-27 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!

Seven 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/open 51.54 KB (🟡 +2 B) 1.03 MB
/swap 29.91 KB (🟡 +1 B) 1.01 MB
/transactions 73.93 KB (🟡 +1 B) 1.05 MB
/transactions/history 73.89 KB (🟡 +1 B) 1.05 MB
/transactions/messages 34.87 KB (🟡 +2 B) 1.01 MB
/transactions/queue 29.16 KB (🟡 +1 B) 1.01 MB
/transactions/tx 18.91 KB (🟡 +1 B) 1022.63 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.

Copy link

github-actions bot commented May 8, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 79.16% 11552/14593
🔴 Branches
58.31% (+0.02% 🔼)
2790/4785
🟡 Functions
66.12% (-0.02% 🔻)
1850/2798
🟢 Lines
80.48% (+0.01% 🔼)
10413/12938
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟡
... / sdk.ts
66.34% (-1.7% 🔻)
38.1%
57.14% (-4.4% 🔻)
65.56% (-1.11% 🔻)
🔴
... / recovery-sender.ts
12% (-1.21% 🔻)
0% 0%
12% (-1.21% 🔻)

Test suite run success

1444 tests passing in 199 suites.

Report generated by 🧪jest coverage report action from 985ac27

@usame-algan usame-algan marked this pull request as draft May 8, 2024 12:53
@usame-algan
Copy link
Member Author

usame-algan commented May 8, 2024

Looks like other types of transactions are also affected by this. So far I tried:

  • CF: Bundle safe deployment with first transaction
  • CF: Activate safe now

In all of these cases the promise is pending until the transaction is executed so the modal never closes.

Setting this PR to draft and will investigate further.

Edit: Looks like this only happens when using the MetaMask browser extension and it only happens for transactions that we dispatch without an unchecked signer. I opened a support ticket with MetaMask and will follow up once there are more news. In the meantime we could add a workaround on our side to always use an unchecked signer but we need to make sure this is backwards compatible.

@usame-algan usame-algan marked this pull request as ready for review May 28, 2024 10:02
@usame-algan usame-algan changed the title fix: Use unchecked signer when executing batch fix: Use unchecked signer when executing transactions May 28, 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

@usame-algan
Copy link
Member Author

I've added a new helper getUncheckedSigner and used it in all dispatch calls where we previously relied on the signer. We need to test these cases with 1/n and n/m setups and other types of wallets like hardware wallets and nested safes in order to ensure backwards compatibility.

@usame-algan usame-algan requested a review from schmanu May 30, 2024 07:58
@katspaugh
Copy link
Member

Could you please rename the PR to reflect what exactly is fixed on the UI level? Without using the word “unchecked signer” because it’s an implementation detail.

@usame-algan usame-algan changed the title fix: Use unchecked signer when executing transactions fix: Close transaction modals as soon as the transaction is submitted May 30, 2024
@francovenica
Copy link
Contributor

LGTM

I tried several types of tx:
Send funds, owner editing, recovery setup and recovery execution, spending limit creation and use, Bulk execution, batch tx, Tx rejection execution, speeding up tx
I tried with both MM and Rabby

Copy link

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

@usame-algan usame-algan merged commit d94b068 into dev Jun 17, 2024
14 checks passed
@usame-algan usame-algan deleted the fix-bulk-execute branch June 17, 2024 07:16
@github-actions github-actions bot locked and limited conversation to collaborators Jun 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Transaction modal doesn't close when not using an unchecked signer
5 participants