Skip to content

fix(widget): isolate configurable settings defaults - #873

Open
kriss39 wants to merge 1 commit into
lifinance:mainfrom
kriss39:fix/isolate-widget-default-settings
Open

fix(widget): isolate configurable settings defaults#873
kriss39 wants to merge 1 commit into
lifinance:mainfrom
kriss39:fix/isolate-widget-default-settings

Conversation

@kriss39

@kriss39 kriss39 commented Sep 10, 2026

Copy link
Copy Markdown

Which Linear task is linked to this PR?

None.

Why was it implemented this way?

Configurable defaults like slippage and route priority were stored in a module-level object and updated when a widget config was applied.

That makes those defaults shared across widget instances. For example, rendering one widget with a 1% slippage default could leave that value behind for another widget that did not set one.

This change derives the configurable defaults per settings store instead of mutating the shared defaults. Reset also uses the current widget config, so runtime config changes keep the expected reset behavior.

Testing

Added regression coverage for:

  • keeping slippage and route priority defaults isolated between widget instances
  • resetting with defaults from the current widget config

Validation passed with:

  • widget regression tests
  • pnpm check
  • full workspace build
  • pnpm check:types
  • circular dependency check
  • E2E Playground (dev mode)
  • E2E Examples (20/20)
  • E2E Playground (4/4 Playwright shards)

Visual showcase (Screenshots or Videos)

N/A.

Checklist before requesting a review

  • I have performed a self-review and testing of my code.
  • This pull request is focused and addresses a single problem.
  • No public API or documentation changes are required.

@changeset-bot

changeset-bot Bot commented Sep 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 00e3225

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 20 packages
Name Type
@lifi/widget Patch
@lifi/widget-checkout Patch
connectkit Patch
deposit-flow Patch
dynamic Patch
nextjs Patch
nextjs15 Patch
nft-checkout Patch
nuxt-app Patch
privy-ethers-example Patch
privy Patch
rainbowkit Patch
react-router Patch
remix Patch
reown Patch
svelte Patch
tanstack-router-example Patch
vite-project Patch
vue Patch
zustand-widget-config Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant