@wheelx-widget/widget 0.1.7 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -173,20 +173,7 @@ interface WidgetTheme {
173
173
 
174
174
  ## Demo
175
175
 
176
- A demo application is available in the `packages/demo` directory:
177
-
178
- ```bash
179
- git clone https://github.com/wheelx-fi/wheelx-ui.git
180
- cd wheelx-ui
181
- git checkout feat/aidenxiao_20260530_widget
182
- pnpm install
183
- pnpm --filter @wheelx/widget-demo dev
184
- ```
185
-
186
- The demo app opens at `http://localhost:3001` and provides:
187
- - Visual theme configuration with live preview
188
- - Chain/token configuration
189
- - Copy-and-paste configuration code generation
176
+ A demo `https://widget.wheelx.fi`
190
177
 
191
178
  ## API Endpoint
192
179
 
package/dist/index.js CHANGED
@@ -197,7 +197,7 @@ var getEvmConnectorId = (wallet) => {
197
197
  };
198
198
  var useSyncWalletConnectedStore = () => {
199
199
  const userWallets = sdkReactCore.useUserWallets();
200
- const { address: wagmiAddress, connector: wagmiConnector } = wagmi.useAccount();
200
+ const { address: wagmiAddress, connector: wagmiConnector, isConnected } = wagmi.useAccount();
201
201
  const {
202
202
  setSolanaWalletAddress,
203
203
  setIsSolanaWalletConnected,
@@ -231,14 +231,15 @@ var useSyncWalletConnectedStore = () => {
231
231
  ).toLowerCase();
232
232
  return chain.includes("evm");
233
233
  });
234
- const evmAddress = evmWallet?.address ?? (evmWallet ? wagmiAddress : null) ?? null;
234
+ const evmAddress = evmWallet?.address ?? wagmiAddress ?? null;
235
235
  const evmConnectorId = wagmiConnector?.id ?? getEvmConnectorId(evmWallet) ?? null;
236
236
  setEvmWalletInfo(evmAddress, evmConnectorId);
237
- setIsEthWalletConnected(Boolean(evmAddress));
237
+ setIsEthWalletConnected(Boolean(evmAddress || isConnected));
238
238
  }, [
239
239
  userWallets,
240
240
  wagmiAddress,
241
241
  wagmiConnector?.id,
242
+ isConnected,
242
243
  isLoggingOut,
243
244
  lastDisconnectTimestamp,
244
245
  setSolanaWalletAddress,
@@ -672,7 +673,10 @@ function ChainsAndTokensLoader({ children, config }) {
672
673
  }, [filteredChains, filteredTokens, data, setChains, setTokens, setSlippagePolicies]);
673
674
  const isReady = filteredChains && filteredTokens;
674
675
  if (!isReady) {
675
- return /* @__PURE__ */ jsxRuntime.jsx(LoadingSkeleton, {});
676
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
677
+ /* @__PURE__ */ jsxRuntime.jsx(WalletConnectionStateSync, {}),
678
+ /* @__PURE__ */ jsxRuntime.jsx(LoadingSkeleton, {})
679
+ ] });
676
680
  }
677
681
  return /* @__PURE__ */ jsxRuntime.jsx(FavoritesProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(TokenFavoritesProvider, { children: [
678
682
  /* @__PURE__ */ jsxRuntime.jsx(WalletConnectionStateSync, {}),