-
Notifications
You must be signed in to change notification settings - Fork 619
[MNY-232] SDK: Fix ExecutingTxScreen missing back button in TransactionWidget #8193
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -133,6 +133,9 @@ | |
| if (screen === "execute-tx") { | ||
| return ( | ||
| <ExecutingTxScreen | ||
| onBack={() => { | ||
| setScreen("deposit"); | ||
| }} | ||
|
Comment on lines
+136
to
+138
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion | 🟠 Major 🧩 Analysis chainLGTM: back action wired for deposit flow; add a test Wiring onBack to return to "deposit" looks correct. Please add a simple state-transition test to cover this path. Example check: 🏁 Script executed: #!/bin/bash
# List usages to guide adding tests for back navigation in deposit modal
rg -nP -C2 '<ExecutingTxScreen\b' packages/thirdweb/src/react/web/uiLength of output: 997 Add state-transition test for back action 🧰 Tools🪛 GitHub Check: codecov/patch[warning] 136-138: packages/thirdweb/src/react/web/ui/TransactionButton/TransactionModal.tsx#L136-L138 |
||
| closeModal={props.onClose} | ||
| onTxSent={props.onTxSent} | ||
| tx={props.tx} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
🧩 Analysis chain
LGTM: back action to init-ui; add coverage
Passing onBack to reset to "init-ui" is correct for recovery. Please add a test asserting the back button sets the screen back from "execute-tx".
Quick grep to help find all call sites to cover:
🏁 Script executed:
Length of output: 997
Add tests for back action in ExecutingTxScreen
Add tests verifying that clicking the back button in
<ExecutingTxScreen>– in
TransactionModalit resets the screen to"deposit",– in
TransactionWidgetit resets the screen to{ id: "init-ui" }.🧰 Tools
🪛 GitHub Check: codecov/patch
[warning] 773-775: packages/thirdweb/src/react/web/ui/Bridge/TransactionWidget.tsx#L773-L775
Added lines #L773 - L775 were not covered by tests
🤖 Prompt for AI Agents