Conversation
Fixes EXP-302.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughAdded persistent storage and cleanup for the bridge form recipient: new Changes
Sequence Diagram(s)sequenceDiagram
participant UI as "BridgeForm (UI)"
participant Defaults as "useDefaultValues()"
participant StorageModule as "bridge-form-storage"
participant LS as "localStorage"
UI->>LS: set BRIDGE_SRC_*, BRIDGE_DST_*, BRIDGE_QUANTITY, BRIDGE_SLIPPAGE_PERCENT, BRIDGE_RECIPIENT
Defaults->>LS: read BRIDGE_* keys (including BRIDGE_RECIPIENT)
Note right of Defaults: Compose defaults from network presets\nthen localStorage values\nthen location overrides
UI->>StorageModule: onDisconnect -> clearPersistedBridgeFormValues()
StorageModule->>LS: remove BRIDGE_SRC_*, BRIDGE_DST_*, BRIDGE_QUANTITY, BRIDGE_SLIPPAGE_PERCENT, BRIDGE_RECIPIENT
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Deploying interwovenkit-testnet with
|
| Latest commit: |
6b3a18e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d15d20b1.interwovenkit-testnet.pages.dev |
| Branch Preview URL: | https://fix-exp-302-recipient-reset.interwovenkit-testnet.pages.dev |
Deploying interwovenkit-staging with
|
| Latest commit: |
6b3a18e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://be6f1e4f.interwovenkit-staging.pages.dev |
| Branch Preview URL: | https://fix-exp-302-recipient-reset.interwovenkit-staging.pages.dev |
Deploying interwovenkit with
|
| Latest commit: |
6b3a18e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://dc418ce5.interwovenkit.pages.dev |
| Branch Preview URL: | https://fix-exp-302-recipient-reset.interwovenkit.pages.dev |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/interwovenkit-react/src/pages/bridge/BridgeForm.tsx`:
- Line 101: The disconnect handler inside useDisconnect currently clears
source/destination/quantity/slippage but omits the persisted recipient; update
the disconnect handler in useDisconnect to remove the stored recipient by
calling localStorage.removeItem for LocalStorageKey.BRIDGE_RECIPIENT so the
recipient address is cleared on wallet disconnect and cannot persist across
sessions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b479c51d-df22-4a53-b292-a1632c6e2f9f
📒 Files selected for processing (3)
packages/interwovenkit-react/src/data/constants.tspackages/interwovenkit-react/src/pages/bridge/BridgeForm.tsxpackages/interwovenkit-react/src/pages/bridge/data/form.ts
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Stale recipient not cleared on wallet disconnect
- The disconnect cleanup now removes the persisted bridge recipient so a previous wallet address cannot be restored after reconnecting.
Or push these changes by commenting:
@cursor push eb9ba7010a
Preview (eb9ba7010a)
diff --git a/packages/interwovenkit-react/src/data/ui.ts b/packages/interwovenkit-react/src/data/ui.ts
--- a/packages/interwovenkit-react/src/data/ui.ts
+++ b/packages/interwovenkit-react/src/data/ui.ts
@@ -80,5 +80,6 @@
localStorage.removeItem(LocalStorageKey.BRIDGE_DST_DENOM)
localStorage.removeItem(LocalStorageKey.BRIDGE_QUANTITY)
localStorage.removeItem(LocalStorageKey.BRIDGE_SLIPPAGE_PERCENT)
+ localStorage.removeItem(LocalStorageKey.BRIDGE_RECIPIENT)
}
}You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit edc35d3. Configure here.


Summary
This fixes EXP-302, where a custom bridge recipient address was lost after navigating to the preview screen and back.
The bridge form already persisted the selected chains, denom, quantity, and slippage in localStorage, but it did not persist the recipient field. Because the form remounts when moving through the preview route, the missing recipient value was treated as invalid and the widget replaced it with the default wallet address.
This change adds a dedicated
BRIDGE_RECIPIENTlocalStorage key, writes the recipient into storage alongside the other bridge form fields, and restores it as part of the default bridge form values. That keeps a user-entered recipient stable across the preview round-trip instead of resetting it to the connected wallet address.Validation
eslint --fix --max-warnings=0andprettier --write.Fixes EXP-302.
Note
Low Risk
Low risk: small change to bridge form persistence/cleanup via
localStorage, with a new key and a helper to clear bridge-specific fields.Overview
Fixes bridge form state loss by persisting the
recipientfield alongside existing bridge selections inlocalStorage, and restoring it as part ofuseDefaultValues()when the form remounts.Introduces
LocalStorageKey.BRIDGE_RECIPIENTplus a sharedclearPersistedBridgeFormValues()helper (with test coverage) and uses it on disconnect to clear all bridge form keys consistently.Reviewed by Cursor Bugbot for commit 6b3a18e. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit