Skip to content

Commit

Permalink
feat: make update settings optional to make it enable in playground
Browse files Browse the repository at this point in the history
  • Loading branch information
mikasackermn authored and RyukTheCoder committed Jun 18, 2024
1 parent c7488bf commit c13a902
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions widget/embedded/src/store/slices/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ export const createSettingsSlice: StateCreator<
...(isLiquidityHidden && {
disabledLiquiditySources: nextConfig.liquiditySources || [],
}),
...(nextConfig?._INTERNAL_SETTINGS_?.autoUpdateSettings && {
language: nextConfig.language || DEFAULT_LANGUAGE,
}),
});
},
});
5 changes: 5 additions & 0 deletions widget/embedded/src/types/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,4 +224,9 @@ export type WidgetConfig = {
__UNSTABLE_OR_INTERNAL__?: {
walletConnectListedDesktopWalletLink?: string;
};

// Internal configuration options. Not intended for public use or modification.
_INTERNAL_SETTINGS_?: {
autoUpdateSettings?: boolean; // If true, settings will be updated automatically based on the configuration.
};
};
3 changes: 3 additions & 0 deletions widget/playground/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ export function App() {
features: {
theme: 'hidden',
},
_INTERNAL_SETTINGS_: {
autoUpdateSettings: true,
},
};

/*
Expand Down

0 comments on commit c13a902

Please sign in to comment.