Skip to content

Commit

Permalink
fix: reduce default slippage
Browse files Browse the repository at this point in the history
  • Loading branch information
chybisov committed Sep 29, 2022
1 parent 487c990 commit 292c2db
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/widget/src/stores/settings/useSettingsStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const useSettingsStore = create<SettingsStore>()(
appearance: 'auto',
gasPrice: 'normal',
routePriority: 'RECOMMENDED',
slippage: '3',
slippage: '0.5',
setValue: (key, value) =>
set((state: SettingsState) => {
state[key] = value;
Expand Down Expand Up @@ -77,7 +77,7 @@ export const useSettingsStore = create<SettingsStore>()(
})),
{
name: 'li.fi-widget-settings',
version: 1,
version: 2,
partialize: (state) => {
const { enabledBridges, enabledExchanges, ...partializedState } = state;
return partializedState;
Expand All @@ -97,6 +97,9 @@ export const useSettingsStore = create<SettingsStore>()(
if (version === 0 && persistedState.appearance === 'system') {
persistedState.appearance = 'auto';
}
if (version === 1) {
persistedState.slippage = '0.5';
}
return persistedState as SettingsStore;
},
},
Expand Down

0 comments on commit 292c2db

Please sign in to comment.