@talken/talkenkit 2.4.9 → 2.4.11

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.
Files changed (51) hide show
  1. package/dist/abcWallet-OQWH4ES2.js +184 -0
  2. package/dist/abcWallet-PP2WTSDI.js +184 -0
  3. package/dist/chunk-7FKWLUOV.js +6883 -0
  4. package/dist/chunk-JZQXBVCJ.js +6883 -0
  5. package/dist/components/RainbowKitProvider/InternalPinProvider.d.ts +2 -1
  6. package/dist/contexts/MultiChainContext.d.ts +2 -0
  7. package/dist/index.js +168 -134
  8. package/dist/wallets/walletConnectors/abcWallet/abcApi.js +3 -3
  9. package/dist/wallets/walletConnectors/abcWallet/abcBitcoinConnector.js +3 -3
  10. package/dist/wallets/walletConnectors/abcWallet/abcConnector.js +5 -5
  11. package/dist/wallets/walletConnectors/abcWallet/abcProvider.js +3 -3
  12. package/dist/wallets/walletConnectors/abcWallet/abcSolanaWalletAdapter.js +5 -5
  13. package/dist/wallets/walletConnectors/abcWallet/abcWallet.js +6 -6
  14. package/dist/wallets/walletConnectors/abcWallet/api/AuthApi.js +4 -4
  15. package/dist/wallets/walletConnectors/abcWallet/api/BaseApiClient.js +3 -3
  16. package/dist/wallets/walletConnectors/abcWallet/api/BitcoinApi.js +4 -4
  17. package/dist/wallets/walletConnectors/abcWallet/api/SigningApi.js +4 -4
  18. package/dist/wallets/walletConnectors/abcWallet/api/SolanaApi.js +4 -4
  19. package/dist/wallets/walletConnectors/abcWallet/api/TransactionApi.js +4 -4
  20. package/dist/wallets/walletConnectors/abcWallet/api/WalletApi.js +4 -4
  21. package/dist/wallets/walletConnectors/abcWallet/api/index.js +10 -10
  22. package/dist/wallets/walletConnectors/abcWallet/index.js +23 -23
  23. package/dist/wallets/walletConnectors/abcWallet/utils.js +2 -2
  24. package/dist/wallets/walletConnectors/abcWallet/walletGeneration.js +1 -1
  25. package/dist/wallets/walletConnectors/berasigWallet/berasigWallet.js +2 -2
  26. package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
  27. package/dist/wallets/walletConnectors/binanceWallet/binanceWallet.js +2 -2
  28. package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
  29. package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
  30. package/dist/wallets/walletConnectors/chunk-IL4WOWNJ.js +327 -0
  31. package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
  32. package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
  33. package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
  34. package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
  35. package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
  36. package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
  37. package/dist/wallets/walletConnectors/index.js +84 -84
  38. package/dist/wallets/walletConnectors/iopayWallet/iopayWallet.js +2 -2
  39. package/dist/wallets/walletConnectors/kaiaWallet/kaiaWallet.js +2 -2
  40. package/dist/wallets/walletConnectors/kaikasWallet/kaikasWallet.js +2 -2
  41. package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
  42. package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
  43. package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
  44. package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
  45. package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
  46. package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
  47. package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
  48. package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
  49. package/dist/wallets/walletConnectors/zealWallet/zealWallet.js +2 -2
  50. package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
  51. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -30,7 +30,7 @@ import {
30
30
  isTestnet,
31
31
  networkToChainId,
32
32
  networks_exports
33
- } from "./chunk-KCMRHCAB.js";
33
+ } from "./chunk-7FKWLUOV.js";
34
34
  import "./chunk-DFWCI4QG.js";
35
35
  import {
36
36
  darkTheme
@@ -50,7 +50,7 @@ import {
50
50
  } from "./chunk-TJX4M23U.js";
51
51
 
52
52
  // src/components/ConnectButton/ConnectButton.tsx
53
- import React76, { useContext as useContext27, useEffect as useEffect25, useState as useState30 } from "react";
53
+ import React76, { useContext as useContext28, useEffect as useEffect25, useState as useState30 } from "react";
54
54
 
55
55
  // src/css/sprinkles.css.ts
56
56
  import { createMapValueFn as _51c72 } from "@vanilla-extract/sprinkles/createUtils";
@@ -1078,7 +1078,7 @@ function ShowBalanceProvider({ children }) {
1078
1078
  var useShowBalance = () => useContext4(ShowBalanceContext);
1079
1079
 
1080
1080
  // src/components/ConnectButton/ConnectButtonRenderer.tsx
1081
- import React75, { useContext as useContext26 } from "react";
1081
+ import React75, { useContext as useContext27 } from "react";
1082
1082
  import { useAccount as useAccount16, useConfig as useConfig4 } from "wagmi";
1083
1083
 
1084
1084
  // src/contexts/MultiChainContext.tsx
@@ -1142,6 +1142,7 @@ function MultiChainProvider({
1142
1142
  evmConnected,
1143
1143
  solanaAddress,
1144
1144
  solanaConnected,
1145
+ solanaWallet,
1145
1146
  activeChain,
1146
1147
  setActiveChain,
1147
1148
  disconnectAll
@@ -1702,7 +1703,7 @@ function useRecentTransactions() {
1702
1703
  import React74, {
1703
1704
  createContext as createContext14,
1704
1705
  useCallback as useCallback15,
1705
- useContext as useContext25,
1706
+ useContext as useContext26,
1706
1707
  useEffect as useEffect24,
1707
1708
  useMemo as useMemo13,
1708
1709
  useState as useState29
@@ -1710,7 +1711,7 @@ import React74, {
1710
1711
  import { useAccount as useAccount15, useAccountEffect as useAccountEffect3, useConfig as useConfig3 } from "wagmi";
1711
1712
 
1712
1713
  // src/components/AccountModal/AccountModal.tsx
1713
- import React40, { useContext as useContext13 } from "react";
1714
+ import React40, { useContext as useContext14 } from "react";
1714
1715
  import { useAccount as useAccount12, useDisconnect } from "wagmi";
1715
1716
 
1716
1717
  // src/components/Dialog/Dialog.tsx
@@ -1729,7 +1730,7 @@ import {
1729
1730
  } from "@solana/wallet-adapter-wallets";
1730
1731
  import React26, {
1731
1732
  createContext as createContext13,
1732
- useContext as useContext9,
1733
+ useContext as useContext10,
1733
1734
  useMemo as useMemo9
1734
1735
  } from "react";
1735
1736
  import { useAccountEffect as useAccountEffect2 } from "wagmi";
@@ -2719,8 +2720,12 @@ import { createContext as createContext8 } from "react";
2719
2720
  var CoolModeContext = createContext8(false);
2720
2721
 
2721
2722
  // src/components/RainbowKitProvider/InternalPinProvider.tsx
2722
- import { useWallet as useWallet3 } from "@solana/wallet-adapter-react";
2723
- import React15, { useState as useState9, useCallback as useCallback3, useEffect as useEffect10 } from "react";
2723
+ import React15, {
2724
+ useState as useState9,
2725
+ useCallback as useCallback3,
2726
+ useEffect as useEffect10,
2727
+ useContext as useContext6
2728
+ } from "react";
2724
2729
  import { useAccount as useAccount7 } from "wagmi";
2725
2730
 
2726
2731
  // src/components/AbcAuth/PinInputModal.tsx
@@ -2969,7 +2974,8 @@ function InternalPinProvider({
2969
2974
  const [pinRejecter, setPinRejecter] = useState9(null);
2970
2975
  const [error2, setError] = useState9("");
2971
2976
  const { connector, isConnected } = useAccount7();
2972
- const { wallet: solanaWallet } = useWallet3();
2977
+ const multiChain = useContext6(MultiChainContext);
2978
+ const solanaWallet = multiChain?.solanaWallet ?? null;
2973
2979
  const requestPin = useCallback3(
2974
2980
  (requestPurpose = "transaction") => {
2975
2981
  return new Promise((resolve, reject) => {
@@ -3064,7 +3070,7 @@ function InternalPinProvider({
3064
3070
  if (disabled || !solanaWallet) {
3065
3071
  return;
3066
3072
  }
3067
- const adapter = solanaWallet.adapter;
3073
+ const adapter = solanaWallet?.adapter;
3068
3074
  if (adapter && adapter.name === "ABC Wallet" && adapter.connected && typeof adapter.setRequestPinCallback === "function") {
3069
3075
  adapter.setRequestPinCallback(() => requestPin("transaction"));
3070
3076
  }
@@ -3089,7 +3095,7 @@ function InternalPinProvider({
3089
3095
  }
3090
3096
 
3091
3097
  // src/components/RainbowKitProvider/ModalSizeContext.tsx
3092
- import React17, { createContext as createContext10, useContext as useContext6 } from "react";
3098
+ import React17, { createContext as createContext10, useContext as useContext7 } from "react";
3093
3099
 
3094
3100
  // src/hooks/useWindowSize.ts
3095
3101
  import { useEffect as useEffect11, useState as useState10 } from "react";
@@ -3166,7 +3172,7 @@ function ModalSizeProvider({
3166
3172
  }) {
3167
3173
  const { width } = useWindowSize();
3168
3174
  const isSmallScreen = width && width < largeScreenMinWidth;
3169
- const { connector } = useContext6(WalletButtonContext);
3175
+ const { connector } = useContext7(WalletButtonContext);
3170
3176
  return /* @__PURE__ */ React17.createElement(
3171
3177
  ModalSizeContext.Provider,
3172
3178
  {
@@ -3177,7 +3183,7 @@ function ModalSizeProvider({
3177
3183
  }
3178
3184
 
3179
3185
  // src/components/RainbowKitProvider/RainbowKitConfigProvider.tsx
3180
- import React18, { createContext as createContext11, useContext as useContext7 } from "react";
3186
+ import React18, { createContext as createContext11, useContext as useContext8 } from "react";
3181
3187
  var RainbowKitConfigContext = createContext11(null);
3182
3188
  function RainbowKitConfigProvider({
3183
3189
  config: config2,
@@ -3186,7 +3192,7 @@ function RainbowKitConfigProvider({
3186
3192
  return /* @__PURE__ */ React18.createElement(RainbowKitConfigContext.Provider, { value: config2 }, children);
3187
3193
  }
3188
3194
  function useRainbowKitConfig() {
3189
- const context = useContext7(RainbowKitConfigContext);
3195
+ const context = useContext8(RainbowKitConfigContext);
3190
3196
  if (!context) {
3191
3197
  throw new Error(
3192
3198
  "useRainbowKitConfig must be used within RainbowKitProvider"
@@ -3207,7 +3213,7 @@ function setRainbowKitVersion({ version }) {
3207
3213
  }
3208
3214
  function useFingerprint() {
3209
3215
  const fingerprint = useCallback4(() => {
3210
- setRainbowKitVersion({ version: "2.4.9" });
3216
+ setRainbowKitVersion({ version: "2.4.11" });
3211
3217
  }, []);
3212
3218
  useEffect12(() => {
3213
3219
  fingerprint();
@@ -3521,7 +3527,7 @@ var LoginIcon = () => /* @__PURE__ */ React20.createElement(
3521
3527
  );
3522
3528
 
3523
3529
  // src/components/SignIn/SignIn.tsx
3524
- import React25, { useCallback as useCallback5, useContext as useContext8, useRef as useRef2 } from "react";
3530
+ import React25, { useCallback as useCallback5, useContext as useContext9, useRef as useRef2 } from "react";
3525
3531
  import { UserRejectedRequestError } from "viem";
3526
3532
  import { useAccount as useAccount8, useSignMessage } from "wagmi";
3527
3533
 
@@ -3722,7 +3728,7 @@ function SignIn({
3722
3728
  onClose,
3723
3729
  onCloseModal
3724
3730
  }) {
3725
- const { i18n: i18n2 } = useContext8(I18nContext);
3731
+ const { i18n: i18n2 } = useContext9(I18nContext);
3726
3732
  const [{ status, ...state }, setState] = React25.useState({ status: "idle" });
3727
3733
  const authAdapter = useAuthenticationAdapter();
3728
3734
  const getNonce = useCallback5(async () => {
@@ -3987,7 +3993,7 @@ var createThemeRootSelector = (id) => {
3987
3993
  return id ? `[${attr}="${id}"]` : `[${attr}]`;
3988
3994
  };
3989
3995
  var useThemeRootProps = () => {
3990
- const id = useContext9(ThemeIdContext);
3996
+ const id = useContext10(ThemeIdContext);
3991
3997
  return createThemeRootProps(id);
3992
3998
  };
3993
3999
  var defaultTheme = lightTheme();
@@ -4210,7 +4216,7 @@ function Dialog({ children, onClose, open, titleId }) {
4210
4216
  }
4211
4217
 
4212
4218
  // src/components/Dialog/DialogContent.tsx
4213
- import React29, { useContext as useContext10 } from "react";
4219
+ import React29, { useContext as useContext11 } from "react";
4214
4220
 
4215
4221
  // src/components/Dialog/DialogContent.css.ts
4216
4222
  var bottomSheetOverrides = "qs007r7";
@@ -4230,7 +4236,7 @@ function DialogContent({
4230
4236
  wide = false
4231
4237
  }) {
4232
4238
  const mobile = isMobile();
4233
- const modalSize = useContext10(ModalSizeContext);
4239
+ const modalSize = useContext11(ModalSizeContext);
4234
4240
  const compactModeEnabled = modalSize === ModalSizeOptions.COMPACT;
4235
4241
  return /* @__PURE__ */ React29.createElement(Box, { marginTop }, /* @__PURE__ */ React29.createElement(
4236
4242
  Box,
@@ -4246,7 +4252,7 @@ function DialogContent({
4246
4252
  }
4247
4253
 
4248
4254
  // src/components/ProfileDetails/ProfileDetails.tsx
4249
- import React39, { useCallback as useCallback10, useContext as useContext12, useEffect as useEffect16, useState as useState13 } from "react";
4255
+ import React39, { useCallback as useCallback10, useContext as useContext13, useEffect as useEffect16, useState as useState13 } from "react";
4250
4256
 
4251
4257
  // src/components/ConnectButton/abbreviateETHBalance.ts
4252
4258
  var units = ["k", "m", "b", "t"];
@@ -4360,7 +4366,7 @@ var DisconnectIcon = () => /* @__PURE__ */ React32.createElement(
4360
4366
  );
4361
4367
 
4362
4368
  // src/components/Txs/TxList.tsx
4363
- import React37, { useContext as useContext11 } from "react";
4369
+ import React37, { useContext as useContext12 } from "react";
4364
4370
  import { useAccount as useAccount11 } from "wagmi";
4365
4371
 
4366
4372
  // src/transactions/useClearRecentTransactions.ts
@@ -4531,8 +4537,8 @@ function TxList({ address }) {
4531
4537
  const visibleTxs = recentTransactions.slice(0, NUMBER_OF_VISIBLE_TXS);
4532
4538
  const hasTransactions = visibleTxs.length > 0;
4533
4539
  const mobile = isMobile();
4534
- const { appName } = useContext11(AppContext);
4535
- const { i18n: i18n2 } = useContext11(I18nContext);
4540
+ const { appName } = useContext12(AppContext);
4541
+ const { i18n: i18n2 } = useContext12(I18nContext);
4536
4542
  return /* @__PURE__ */ React37.createElement(React37.Fragment, null, /* @__PURE__ */ React37.createElement(
4537
4543
  Box,
4538
4544
  {
@@ -4708,7 +4714,7 @@ function ProfileDetails({
4708
4714
  onClose,
4709
4715
  onDisconnect
4710
4716
  }) {
4711
- const showRecentTransactions = useContext12(ShowRecentTransactionsContext);
4717
+ const showRecentTransactions = useContext13(ShowRecentTransactionsContext);
4712
4718
  const [copiedAddress, setCopiedAddress] = useState13(false);
4713
4719
  const copyAddressAction = useCallback10(() => {
4714
4720
  if (address) {
@@ -4732,7 +4738,7 @@ function ProfileDetails({
4732
4738
  const displayBalance = ethBalance ? abbreviateETHBalance(Number.parseFloat(ethBalance)) : void 0;
4733
4739
  const titleId = "rk_profile_title";
4734
4740
  const mobile = isMobile();
4735
- const { i18n: i18n2 } = useContext12(I18nContext);
4741
+ const { i18n: i18n2 } = useContext13(I18nContext);
4736
4742
  return /* @__PURE__ */ React39.createElement(React39.Fragment, null, /* @__PURE__ */ React39.createElement(Box, { display: "flex", flexDirection: "column" }, /* @__PURE__ */ React39.createElement(Box, { background: "profileForeground", padding: "16" }, /* @__PURE__ */ React39.createElement(
4737
4743
  Box,
4738
4744
  {
@@ -4835,7 +4841,7 @@ function AccountModal({ onClose, open }) {
4835
4841
  includeBalance: open
4836
4842
  });
4837
4843
  const { disconnect } = useDisconnect();
4838
- const multiChainContext = useContext13(MultiChainContext);
4844
+ const multiChainContext = useContext14(MultiChainContext);
4839
4845
  const displayAddress = address || multiChainContext?.solanaAddress;
4840
4846
  if (!displayAddress) {
4841
4847
  return null;
@@ -4863,7 +4869,7 @@ function AccountModal({ onClose, open }) {
4863
4869
  }
4864
4870
 
4865
4871
  // src/components/ChainModal/ChainModal.tsx
4866
- import React44, { useContext as useContext15, useState as useState14 } from "react";
4872
+ import React44, { useContext as useContext16, useState as useState14 } from "react";
4867
4873
  import { useAccount as useAccount13, useDisconnect as useDisconnect2, useSwitchChain } from "wagmi";
4868
4874
  import { useConfig as useConfig2 } from "wagmi";
4869
4875
 
@@ -4949,7 +4955,7 @@ var MenuButton = React42.forwardRef(
4949
4955
  MenuButton.displayName = "MenuButton";
4950
4956
 
4951
4957
  // src/components/ChainModal/Chain.tsx
4952
- import React43, { Fragment, useContext as useContext14 } from "react";
4958
+ import React43, { Fragment, useContext as useContext15 } from "react";
4953
4959
  var Chain = ({
4954
4960
  chainId,
4955
4961
  currentChainId,
@@ -4962,7 +4968,7 @@ var Chain = ({
4962
4968
  idx
4963
4969
  }) => {
4964
4970
  const mobile = isMobile();
4965
- const { i18n: i18n2 } = useContext14(I18nContext);
4971
+ const { i18n: i18n2 } = useContext15(I18nContext);
4966
4972
  const rainbowkitChains = useRainbowKitChains();
4967
4973
  const isCurrentChain = currentChainId === chainId;
4968
4974
  return /* @__PURE__ */ React43.createElement(Fragment, null, /* @__PURE__ */ React43.createElement(
@@ -5078,7 +5084,7 @@ function ChainModal({ onClose, open }) {
5078
5084
  }
5079
5085
  }
5080
5086
  });
5081
- const { i18n: i18n2 } = useContext15(I18nContext);
5087
+ const { i18n: i18n2 } = useContext16(I18nContext);
5082
5088
  const { disconnect } = useDisconnect2();
5083
5089
  const titleId = "rk_chain_modal_title";
5084
5090
  const mobile = isMobile();
@@ -5188,14 +5194,14 @@ function ChainModal({ onClose, open }) {
5188
5194
  }
5189
5195
 
5190
5196
  // src/components/ConnectModal/ConnectModal.tsx
5191
- import React73, { useContext as useContext24 } from "react";
5197
+ import React73, { useContext as useContext25 } from "react";
5192
5198
  import { useAccount as useAccount14, useDisconnect as useDisconnect3 } from "wagmi";
5193
5199
 
5194
5200
  // src/components/ConnectOptions/ConnectOptions.tsx
5195
5201
  import {
5196
5202
  WalletContext
5197
5203
  } from "@solana/wallet-adapter-react";
5198
- import React69, { useCallback as useCallback12, useContext as useContext22, useMemo as useMemo12, useState as useState26 } from "react";
5204
+ import React69, { useCallback as useCallback12, useContext as useContext23, useMemo as useMemo12, useState as useState26 } from "react";
5199
5205
 
5200
5206
  // src/wallets/recentSolanaWalletIds.ts
5201
5207
  var storageKey5 = "rk-recent-solana";
@@ -5219,11 +5225,11 @@ function addRecentSolanaWalletId(walletName2) {
5219
5225
  }
5220
5226
 
5221
5227
  // src/components/ConnectOptions/ConnectOptionsModal.tsx
5222
- import React66, { useContext as useContext19, useEffect as useEffect21, useRef as useRef5, useState as useState23 } from "react";
5228
+ import React66, { useContext as useContext20, useEffect as useEffect21, useRef as useRef5, useState as useState23 } from "react";
5223
5229
  import { useConnect as useConnect2, useConnectors } from "wagmi";
5224
5230
 
5225
5231
  // src/components/ConnectModal/ConnectModalIntro.tsx
5226
- import React47, { useContext as useContext16 } from "react";
5232
+ import React47, { useContext as useContext17 } from "react";
5227
5233
 
5228
5234
  // src/components/Disclaimer/DisclaimerLink.tsx
5229
5235
  import React45 from "react";
@@ -5255,8 +5261,8 @@ function ConnectModalIntro({
5255
5261
  compactModeEnabled = false,
5256
5262
  getWallet
5257
5263
  }) {
5258
- const { disclaimer: Disclaimer, learnMoreUrl } = useContext16(AppContext);
5259
- const { i18n: i18n2 } = useContext16(I18nContext);
5264
+ const { disclaimer: Disclaimer, learnMoreUrl } = useContext17(AppContext);
5265
+ const { i18n: i18n2 } = useContext17(I18nContext);
5260
5266
  return /* @__PURE__ */ React47.createElement(React47.Fragment, null, /* @__PURE__ */ React47.createElement(
5261
5267
  Box,
5262
5268
  {
@@ -5975,16 +5981,12 @@ async function googleLogin() {
5975
5981
  }
5976
5982
 
5977
5983
  // src/services/AbcAuthService.ts
5978
- var DEBUG = true;
5979
5984
  async function registerUser(params, config2) {
5980
5985
  const client = createAbcWaasClient({
5981
5986
  waasUrl: config2?.waasUrl || process.env.NEXT_PUBLIC_ABC_WAAS_URL || "",
5982
5987
  plain: "",
5983
5988
  environment: config2?.environment || "development"
5984
5989
  });
5985
- if (DEBUG) {
5986
- console.log("[AbcAuthService] \u{1F4DD} Registering user");
5987
- }
5988
5990
  return await client.registerUser(params);
5989
5991
  }
5990
5992
  async function registerSnsUser(params, config2) {
@@ -5993,9 +5995,6 @@ async function registerSnsUser(params, config2) {
5993
5995
  plain: "",
5994
5996
  environment: config2?.environment || "development"
5995
5997
  });
5996
- if (DEBUG) {
5997
- console.log("[AbcAuthService] \u{1F4DD} Registering SNS user");
5998
- }
5999
5998
  return await client.registerSnsUser(params);
6000
5999
  }
6001
6000
  async function resetPassword(params, config2) {
@@ -6004,9 +6003,6 @@ async function resetPassword(params, config2) {
6004
6003
  plain: "",
6005
6004
  environment: config2?.environment || "development"
6006
6005
  });
6007
- if (DEBUG) {
6008
- console.log("[AbcAuthService] \u{1F510} Setting password for user");
6009
- }
6010
6006
  return await client.resetPassword(params);
6011
6007
  }
6012
6008
  async function emailCheck(email, config2) {
@@ -6023,9 +6019,6 @@ async function sendOtpCode(email, config2) {
6023
6019
  plain: "",
6024
6020
  environment: config2?.environment || "development"
6025
6021
  });
6026
- if (DEBUG) {
6027
- console.log("[AbcAuthService] \u{1F4E7} Sending OTP");
6028
- }
6029
6022
  return await client.sendOtpCode(email);
6030
6023
  }
6031
6024
  async function verifyOtpCode(email, code, config2) {
@@ -6034,16 +6027,10 @@ async function verifyOtpCode(email, code, config2) {
6034
6027
  plain: "",
6035
6028
  environment: config2?.environment || "development"
6036
6029
  });
6037
- if (DEBUG) {
6038
- console.log("[AbcAuthService] \u{1F510} Verifying OTP");
6039
- }
6040
6030
  return await client.verifyOtpCodeSignup(email, code);
6041
6031
  }
6042
6032
  async function loginWithPassword(params, apiServer) {
6043
6033
  const talkenApiUrl = apiServer || process.env.NEXT_PUBLIC_API_SERVER || "https://dev.walletapi.talken.io";
6044
- if (DEBUG) {
6045
- console.log("[AbcAuthService] \u{1F510} Logging in");
6046
- }
6047
6034
  const response = await fetch(`${talkenApiUrl}/abc/login`, {
6048
6035
  method: "POST",
6049
6036
  headers: {
@@ -6063,28 +6050,16 @@ async function loginWithPassword(params, apiServer) {
6063
6050
  return text ? JSON.parse(text) : {};
6064
6051
  }
6065
6052
  async function googleLogin2(config2) {
6066
- if (DEBUG) {
6067
- console.log("[AbcAuthService] \u{1F510} Starting Google login flow");
6068
- }
6069
6053
  initializeFirebase();
6070
6054
  const googleAuth = await googleLogin();
6071
6055
  if (!googleAuth) {
6072
- if (DEBUG) {
6073
- console.log("[AbcAuthService] \u2139\uFE0F Google login cancelled by user");
6074
- }
6075
6056
  return null;
6076
6057
  }
6077
- if (DEBUG) {
6078
- console.log("[AbcAuthService] \u2705 Google OAuth successful");
6079
- }
6080
6058
  const client = createAbcWaasClient({
6081
6059
  waasUrl: config2?.waasUrl || process.env.NEXT_PUBLIC_ABC_WAAS_URL || "",
6082
6060
  plain: "",
6083
6061
  environment: config2?.environment || "development"
6084
6062
  });
6085
- if (DEBUG) {
6086
- console.log("[AbcAuthService] \u{1F510} Calling snsLogin API");
6087
- }
6088
6063
  const isIframe = typeof window !== "undefined" && window.self !== window.top;
6089
6064
  const response = await client.snsLogin({
6090
6065
  token: googleAuth.idToken,
@@ -6094,9 +6069,6 @@ async function googleLogin2(config2) {
6094
6069
  // Fixed audience URL from reference
6095
6070
  isIframe
6096
6071
  });
6097
- if (DEBUG) {
6098
- console.log("[AbcAuthService] \u2705 Google login complete");
6099
- }
6100
6072
  return response;
6101
6073
  }
6102
6074
 
@@ -6796,7 +6768,7 @@ function AbcWaasAuthFlow({
6796
6768
  }
6797
6769
 
6798
6770
  // src/components/ConnectOptions/ConnectDetails.tsx
6799
- import React60, { useContext as useContext17, useEffect as useEffect17 } from "react";
6771
+ import React60, { useContext as useContext18, useEffect as useEffect17 } from "react";
6800
6772
 
6801
6773
  // src/utils/colors.ts
6802
6774
  var convertHexToRGBA = (hexCode, opacity = 1) => {
@@ -7077,7 +7049,7 @@ function GetDetail({
7077
7049
  (wallet) => wallet.isRainbowKitConnector
7078
7050
  );
7079
7051
  const shownWallets = wallets.splice(0, 5);
7080
- const { i18n: i18n2 } = useContext17(I18nContext);
7052
+ const { i18n: i18n2 } = useContext18(I18nContext);
7081
7053
  return /* @__PURE__ */ React60.createElement(
7082
7054
  Box,
7083
7055
  {
@@ -7188,7 +7160,7 @@ function ConnectDetail({
7188
7160
  } = wallet;
7189
7161
  const isDesktopDeepLinkAvailable = !!getDesktopUri;
7190
7162
  const safari = isSafari();
7191
- const { i18n: i18n2 } = useContext17(I18nContext);
7163
+ const { i18n: i18n2 } = useContext18(I18nContext);
7192
7164
  const hasExtension = !!wallet.extensionDownloadUrl;
7193
7165
  const hasQrCodeAndExtension = downloadUrls?.qrCode && hasExtension;
7194
7166
  const hasQrCodeAndDesktop = downloadUrls?.qrCode && !!wallet.desktopDownloadUrl;
@@ -7562,7 +7534,7 @@ function DownloadOptionsDetail({
7562
7534
  }) {
7563
7535
  const browser = getBrowser();
7564
7536
  const platform = getPlatform();
7565
- const modalSize = useContext17(ModalSizeContext);
7537
+ const modalSize = useContext18(ModalSizeContext);
7566
7538
  const isCompact = modalSize === "compact";
7567
7539
  const {
7568
7540
  desktop,
@@ -7571,7 +7543,7 @@ function DownloadOptionsDetail({
7571
7543
  extensionDownloadUrl,
7572
7544
  mobileDownloadUrl
7573
7545
  } = wallet;
7574
- const { i18n: i18n2 } = useContext17(I18nContext);
7546
+ const { i18n: i18n2 } = useContext18(I18nContext);
7575
7547
  useEffect17(() => {
7576
7548
  preloadCreateIcon();
7577
7549
  preloadScanIcon();
@@ -7667,7 +7639,7 @@ function DownloadDetail({
7667
7639
  wallet
7668
7640
  }) {
7669
7641
  const { downloadUrls, qrCode } = wallet;
7670
- const { i18n: i18n2 } = useContext17(I18nContext);
7642
+ const { i18n: i18n2 } = useContext18(I18nContext);
7671
7643
  useEffect17(() => {
7672
7644
  preloadCreateIcon();
7673
7645
  preloadScanIcon();
@@ -7730,7 +7702,7 @@ function InstructionMobileDetail({
7730
7702
  connectWallet,
7731
7703
  wallet
7732
7704
  }) {
7733
- const { i18n: i18n2 } = useContext17(I18nContext);
7705
+ const { i18n: i18n2 } = useContext18(I18nContext);
7734
7706
  return /* @__PURE__ */ React60.createElement(
7735
7707
  Box,
7736
7708
  {
@@ -7818,7 +7790,7 @@ function InstructionMobileDetail({
7818
7790
  function InstructionExtensionDetail({
7819
7791
  wallet
7820
7792
  }) {
7821
- const { i18n: i18n2 } = useContext17(I18nContext);
7793
+ const { i18n: i18n2 } = useContext18(I18nContext);
7822
7794
  return /* @__PURE__ */ React60.createElement(
7823
7795
  Box,
7824
7796
  {
@@ -7907,7 +7879,7 @@ function InstructionDesktopDetail({
7907
7879
  connectWallet,
7908
7880
  wallet
7909
7881
  }) {
7910
- const { i18n: i18n2 } = useContext17(I18nContext);
7882
+ const { i18n: i18n2 } = useContext18(I18nContext);
7911
7883
  return /* @__PURE__ */ React60.createElement(
7912
7884
  Box,
7913
7885
  {
@@ -8000,10 +7972,10 @@ import React62, { Fragment as Fragment2 } from "react";
8000
7972
  import React61 from "react";
8001
7973
 
8002
7974
  // src/components/RainbowKitProvider/useCoolMode.ts
8003
- import { useContext as useContext18, useEffect as useEffect18, useRef as useRef4 } from "react";
7975
+ import { useContext as useContext19, useEffect as useEffect18, useRef as useRef4 } from "react";
8004
7976
  var useCoolMode = (imageUrl) => {
8005
7977
  const ref = useRef4(null);
8006
- const coolModeEnabled = useContext18(CoolModeContext);
7978
+ const coolModeEnabled = useContext19(CoolModeContext);
8007
7979
  const resolvedImageUrl = useAsyncImage(imageUrl);
8008
7980
  useEffect18(() => {
8009
7981
  if (coolModeEnabled && ref.current && resolvedImageUrl) {
@@ -9312,16 +9284,16 @@ function ConnectOptionsModal({
9312
9284
  compact = false
9313
9285
  }) {
9314
9286
  const titleId = "rk_connect_title";
9315
- const modalSize = useContext19(ModalSizeContext);
9287
+ const modalSize = useContext20(ModalSizeContext);
9316
9288
  const compactModeEnabled = modalSize === ModalSizeOptions.COMPACT;
9317
- const { disclaimer: Disclaimer } = useContext19(AppContext);
9318
- const { i18n: i18n2 } = useContext19(I18nContext);
9289
+ const { disclaimer: Disclaimer } = useContext20(AppContext);
9290
+ const { i18n: i18n2 } = useContext20(I18nContext);
9319
9291
  const STORAGE_PREFIX2 = "talkenkit_abc_";
9320
9292
  const [abcWaasLoginData, setAbcWaasLoginData] = useState23(null);
9321
9293
  const [email, setEmail] = useState23("");
9322
9294
  const initialized = useRef5(false);
9323
9295
  const pinAuthFlowRef = useRef5(null);
9324
- const { connector } = useContext19(WalletButtonContext);
9296
+ const { connector } = useContext20(WalletButtonContext);
9325
9297
  const mergeEIP6963WithRkConnectors = !connector;
9326
9298
  const wallets = useWalletConnectors(mergeEIP6963WithRkConnectors).filter((wallet) => wallet.ready || !!wallet.extensionDownloadUrl).sort((a, b) => a.groupIndex - b.groupIndex);
9327
9299
  const unfilteredWallets = useWalletConnectors();
@@ -9765,7 +9737,7 @@ function ConnectOptionsModal({
9765
9737
  // src/components/ConnectOptions/MobileOptions.tsx
9766
9738
  import React67, {
9767
9739
  useCallback as useCallback11,
9768
- useContext as useContext20,
9740
+ useContext as useContext21,
9769
9741
  useEffect as useEffect23,
9770
9742
  useRef as useRef6,
9771
9743
  useState as useState25
@@ -9858,7 +9830,7 @@ function WalletButton({
9858
9830
  } = wallet;
9859
9831
  const coolModeRef = useCoolMode(iconUrl);
9860
9832
  const initialized = useRef6(false);
9861
- const { i18n: i18n2 } = useContext20(I18nContext);
9833
+ const { i18n: i18n2 } = useContext21(I18nContext);
9862
9834
  const onConnect = useCallback11(async () => {
9863
9835
  const onMobileUri = async () => {
9864
9836
  const mobileUri = await getMobileUri?.();
@@ -9967,7 +9939,7 @@ function MobileOptions({ onClose }) {
9967
9939
  const wallets = useWalletConnectors().filter(
9968
9940
  (wallet) => wallet.isRainbowKitConnector
9969
9941
  );
9970
- const { disclaimer: Disclaimer, learnMoreUrl } = useContext20(AppContext);
9942
+ const { disclaimer: Disclaimer, learnMoreUrl } = useContext21(AppContext);
9971
9943
  let headerLabel = null;
9972
9944
  let walletContent = null;
9973
9945
  let headerBackgroundContrast = false;
@@ -9975,7 +9947,7 @@ function MobileOptions({ onClose }) {
9975
9947
  const [walletStep, setWalletStep] = useState25(
9976
9948
  "CONNECT" /* Connect */
9977
9949
  );
9978
- const { i18n: i18n2 } = useContext20(I18nContext);
9950
+ const { i18n: i18n2 } = useContext21(I18nContext);
9979
9951
  const ios = isIOS();
9980
9952
  switch (walletStep) {
9981
9953
  case "CONNECT" /* Connect */: {
@@ -10213,10 +10185,10 @@ function MobileOptions({ onClose }) {
10213
10185
  }
10214
10186
 
10215
10187
  // src/components/ConnectOptions/MobileStatus.tsx
10216
- import React68, { useContext as useContext21 } from "react";
10188
+ import React68, { useContext as useContext22 } from "react";
10217
10189
  var MobileStatus = ({ onClose }) => {
10218
- const { connector } = useContext21(WalletButtonContext);
10219
- const { i18n: i18n2 } = useContext21(I18nContext);
10190
+ const { connector } = useContext22(WalletButtonContext);
10191
+ const { i18n: i18n2 } = useContext22(I18nContext);
10220
10192
  const connectorName = connector?.name || "";
10221
10193
  return /* @__PURE__ */ React68.createElement(Box, null, /* @__PURE__ */ React68.createElement(
10222
10194
  Box,
@@ -10260,9 +10232,9 @@ var MobileStatus = ({ onClose }) => {
10260
10232
 
10261
10233
  // src/components/ConnectOptions/ConnectOptions.tsx
10262
10234
  function ConnectOptions({ onClose }) {
10263
- const { connector } = useContext22(WalletButtonContext);
10264
- const multiChainContext = useContext22(MultiChainContext);
10265
- const walletContext = useContext22(
10235
+ const { connector } = useContext23(WalletButtonContext);
10236
+ const multiChainContext = useContext23(MultiChainContext);
10237
+ const walletContext = useContext23(
10266
10238
  WalletContext
10267
10239
  );
10268
10240
  const { solanaWallets, select, connecting } = useMemo12(() => {
@@ -10387,8 +10359,8 @@ function ConnectOptions({ onClose }) {
10387
10359
  }
10388
10360
 
10389
10361
  // src/components/ConnectOptions/MultiChainConnectOptions.tsx
10390
- import { useWallet as useWallet5 } from "@solana/wallet-adapter-react";
10391
- import React72, { useContext as useContext23, useCallback as useCallback14, useState as useState28 } from "react";
10362
+ import { useWallet as useWallet4 } from "@solana/wallet-adapter-react";
10363
+ import React72, { useContext as useContext24, useCallback as useCallback14, useState as useState28 } from "react";
10392
10364
 
10393
10365
  // src/components/ChainSelector/ChainSelector.tsx
10394
10366
  import clsx3 from "clsx";
@@ -10453,7 +10425,7 @@ function ChainSelector({
10453
10425
  }
10454
10426
 
10455
10427
  // src/components/SolanaWalletList/SolanaWalletList.tsx
10456
- import { useWallet as useWallet4 } from "@solana/wallet-adapter-react";
10428
+ import { useWallet as useWallet3 } from "@solana/wallet-adapter-react";
10457
10429
  import React71, { useCallback as useCallback13, useState as useState27 } from "react";
10458
10430
 
10459
10431
  // src/components/SolanaWalletList/SolanaWalletList.css.ts
@@ -10470,7 +10442,7 @@ function SolanaWalletList2({
10470
10442
  onConnect,
10471
10443
  onError
10472
10444
  }) {
10473
- const { wallets, select, connect, connecting } = useWallet4();
10445
+ const { wallets, select, connect, connecting } = useWallet3();
10474
10446
  const [connectingWallet, setConnectingWallet] = useState27(null);
10475
10447
  const handleWalletClick = useCallback13(
10476
10448
  async (walletName2) => {
@@ -10543,8 +10515,8 @@ function MultiChainConnectOptions({
10543
10515
  onClose,
10544
10516
  showChainSelector = true
10545
10517
  }) {
10546
- const multiChainContext = useContext23(MultiChainContext);
10547
- const { connector } = useContext23(WalletButtonContext);
10518
+ const multiChainContext = useContext24(MultiChainContext);
10519
+ const { connector } = useContext24(WalletButtonContext);
10548
10520
  if (!multiChainContext) {
10549
10521
  return isMobile() ? connector ? /* @__PURE__ */ React72.createElement(MobileStatus, { onClose }) : /* @__PURE__ */ React72.createElement(MobileOptions, { onClose }) : /* @__PURE__ */ React72.createElement(ConnectOptionsModal, { onClose });
10550
10522
  }
@@ -10565,8 +10537,8 @@ function MultiChainConnectOptions({
10565
10537
  return /* @__PURE__ */ React72.createElement(UnifiedWalletList, { onClose });
10566
10538
  }
10567
10539
  function UnifiedWalletList({ onClose }) {
10568
- const { wallets: solanaWallets, select, connecting } = useWallet5();
10569
- const _multiChainContext = useContext23(MultiChainContext);
10540
+ const { wallets: solanaWallets, select, connecting } = useWallet4();
10541
+ const _multiChainContext = useContext24(MultiChainContext);
10570
10542
  const [connectingWallet, setConnectingWallet] = useState28(null);
10571
10543
  const handleSolanaWalletClick = useCallback14(
10572
10544
  async (walletName2) => {
@@ -10650,7 +10622,7 @@ function UnifiedWalletList({ onClose }) {
10650
10622
  function ConnectModal({ onClose, open }) {
10651
10623
  const titleId = "rk_connect_title";
10652
10624
  const connectionStatus = useConnectionStatus();
10653
- const multiChainContext = useContext24(MultiChainContext);
10625
+ const multiChainContext = useContext25(MultiChainContext);
10654
10626
  const { disconnect } = useDisconnect3();
10655
10627
  const { isConnecting, isConnected } = useAccount14();
10656
10628
  React73.useEffect(() => {
@@ -10726,7 +10698,7 @@ function ModalProvider({ children }) {
10726
10698
  const { chainId } = useAccount15();
10727
10699
  const { chains } = useConfig3();
10728
10700
  const isCurrentChainSupported = chains.some((chain) => chain.id === chainId);
10729
- const multiChainContext = useContext25(MultiChainContext);
10701
+ const multiChainContext = useContext26(MultiChainContext);
10730
10702
  const _isAnyChainConnected = connectionStatus === "connected" || multiChainContext?.solanaConnected;
10731
10703
  const closeModals = useCallback15(
10732
10704
  ({ keepConnectModalOpen = false } = {}) => {
@@ -10782,7 +10754,7 @@ function ModalProvider({ children }) {
10782
10754
  );
10783
10755
  }
10784
10756
  function useModalState() {
10785
- const { accountModalOpen, chainModalOpen, connectModalOpen } = useContext25(ModalContext);
10757
+ const { accountModalOpen, chainModalOpen, connectModalOpen } = useContext26(ModalContext);
10786
10758
  return {
10787
10759
  accountModalOpen,
10788
10760
  chainModalOpen,
@@ -10790,19 +10762,19 @@ function useModalState() {
10790
10762
  };
10791
10763
  }
10792
10764
  function useAccountModal() {
10793
- const { accountModalOpen, openAccountModal } = useContext25(ModalContext);
10765
+ const { accountModalOpen, openAccountModal } = useContext26(ModalContext);
10794
10766
  return { accountModalOpen, openAccountModal };
10795
10767
  }
10796
10768
  function useChainModal() {
10797
- const { chainModalOpen, openChainModal } = useContext25(ModalContext);
10769
+ const { chainModalOpen, openChainModal } = useContext26(ModalContext);
10798
10770
  return { chainModalOpen, openChainModal };
10799
10771
  }
10800
10772
  function useWalletConnectOpenState() {
10801
- const { isWalletConnectModalOpen, setIsWalletConnectModalOpen } = useContext25(ModalContext);
10773
+ const { isWalletConnectModalOpen, setIsWalletConnectModalOpen } = useContext26(ModalContext);
10802
10774
  return { isWalletConnectModalOpen, setIsWalletConnectModalOpen };
10803
10775
  }
10804
10776
  function useConnectModal() {
10805
- const { connectModalOpen, openConnectModal } = useContext25(ModalContext);
10777
+ const { connectModalOpen, openConnectModal } = useContext26(ModalContext);
10806
10778
  const { isWalletConnectModalOpen } = useWalletConnectOpenState();
10807
10779
  return {
10808
10780
  connectModalOpen: connectModalOpen || isWalletConnectModalOpen,
@@ -10830,8 +10802,8 @@ function ConnectButtonRenderer({
10830
10802
  const chainIconUrl = rainbowKitChain?.iconUrl ?? void 0;
10831
10803
  const chainIconBackground = rainbowKitChain?.iconBackground ?? void 0;
10832
10804
  const resolvedChainIconUrl = useAsyncImage(chainIconUrl);
10833
- const multiChainContext = useContext26(MultiChainContext);
10834
- const showRecentTransactions = useContext26(ShowRecentTransactionsContext);
10805
+ const multiChainContext = useContext27(MultiChainContext);
10806
+ const showRecentTransactions = useContext27(ShowRecentTransactionsContext);
10835
10807
  const hasPendingTransactions = useRecentTransactions().some(({ status }) => status === "pending") && showRecentTransactions;
10836
10808
  const { showBalance } = useShowBalance();
10837
10809
  const computeShouldShowBalance = () => {
@@ -10911,7 +10883,7 @@ function ConnectButton({
10911
10883
  const connectionStatus = useConnectionStatus();
10912
10884
  const { setShowBalance } = useShowBalance();
10913
10885
  const [ready, setReady] = useState30(false);
10914
- const { i18n: i18n2 } = useContext27(I18nContext);
10886
+ const { i18n: i18n2 } = useContext28(I18nContext);
10915
10887
  useEffect25(() => {
10916
10888
  setShowBalance(showBalance);
10917
10889
  if (!ready)
@@ -11144,7 +11116,7 @@ ConnectButton.__defaultProps = defaultProps;
11144
11116
  ConnectButton.Custom = ConnectButtonRenderer;
11145
11117
 
11146
11118
  // src/components/WalletButton/WalletButton.tsx
11147
- import React78, { useContext as useContext29 } from "react";
11119
+ import React78, { useContext as useContext30 } from "react";
11148
11120
 
11149
11121
  // src/components/WalletButton/WalletButton.css.ts
11150
11122
  var border = "hk857q0";
@@ -11152,7 +11124,7 @@ var maxWidth = "hk857q1";
11152
11124
 
11153
11125
  // src/components/WalletButton/WalletButtonRenderer.tsx
11154
11126
  import React77, {
11155
- useContext as useContext28,
11127
+ useContext as useContext29,
11156
11128
  useEffect as useEffect26,
11157
11129
  useMemo as useMemo14,
11158
11130
  useState as useState31
@@ -11167,7 +11139,7 @@ function WalletButtonRenderer({
11167
11139
  const isMounted = useIsMounted();
11168
11140
  const { openConnectModal } = useConnectModal();
11169
11141
  const { connectModalOpen } = useModalState();
11170
- const { connector, setConnector } = useContext28(WalletButtonContext);
11142
+ const { connector, setConnector } = useContext29(WalletButtonContext);
11171
11143
  const [firstConnector] = useWalletConnectors().filter((wallet2) => wallet2.isRainbowKitConnector).filter((_wallet) => _wallet.id.toLowerCase() === wallet.toLowerCase()).sort((a, b) => a.groupIndex - b.groupIndex);
11172
11144
  if (!firstConnector) {
11173
11145
  throw new Error("Connector not found");
@@ -11238,7 +11210,7 @@ function WalletButtonRenderer({
11238
11210
  var WalletButton2 = ({ wallet }) => {
11239
11211
  return /* @__PURE__ */ React78.createElement(WalletButtonRenderer, { wallet }, ({ ready, connect, connected, mounted, connector, loading }) => {
11240
11212
  const isDisabled = !ready || loading;
11241
- const { i18n: i18n2 } = useContext29(I18nContext);
11213
+ const { i18n: i18n2 } = useContext30(I18nContext);
11242
11214
  const connectorName = connector?.name || "";
11243
11215
  if (!mounted)
11244
11216
  return;
@@ -12220,16 +12192,16 @@ function ChainIndicator({
12220
12192
  // src/providers/AbcAuthProvider.tsx
12221
12193
  import React80, {
12222
12194
  createContext as createContext15,
12223
- useContext as useContext30,
12195
+ useContext as useContext31,
12224
12196
  useState as useState32,
12225
12197
  useEffect as useEffect28,
12226
12198
  useCallback as useCallback17
12227
12199
  } from "react";
12228
- var DEBUG2 = true;
12200
+ var DEBUG = true;
12229
12201
  var STORAGE_PREFIX = "talkenkit_abc_";
12230
12202
  var AbcAuthContext = createContext15(null);
12231
12203
  function useAbcAuth() {
12232
- const context = useContext30(AbcAuthContext);
12204
+ const context = useContext31(AbcAuthContext);
12233
12205
  if (!context) {
12234
12206
  throw new Error("useAbcAuth must be used within AbcAuthProvider");
12235
12207
  }
@@ -12260,7 +12232,7 @@ function AbcAuthProvider({ children }) {
12260
12232
  }, [state.tokens.expiresAt]);
12261
12233
  const refreshToken = useCallback17(async () => {
12262
12234
  if (!state.tokens.refreshToken) {
12263
- if (DEBUG2)
12235
+ if (DEBUG)
12264
12236
  console.log("[AbcAuthProvider] No refresh token available");
12265
12237
  return false;
12266
12238
  }
@@ -12307,7 +12279,7 @@ function AbcAuthProvider({ children }) {
12307
12279
  );
12308
12280
  }
12309
12281
  localStorage.setItem(`${STORAGE_PREFIX}expires_at`, String(expiresAt));
12310
- if (DEBUG2)
12282
+ if (DEBUG)
12311
12283
  console.log("[AbcAuthProvider] \u2705 Token refreshed");
12312
12284
  return true;
12313
12285
  }
@@ -12354,7 +12326,7 @@ function AbcAuthProvider({ children }) {
12354
12326
  },
12355
12327
  pinHash: hashedPin
12356
12328
  }));
12357
- if (DEBUG2)
12329
+ if (DEBUG)
12358
12330
  console.log("[AbcAuthProvider] \u2705 Unlocked with PIN");
12359
12331
  return true;
12360
12332
  } catch (error2) {
@@ -12376,7 +12348,7 @@ function AbcAuthProvider({ children }) {
12376
12348
  for (const key of keys) {
12377
12349
  localStorage.removeItem(key);
12378
12350
  }
12379
- if (DEBUG2)
12351
+ if (DEBUG)
12380
12352
  console.log("[AbcAuthProvider] \u2705 Logged out");
12381
12353
  }, []);
12382
12354
  const setAuthState = useCallback17((partial) => {
@@ -12418,7 +12390,7 @@ function AbcAuthProvider({ children }) {
12418
12390
  },
12419
12391
  pinHash
12420
12392
  });
12421
- if (DEBUG2)
12393
+ if (DEBUG)
12422
12394
  console.log("[AbcAuthProvider] \u2705 Session restored", {
12423
12395
  hasEvm: !!authState.evmWallet || !!authState.wallet,
12424
12396
  hasSolana: !!authState.solanaWallet
@@ -12430,7 +12402,7 @@ function AbcAuthProvider({ children }) {
12430
12402
  };
12431
12403
  restoreSession();
12432
12404
  const handleStorageUpdate = () => {
12433
- if (DEBUG2)
12405
+ if (DEBUG)
12434
12406
  console.log("[AbcAuthProvider] \u{1F504} Storage updated, restoring session");
12435
12407
  restoreSession();
12436
12408
  };
@@ -12448,7 +12420,7 @@ function AbcAuthProvider({ children }) {
12448
12420
  const checkAndRefresh = () => {
12449
12421
  const timeUntilExpiry = state.tokens.expiresAt - Date.now();
12450
12422
  if (timeUntilExpiry < 3e4 && timeUntilExpiry > 0) {
12451
- if (DEBUG2)
12423
+ if (DEBUG)
12452
12424
  console.log("[AbcAuthProvider] Auto-refreshing token...");
12453
12425
  refreshToken();
12454
12426
  }
@@ -12470,7 +12442,7 @@ function AbcAuthProvider({ children }) {
12470
12442
  // src/components/AbcAuth/PinProvider.tsx
12471
12443
  import React81, {
12472
12444
  createContext as createContext16,
12473
- useContext as useContext31,
12445
+ useContext as useContext32,
12474
12446
  useState as useState33,
12475
12447
  useCallback as useCallback18,
12476
12448
  useEffect as useEffect29
@@ -12574,7 +12546,7 @@ function PinProvider({ children }) {
12574
12546
  ));
12575
12547
  }
12576
12548
  function usePin() {
12577
- const context = useContext31(PinContext);
12549
+ const context = useContext32(PinContext);
12578
12550
  if (!context) {
12579
12551
  return {
12580
12552
  requestPin: async () => {
@@ -12644,7 +12616,7 @@ function useBitcoinWallet() {
12644
12616
  });
12645
12617
  return;
12646
12618
  }
12647
- const { AbcBitcoinProvider, createAbcWaasApiClient: createAbcWaasApiClient2 } = await import("./abcWallet-U5ZRWNFY.js");
12619
+ const { AbcBitcoinProvider, createAbcWaasApiClient: createAbcWaasApiClient2 } = await import("./abcWallet-PP2WTSDI.js");
12648
12620
  const client = createAbcWaasApiClient2({
12649
12621
  waasUrl: process.env.NEXT_PUBLIC_ABC_WAAS_URL || "",
12650
12622
  plain: "",
@@ -12704,13 +12676,18 @@ function useBitcoinWallet() {
12704
12676
  }
12705
12677
 
12706
12678
  // src/hooks/useSolanaWallet.ts
12707
- import { useWallet as useWallet6 } from "@solana/wallet-adapter-react";
12679
+ import { useWallet as useWallet5 } from "@solana/wallet-adapter-react";
12708
12680
  import { useEffect as useEffect31, useState as useState35 } from "react";
12709
12681
  import { useAccount as useAccount22 } from "wagmi";
12710
12682
  function useSolanaWallet() {
12711
12683
  const { isConnected: evmConnected, connector } = useAccount22();
12712
12684
  const { requestPin } = usePin();
12713
- const externalWallet = useWallet6();
12685
+ const externalWallet = useWallet5();
12686
+ const [windowSolanaState, setWindowSolanaState] = useState35({
12687
+ connected: false,
12688
+ publicKey: null,
12689
+ walletName: null
12690
+ });
12714
12691
  const [abcWallet, setAbcWallet] = useState35({
12715
12692
  address: null,
12716
12693
  publicKey: null,
@@ -12757,7 +12734,7 @@ function useSolanaWallet() {
12757
12734
  });
12758
12735
  return;
12759
12736
  }
12760
- const { AbcSolanaProvider, createAbcWaasApiClient: createAbcWaasApiClient2 } = await import("./abcWallet-U5ZRWNFY.js");
12737
+ const { AbcSolanaProvider, createAbcWaasApiClient: createAbcWaasApiClient2 } = await import("./abcWallet-PP2WTSDI.js");
12761
12738
  const client = createAbcWaasApiClient2({
12762
12739
  waasUrl: process.env.NEXT_PUBLIC_ABC_WAAS_URL || "",
12763
12740
  plain: "",
@@ -12790,6 +12767,54 @@ function useSolanaWallet() {
12790
12767
  useEffect31(() => {
12791
12768
  refreshAbcWallet();
12792
12769
  }, [evmConnected, connector?.id]);
12770
+ useEffect31(() => {
12771
+ if (typeof window === "undefined")
12772
+ return;
12773
+ const checkWindowSolana = () => {
12774
+ const solana2 = window.solana;
12775
+ if (solana2) {
12776
+ const connected = solana2.isConnected === true;
12777
+ const publicKey = solana2.publicKey?.toString() || null;
12778
+ const walletName2 = solana2.isPhantom ? "Phantom" : solana2.isSolflare ? "Solflare" : solana2.isBackpack ? "Backpack" : "External Wallet";
12779
+ setWindowSolanaState((prev) => {
12780
+ if (prev.connected !== connected || prev.publicKey !== publicKey || prev.walletName !== walletName2) {
12781
+ if (connected && !externalWallet.connected) {
12782
+ console.warn(
12783
+ "[TalkenKit] Detected external Solana wallet via window.solana but wallet-adapter context is not connected.",
12784
+ "This usually means you have duplicate WalletProvider wrappers.",
12785
+ "Remove manual ConnectionProvider/WalletProvider when using TalkenKitProvider with solanaConfig."
12786
+ );
12787
+ }
12788
+ return { connected, publicKey, walletName: walletName2 };
12789
+ }
12790
+ return prev;
12791
+ });
12792
+ } else {
12793
+ setWindowSolanaState({
12794
+ connected: false,
12795
+ publicKey: null,
12796
+ walletName: null
12797
+ });
12798
+ }
12799
+ };
12800
+ checkWindowSolana();
12801
+ const interval = setInterval(checkWindowSolana, 500);
12802
+ const solana = window.solana;
12803
+ if (solana) {
12804
+ solana.on?.("connect", checkWindowSolana);
12805
+ solana.on?.("disconnect", checkWindowSolana);
12806
+ solana.on?.("accountChanged", checkWindowSolana);
12807
+ }
12808
+ return () => {
12809
+ clearInterval(interval);
12810
+ const solana2 = window.solana;
12811
+ if (solana2) {
12812
+ solana2.off?.("connect", checkWindowSolana);
12813
+ solana2.off?.("disconnect", checkWindowSolana);
12814
+ solana2.off?.("accountChanged", checkWindowSolana);
12815
+ }
12816
+ };
12817
+ }, [externalWallet.connected]);
12793
12818
  const activeWallet = abcWallet.isConnected ? {
12794
12819
  ...abcWallet,
12795
12820
  type: "abc",
@@ -12802,6 +12827,15 @@ function useSolanaWallet() {
12802
12827
  type: "external",
12803
12828
  walletName: externalWallet.wallet?.adapter.name || "External Wallet",
12804
12829
  provider: null
12830
+ } : windowSolanaState.connected ? {
12831
+ // Fallback to window.solana (for misconfigured providers)
12832
+ address: windowSolanaState.publicKey,
12833
+ publicKey: windowSolanaState.publicKey,
12834
+ network: process.env.NEXT_PUBLIC_ENVIRONMENT === "production" ? "solana" : "solana_devnet",
12835
+ isConnected: true,
12836
+ type: "external",
12837
+ walletName: windowSolanaState.walletName || "External Wallet",
12838
+ provider: null
12805
12839
  } : {
12806
12840
  address: null,
12807
12841
  publicKey: null,