-
Notifications
You must be signed in to change notification settings - Fork 0
Reset bridge form values on disconnect #35
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughA new utility function, Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant WidgetHeader
participant Storage (localStorage)
User->>WidgetHeader: Clicks Disconnect Button
WidgetHeader->>WidgetHeader: closeWidget()
WidgetHeader->>WidgetHeader: disconnect()
WidgetHeader->>Storage: resetBridgeFormValues()
Storage-->>WidgetHeader: Bridge form values cleared
Poem
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/widget-react/src/public/data/storage.ts (1)
3-12
: ```shell
#!/bin/bashLocate the file defining LocalStorageKey
FILE=$(rg -l "export enum LocalStorageKey")
echo "Found LocalStorageKey enum in: $FILE"Show its definition (first 200 lines)
sed -n '1,200p' "$FILE"
Search for usages of the potentially missing keys
echo "--- Usages of BRIDGE_SLIPPAGE_PERCENT ---"
rg -n "BRIDGE_SLIPPAGE_PERCENT"
echo "--- Usages of BRIDGE_HISTORY ---"
rg -n "BRIDGE_HISTORY"</blockquote></details> </blockquote></details> <details> <summary>📜 Review details</summary> **Configuration used: CodeRabbit UI** **Review profile: CHILL** **Plan: Pro** <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 7a2f8df0588a4cabe47176828c9e8e9075c22d0c and 2dfe45bb9182393c4f2b4585b044803a684e510b. </details> <details> <summary>📒 Files selected for processing (2)</summary> * `packages/widget-react/src/public/app/WidgetHeader.tsx` (2 hunks) * `packages/widget-react/src/public/data/storage.ts` (1 hunks) </details> <details> <summary>🧰 Additional context used</summary> <details> <summary>🧬 Code Graph Analysis (2)</summary> <details> <summary>packages/widget-react/src/public/data/storage.ts (1)</summary><blockquote> <details> <summary>packages/widget-react/src/data/constants.ts (1)</summary> * `LocalStorageKey` (3-26) </details> </blockquote></details> <details> <summary>packages/widget-react/src/public/app/WidgetHeader.tsx (1)</summary><blockquote> <details> <summary>packages/widget-react/src/public/data/storage.ts (1)</summary> * `resetBridgeFormValues` (3-12) </details> </blockquote></details> </details> </details> <details> <summary>🔇 Additional comments (2)</summary><blockquote> <details> <summary>packages/widget-react/src/public/app/WidgetHeader.tsx (2)</summary> `9-9`: **LGTM! Clean import integration.** The import path is correct and follows the expected file structure. --- `42-46`: **LGTM! Proper integration in disconnect flow.** The function is appropriately called after the core disconnect logic (`closeWidget()` and `disconnect()`), ensuring form values are cleared as part of the complete disconnect process. This addresses the PR objective effectively. </details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
https://linear.app/initia-labs/issue/FE-1358/bridge-chainasset-selection-input-need-to-be-reset-when-wallet
Summary by CodeRabbit