@talken/talkenkit 2.5.5 → 2.5.7
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/dist/abcWallet-5VLBB4C4.js +162 -0
- package/dist/abcWallet-7BKPZLW4.js +162 -0
- package/dist/abcWallet-I7VJMOVP.js +162 -0
- package/dist/abcWallet-TD27X2R4.js +162 -0
- package/dist/abcWallet-TSIHDDB3.js +162 -0
- package/dist/abcWallet-ZCHM5OL7.js +162 -0
- package/dist/chunk-3GK3UTQB.js +6234 -0
- package/dist/chunk-BVKZJCFQ.js +6236 -0
- package/dist/chunk-SKVG45TX.js +6209 -0
- package/dist/chunk-TVFU4IPI.js +6226 -0
- package/dist/chunk-VMJ25FLU.js +6236 -0
- package/dist/chunk-XDQZKL3Y.js +6207 -0
- package/dist/components/ConfirmationModal/modalTheme.css.d.ts +6 -0
- package/dist/components/ConnectOptions/AbcWaasAuth/AbcWaasAuthFlow.d.ts +7 -1
- package/dist/components/ConnectOptions/AbcWaasAuth/AbcWaasAuthSections.css.d.ts +1 -0
- package/dist/components/GasFeeModal/modalTheme.css.d.ts +6 -0
- package/dist/components/RainbowKitProvider/ModalThemeModeContext.d.ts +18 -0
- package/dist/css/sprinkles.css.d.ts +1 -1
- package/dist/index.css +64 -24
- package/dist/index.d.ts +2 -0
- package/dist/index.js +311 -236
- package/dist/wallets/walletConnectors/abcWallet/abcConnector.js +2 -2
- package/dist/wallets/walletConnectors/abcWallet/abcProvider.js +1 -1
- package/dist/wallets/walletConnectors/abcWallet/abcSolanaProvider.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/abcWallet.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/api/index.js +7 -7
- package/dist/wallets/walletConnectors/abcWallet/index.js +10 -10
- package/dist/wallets/walletConnectors/abcWallet/types.d.ts +8 -0
- package/dist/wallets/walletConnectors/chunk-5GVUZMF6.js +58 -0
- package/dist/wallets/walletConnectors/chunk-5VICQRM2.js +378 -0
- package/dist/wallets/walletConnectors/chunk-6AWAMXUM.js +378 -0
- package/dist/wallets/walletConnectors/chunk-DMQVS4D6.js +847 -0
- package/dist/wallets/walletConnectors/chunk-EKGPNKHR.js +851 -0
- package/dist/wallets/walletConnectors/chunk-EPXTA7RQ.js +58 -0
- package/dist/wallets/walletConnectors/chunk-FGFTHGVP.js +58 -0
- package/dist/wallets/walletConnectors/chunk-FKS67LGE.js +58 -0
- package/dist/wallets/walletConnectors/chunk-FRUO2FNN.js +378 -0
- package/dist/wallets/walletConnectors/chunk-FSGO5GVF.js +847 -0
- package/dist/wallets/walletConnectors/chunk-GTQO2NC2.js +378 -0
- package/dist/wallets/walletConnectors/chunk-H2HUW5JH.js +847 -0
- package/dist/wallets/walletConnectors/chunk-IIXEHCZU.js +347 -0
- package/dist/wallets/walletConnectors/chunk-J5G6H7ER.js +845 -0
- package/dist/wallets/walletConnectors/chunk-KII7LJX3.js +849 -0
- package/dist/wallets/walletConnectors/chunk-KY7BJBWE.js +378 -0
- package/dist/wallets/walletConnectors/chunk-NEJEYAIH.js +347 -0
- package/dist/wallets/walletConnectors/chunk-P2NM57MU.js +347 -0
- package/dist/wallets/walletConnectors/chunk-REV5IP42.js +868 -0
- package/dist/wallets/walletConnectors/chunk-RX5TH243.js +58 -0
- package/dist/wallets/walletConnectors/chunk-SQY7HBRK.js +58 -0
- package/dist/wallets/walletConnectors/chunk-V5QNZL5O.js +58 -0
- package/dist/wallets/walletConnectors/chunk-VVNP62IU.js +58 -0
- package/dist/wallets/walletConnectors/chunk-WDL3NM5W.js +37 -0
- package/dist/wallets/walletConnectors/chunk-YEQQLH44.js +58 -0
- package/dist/wallets/walletConnectors/chunk-YQBFNFAK.js +378 -0
- package/dist/wallets/walletConnectors/index.js +63 -63
- package/dist/wallets/walletConnectors/klipWallet/klipWallet.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
networkNameToChainKey,
|
|
39
39
|
networkToChainId,
|
|
40
40
|
resolveTalkenApiUrl
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-SKVG45TX.js";
|
|
42
42
|
import {
|
|
43
43
|
en_US_default
|
|
44
44
|
} from "./chunk-X4GSACNW.js";
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
} from "./chunk-R6ZE7JAZ.js";
|
|
64
64
|
|
|
65
65
|
// src/components/ConnectButton/ConnectButton.tsx
|
|
66
|
-
import React101, { useContext as
|
|
66
|
+
import React101, { useContext as useContext31, useEffect as useEffect35, useState as useState41 } from "react";
|
|
67
67
|
|
|
68
68
|
// src/css/sprinkles.css.ts
|
|
69
69
|
import { createMapValueFn as _51c72 } from "@vanilla-extract/sprinkles/createUtils";
|
|
@@ -161,7 +161,7 @@ function useBitcoinWallet() {
|
|
|
161
161
|
wallet: bitcoinWallet,
|
|
162
162
|
emptyState: emptyWalletState,
|
|
163
163
|
requestInterceptor,
|
|
164
|
-
importProvider: async () => (await import("./abcWallet-
|
|
164
|
+
importProvider: async () => (await import("./abcWallet-I7VJMOVP.js")).AbcBitcoinProvider,
|
|
165
165
|
mapState: (nextWallet, provider) => ({
|
|
166
166
|
address: nextWallet.address,
|
|
167
167
|
publicKey: nextWallet.publicKey,
|
|
@@ -1219,7 +1219,7 @@ function ShowBalanceProvider({ children }) {
|
|
|
1219
1219
|
var useShowBalance = () => useContext5(ShowBalanceContext);
|
|
1220
1220
|
|
|
1221
1221
|
// src/components/ConnectButton/ConnectButtonRenderer.tsx
|
|
1222
|
-
import React100, { useContext as
|
|
1222
|
+
import React100, { useContext as useContext30 } from "react";
|
|
1223
1223
|
import { useAccount as useAccount20, useConfig as useConfig5 } from "wagmi";
|
|
1224
1224
|
|
|
1225
1225
|
// src/contexts/MultiChainContext.tsx
|
|
@@ -1332,7 +1332,7 @@ function useSolanaWallet() {
|
|
|
1332
1332
|
wallet: solanaWallet,
|
|
1333
1333
|
emptyState: emptyWalletState,
|
|
1334
1334
|
requestInterceptor,
|
|
1335
|
-
importProvider: async () => (await import("./abcWallet-
|
|
1335
|
+
importProvider: async () => (await import("./abcWallet-I7VJMOVP.js")).AbcSolanaProvider,
|
|
1336
1336
|
mapState: (nextWallet, provider) => ({
|
|
1337
1337
|
address: nextWallet.address,
|
|
1338
1338
|
publicKey: nextWallet.publicKey,
|
|
@@ -2217,9 +2217,9 @@ function useRecentTransactions() {
|
|
|
2217
2217
|
|
|
2218
2218
|
// src/components/RainbowKitProvider/ModalContext.tsx
|
|
2219
2219
|
import React99, {
|
|
2220
|
-
createContext as
|
|
2220
|
+
createContext as createContext18,
|
|
2221
2221
|
useCallback as useCallback28,
|
|
2222
|
-
useContext as
|
|
2222
|
+
useContext as useContext29,
|
|
2223
2223
|
useEffect as useEffect34,
|
|
2224
2224
|
useMemo as useMemo21,
|
|
2225
2225
|
useState as useState40
|
|
@@ -2227,7 +2227,7 @@ import React99, {
|
|
|
2227
2227
|
import { useAccount as useAccount19, useAccountEffect as useAccountEffect3, useConfig as useConfig4 } from "wagmi";
|
|
2228
2228
|
|
|
2229
2229
|
// src/components/AccountModal/AccountModal.tsx
|
|
2230
|
-
import React63, { useContext as
|
|
2230
|
+
import React63, { useContext as useContext17, useMemo as useMemo16 } from "react";
|
|
2231
2231
|
import { useAccount as useAccount15, useDisconnect } from "wagmi";
|
|
2232
2232
|
|
|
2233
2233
|
// src/hooks/useMultiChainBalances.ts
|
|
@@ -2298,7 +2298,7 @@ function useTronWallet() {
|
|
|
2298
2298
|
wallet: tronWallet,
|
|
2299
2299
|
emptyState: emptyWalletState,
|
|
2300
2300
|
requestInterceptor,
|
|
2301
|
-
importProvider: async () => (await import("./abcWallet-
|
|
2301
|
+
importProvider: async () => (await import("./abcWallet-I7VJMOVP.js")).AbcTronProvider,
|
|
2302
2302
|
mapState: (nextWallet, provider) => ({
|
|
2303
2303
|
address: nextWallet.address,
|
|
2304
2304
|
publicKey: nextWallet.publicKey,
|
|
@@ -2364,8 +2364,8 @@ import {
|
|
|
2364
2364
|
SolflareWalletAdapter as SolflareWalletAdapter2
|
|
2365
2365
|
} from "@solana/wallet-adapter-wallets";
|
|
2366
2366
|
import React50, {
|
|
2367
|
-
createContext as
|
|
2368
|
-
useContext as
|
|
2367
|
+
createContext as createContext17,
|
|
2368
|
+
useContext as useContext13,
|
|
2369
2369
|
useMemo as useMemo15
|
|
2370
2370
|
} from "react";
|
|
2371
2371
|
import { useAccountEffect as useAccountEffect2 } from "wagmi";
|
|
@@ -2404,8 +2404,8 @@ function cssStringFromTheme(theme, options = {}) {
|
|
|
2404
2404
|
// src/providers/SignConfirmationProvider/SignConfirmationProvider.tsx
|
|
2405
2405
|
import { WalletContext } from "@solana/wallet-adapter-react";
|
|
2406
2406
|
import React35, {
|
|
2407
|
-
createContext as
|
|
2408
|
-
useContext as
|
|
2407
|
+
createContext as createContext9,
|
|
2408
|
+
useContext as useContext8,
|
|
2409
2409
|
useState as useState19,
|
|
2410
2410
|
useCallback as useCallback13,
|
|
2411
2411
|
useEffect as useEffect17
|
|
@@ -2515,11 +2515,58 @@ var InfoCircleIcon = ({ size = 18 }) => /* @__PURE__ */ React15.createElement(
|
|
|
2515
2515
|
)
|
|
2516
2516
|
);
|
|
2517
2517
|
|
|
2518
|
+
// src/components/RainbowKitProvider/ModalThemeModeContext.tsx
|
|
2519
|
+
import { createContext as createContext8, useContext as useContext7 } from "react";
|
|
2520
|
+
var ModalThemeModeContext = createContext8("auto");
|
|
2521
|
+
var useModalThemeMode = () => useContext7(ModalThemeModeContext);
|
|
2522
|
+
function useModalThemeClass(themes) {
|
|
2523
|
+
const mode = useModalThemeMode();
|
|
2524
|
+
if (mode === "dark")
|
|
2525
|
+
return themes.dark;
|
|
2526
|
+
if (mode === "light")
|
|
2527
|
+
return themes.light;
|
|
2528
|
+
return themes.auto;
|
|
2529
|
+
}
|
|
2530
|
+
function isLightColor(color) {
|
|
2531
|
+
if (!color || typeof color !== "string")
|
|
2532
|
+
return null;
|
|
2533
|
+
let r;
|
|
2534
|
+
let g;
|
|
2535
|
+
let b;
|
|
2536
|
+
const rgbMatch = color.match(
|
|
2537
|
+
/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})/
|
|
2538
|
+
);
|
|
2539
|
+
if (rgbMatch) {
|
|
2540
|
+
r = Number.parseInt(rgbMatch[1], 10);
|
|
2541
|
+
g = Number.parseInt(rgbMatch[2], 10);
|
|
2542
|
+
b = Number.parseInt(rgbMatch[3], 10);
|
|
2543
|
+
} else if (color.startsWith("#")) {
|
|
2544
|
+
const hex = color.replace("#", "");
|
|
2545
|
+
if (hex.length === 3) {
|
|
2546
|
+
r = Number.parseInt(hex[0] + hex[0], 16);
|
|
2547
|
+
g = Number.parseInt(hex[1] + hex[1], 16);
|
|
2548
|
+
b = Number.parseInt(hex[2] + hex[2], 16);
|
|
2549
|
+
} else if (hex.length === 6 || hex.length === 8) {
|
|
2550
|
+
r = Number.parseInt(hex.substring(0, 2), 16);
|
|
2551
|
+
g = Number.parseInt(hex.substring(2, 4), 16);
|
|
2552
|
+
b = Number.parseInt(hex.substring(4, 6), 16);
|
|
2553
|
+
} else {
|
|
2554
|
+
return null;
|
|
2555
|
+
}
|
|
2556
|
+
} else {
|
|
2557
|
+
return null;
|
|
2558
|
+
}
|
|
2559
|
+
if (Number.isNaN(r) || Number.isNaN(g) || Number.isNaN(b))
|
|
2560
|
+
return null;
|
|
2561
|
+
const luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255;
|
|
2562
|
+
return luminance > 0.5;
|
|
2563
|
+
}
|
|
2564
|
+
|
|
2518
2565
|
// src/components/Toast/Toast.tsx
|
|
2519
2566
|
import React16 from "react";
|
|
2520
2567
|
|
|
2521
2568
|
// src/components/ConfirmationModal/modalTheme.css.ts
|
|
2522
|
-
var
|
|
2569
|
+
var modalThemeClasses = { dark: "_14glgvld", light: "_14glgvle", auto: "_14glgvlf" };
|
|
2523
2570
|
|
|
2524
2571
|
// src/components/Toast/Toast.css.ts
|
|
2525
2572
|
var toast = "_1e2ff8w0";
|
|
@@ -2527,10 +2574,11 @@ var toastVisible = "_1e2ff8w1 _1e2ff8w0";
|
|
|
2527
2574
|
|
|
2528
2575
|
// src/components/Toast/Toast.tsx
|
|
2529
2576
|
function Toast({ message, isVisible }) {
|
|
2577
|
+
const modalThemeClass = useModalThemeClass(modalThemeClasses);
|
|
2530
2578
|
return /* @__PURE__ */ React16.createElement(
|
|
2531
2579
|
"div",
|
|
2532
2580
|
{
|
|
2533
|
-
className: `${isVisible ? toastVisible : toast} ${
|
|
2581
|
+
className: `${isVisible ? toastVisible : toast} ${modalThemeClass}`
|
|
2534
2582
|
},
|
|
2535
2583
|
message
|
|
2536
2584
|
);
|
|
@@ -2714,6 +2762,7 @@ function SignConfirmationModal({
|
|
|
2714
2762
|
requestOriginIcon,
|
|
2715
2763
|
defaultExpanded = true
|
|
2716
2764
|
}) {
|
|
2765
|
+
const modalThemeClass = useModalThemeClass(modalThemeClasses);
|
|
2717
2766
|
const modalRef = useRef(null);
|
|
2718
2767
|
const [isExpanded, setIsExpanded] = useState12(defaultExpanded);
|
|
2719
2768
|
const {
|
|
@@ -2786,7 +2835,7 @@ function SignConfirmationModal({
|
|
|
2786
2835
|
"div",
|
|
2787
2836
|
{
|
|
2788
2837
|
ref: modalRef,
|
|
2789
|
-
className: `${modal} ${
|
|
2838
|
+
className: `${modal} ${modalThemeClass}`,
|
|
2790
2839
|
onClick: (e) => e.stopPropagation(),
|
|
2791
2840
|
onKeyDown: (e) => e.stopPropagation(),
|
|
2792
2841
|
role: "dialog",
|
|
@@ -3306,7 +3355,7 @@ var tooltipArrow2 = "h5tj3ow";
|
|
|
3306
3355
|
var tooltipText2 = "h5tj3ox";
|
|
3307
3356
|
|
|
3308
3357
|
// src/components/GasFeeModal/modalTheme.css.ts
|
|
3309
|
-
var
|
|
3358
|
+
var modalThemeClasses2 = { dark: "zdic0qc", light: "zdic0qd", auto: "zdic0qe" };
|
|
3310
3359
|
|
|
3311
3360
|
// src/components/GasFeeModal/GasFeeEditModal.tsx
|
|
3312
3361
|
var calculateGasFee = (gasLimit, maxFeePerGasGwei) => {
|
|
@@ -3354,6 +3403,7 @@ function GasFeeEditModal({
|
|
|
3354
3403
|
currentPriorityFee = "",
|
|
3355
3404
|
nativeSymbol = "ETH"
|
|
3356
3405
|
}) {
|
|
3406
|
+
const modalThemeClass = useModalThemeClass(modalThemeClasses2);
|
|
3357
3407
|
const [selectedPriority, setSelectedPriority] = useState13(currentOption);
|
|
3358
3408
|
const [customGasLimit, setCustomGasLimit] = useState13(currentGasLimit);
|
|
3359
3409
|
const [customMaxFee, setCustomMaxFee] = useState13(currentMaxFee);
|
|
@@ -3500,7 +3550,7 @@ function GasFeeEditModal({
|
|
|
3500
3550
|
"div",
|
|
3501
3551
|
{
|
|
3502
3552
|
ref: modalRef,
|
|
3503
|
-
className: `${modal2} ${
|
|
3553
|
+
className: `${modal2} ${modalThemeClass}`,
|
|
3504
3554
|
onClick: (e) => e.stopPropagation(),
|
|
3505
3555
|
onKeyDown: (e) => e.stopPropagation(),
|
|
3506
3556
|
role: "dialog",
|
|
@@ -4820,6 +4870,7 @@ function TransactionConfirmationModal({
|
|
|
4820
4870
|
requestOriginIcon,
|
|
4821
4871
|
defaultDataExpanded = false
|
|
4822
4872
|
}) {
|
|
4873
|
+
const modalThemeClass = useModalThemeClass(modalThemeClasses);
|
|
4823
4874
|
const modalRef = useRef6(null);
|
|
4824
4875
|
const [isDataExpanded, setIsDataExpanded] = useState17(defaultDataExpanded);
|
|
4825
4876
|
const {
|
|
@@ -5091,7 +5142,7 @@ function TransactionConfirmationModal({
|
|
|
5091
5142
|
"div",
|
|
5092
5143
|
{
|
|
5093
5144
|
ref: modalRef,
|
|
5094
|
-
className: `${modal3} ${
|
|
5145
|
+
className: `${modal3} ${modalThemeClass}`,
|
|
5095
5146
|
onClick: (e) => e.stopPropagation(),
|
|
5096
5147
|
onKeyDown: (e) => e.stopPropagation(),
|
|
5097
5148
|
role: "dialog",
|
|
@@ -5400,6 +5451,7 @@ function NonEvmSignConfirmationModal({
|
|
|
5400
5451
|
onConfirm,
|
|
5401
5452
|
request
|
|
5402
5453
|
}) {
|
|
5454
|
+
const modalThemeClass = useModalThemeClass(modalThemeClasses);
|
|
5403
5455
|
const modalRef = useRef7(null);
|
|
5404
5456
|
const [isExpanded, setIsExpanded] = useState18(true);
|
|
5405
5457
|
const {
|
|
@@ -5461,7 +5513,7 @@ function NonEvmSignConfirmationModal({
|
|
|
5461
5513
|
"div",
|
|
5462
5514
|
{
|
|
5463
5515
|
ref: modalRef,
|
|
5464
|
-
className: `${modal4} ${
|
|
5516
|
+
className: `${modal4} ${modalThemeClass}`,
|
|
5465
5517
|
onClick: (e) => e.stopPropagation(),
|
|
5466
5518
|
onKeyDown: (e) => e.stopPropagation(),
|
|
5467
5519
|
role: "dialog",
|
|
@@ -5560,6 +5612,7 @@ function NonEvmTransferConfirmationModal({
|
|
|
5560
5612
|
onConfirm,
|
|
5561
5613
|
request
|
|
5562
5614
|
}) {
|
|
5615
|
+
const modalThemeClass = useModalThemeClass(modalThemeClasses);
|
|
5563
5616
|
const modalRef = useRef8(null);
|
|
5564
5617
|
const { isVisible: toastVisible2, message: toastMessage } = useToast();
|
|
5565
5618
|
const chainName2 = getChainDisplayName2(request.chain, request.network);
|
|
@@ -5601,7 +5654,7 @@ function NonEvmTransferConfirmationModal({
|
|
|
5601
5654
|
"div",
|
|
5602
5655
|
{
|
|
5603
5656
|
ref: modalRef,
|
|
5604
|
-
className: `${modal} ${
|
|
5657
|
+
className: `${modal} ${modalThemeClass}`,
|
|
5605
5658
|
onClick: (e) => e.stopPropagation(),
|
|
5606
5659
|
onKeyDown: (e) => e.stopPropagation(),
|
|
5607
5660
|
role: "dialog",
|
|
@@ -6775,9 +6828,9 @@ function useTransactionResolver() {
|
|
|
6775
6828
|
}
|
|
6776
6829
|
|
|
6777
6830
|
// src/providers/SignConfirmationProvider/SignConfirmationProvider.tsx
|
|
6778
|
-
var SignConfirmationEnabledContext =
|
|
6831
|
+
var SignConfirmationEnabledContext = createContext9(false);
|
|
6779
6832
|
function useSignConfirmationEnabled() {
|
|
6780
|
-
return
|
|
6833
|
+
return useContext8(SignConfirmationEnabledContext);
|
|
6781
6834
|
}
|
|
6782
6835
|
function SignConfirmationProvider({
|
|
6783
6836
|
children,
|
|
@@ -6800,7 +6853,7 @@ function SignConfirmationProvider({
|
|
|
6800
6853
|
);
|
|
6801
6854
|
const [nonEvmRejecter, setNonEvmRejecter] = useState19(null);
|
|
6802
6855
|
const { connector, isConnected } = useAccount10();
|
|
6803
|
-
const walletContextValue =
|
|
6856
|
+
const walletContextValue = useContext8(WalletContext);
|
|
6804
6857
|
const hasSolanaProvider = !Object.getOwnPropertyDescriptor(
|
|
6805
6858
|
walletContextValue,
|
|
6806
6859
|
"wallets"
|
|
@@ -7154,6 +7207,7 @@ function TransactionResultModal({
|
|
|
7154
7207
|
data,
|
|
7155
7208
|
onClose
|
|
7156
7209
|
}) {
|
|
7210
|
+
const modalThemeClass = useModalThemeClass(modalThemeClasses);
|
|
7157
7211
|
const handleKeyDown = useCallback14(
|
|
7158
7212
|
(e) => {
|
|
7159
7213
|
if (e.key === "Escape")
|
|
@@ -7201,7 +7255,7 @@ function TransactionResultModal({
|
|
|
7201
7255
|
/* @__PURE__ */ React36.createElement(
|
|
7202
7256
|
"div",
|
|
7203
7257
|
{
|
|
7204
|
-
className: `${modal5} ${
|
|
7258
|
+
className: `${modal5} ${modalThemeClass}`,
|
|
7205
7259
|
role: "dialog",
|
|
7206
7260
|
"aria-modal": "true",
|
|
7207
7261
|
"aria-labelledby": "tx-result-modal-title",
|
|
@@ -7257,12 +7311,12 @@ function TransactionResultModal({
|
|
|
7257
7311
|
}
|
|
7258
7312
|
|
|
7259
7313
|
// src/providers/TransactionResultProvider/TransactionResultContext.tsx
|
|
7260
|
-
import { createContext as
|
|
7261
|
-
var TransactionResultContext =
|
|
7314
|
+
import { createContext as createContext10, useContext as useContext9 } from "react";
|
|
7315
|
+
var TransactionResultContext = createContext10({
|
|
7262
7316
|
showResult: () => Promise.resolve()
|
|
7263
7317
|
});
|
|
7264
7318
|
function useTransactionResult() {
|
|
7265
|
-
return
|
|
7319
|
+
return useContext9(TransactionResultContext);
|
|
7266
7320
|
}
|
|
7267
7321
|
|
|
7268
7322
|
// src/providers/TransactionResultProvider/TransactionResultSingleton.ts
|
|
@@ -8307,17 +8361,17 @@ function SolanaWalletProvider({
|
|
|
8307
8361
|
}
|
|
8308
8362
|
|
|
8309
8363
|
// src/components/RainbowKitProvider/AppContext.ts
|
|
8310
|
-
import { createContext as
|
|
8364
|
+
import { createContext as createContext11 } from "react";
|
|
8311
8365
|
var defaultAppInfo = {
|
|
8312
8366
|
appName: void 0,
|
|
8313
8367
|
disclaimer: void 0,
|
|
8314
8368
|
learnMoreUrl: "https://learn.rainbow.me/understanding-web3?utm_source=rainbowkit&utm_campaign=learnmore"
|
|
8315
8369
|
};
|
|
8316
|
-
var AppContext =
|
|
8370
|
+
var AppContext = createContext11(defaultAppInfo);
|
|
8317
8371
|
|
|
8318
8372
|
// src/components/RainbowKitProvider/CoolModeContext.ts
|
|
8319
|
-
import { createContext as
|
|
8320
|
-
var CoolModeContext =
|
|
8373
|
+
import { createContext as createContext12 } from "react";
|
|
8374
|
+
var CoolModeContext = createContext12(false);
|
|
8321
8375
|
|
|
8322
8376
|
// src/components/RainbowKitProvider/InternalPinProvider.tsx
|
|
8323
8377
|
import React39 from "react";
|
|
@@ -8326,7 +8380,7 @@ function InternalPinProvider({ children }) {
|
|
|
8326
8380
|
}
|
|
8327
8381
|
|
|
8328
8382
|
// src/components/RainbowKitProvider/ModalSizeContext.tsx
|
|
8329
|
-
import React42, { createContext as
|
|
8383
|
+
import React42, { createContext as createContext15, useContext as useContext11 } from "react";
|
|
8330
8384
|
|
|
8331
8385
|
// src/hooks/useWindowSize.ts
|
|
8332
8386
|
import { useEffect as useEffect21, useState as useState21 } from "react";
|
|
@@ -8366,8 +8420,8 @@ var useWindowSize = () => {
|
|
|
8366
8420
|
};
|
|
8367
8421
|
|
|
8368
8422
|
// src/components/RainbowKitProvider/RainbowKitConfigProvider.tsx
|
|
8369
|
-
import React40, { createContext as
|
|
8370
|
-
var RainbowKitConfigContext =
|
|
8423
|
+
import React40, { createContext as createContext13, useContext as useContext10 } from "react";
|
|
8424
|
+
var RainbowKitConfigContext = createContext13(null);
|
|
8371
8425
|
function RainbowKitConfigProvider({
|
|
8372
8426
|
config: config2,
|
|
8373
8427
|
children
|
|
@@ -8375,7 +8429,7 @@ function RainbowKitConfigProvider({
|
|
|
8375
8429
|
return /* @__PURE__ */ React40.createElement(RainbowKitConfigContext.Provider, { value: config2 }, children);
|
|
8376
8430
|
}
|
|
8377
8431
|
function useRainbowKitConfig() {
|
|
8378
|
-
const context =
|
|
8432
|
+
const context = useContext10(RainbowKitConfigContext);
|
|
8379
8433
|
if (!context) {
|
|
8380
8434
|
throw new Error(
|
|
8381
8435
|
"useRainbowKitConfig must be used within RainbowKitProvider"
|
|
@@ -8385,8 +8439,8 @@ function useRainbowKitConfig() {
|
|
|
8385
8439
|
}
|
|
8386
8440
|
|
|
8387
8441
|
// src/components/RainbowKitProvider/WalletButtonContext.tsx
|
|
8388
|
-
import React41, { createContext as
|
|
8389
|
-
var WalletButtonContext =
|
|
8442
|
+
import React41, { createContext as createContext14, useMemo as useMemo14, useState as useState22 } from "react";
|
|
8443
|
+
var WalletButtonContext = createContext14({
|
|
8390
8444
|
connector: null,
|
|
8391
8445
|
setConnector: () => {
|
|
8392
8446
|
}
|
|
@@ -8413,7 +8467,7 @@ var ModalSizeOptions = {
|
|
|
8413
8467
|
COMPACT: "compact",
|
|
8414
8468
|
WIDE: "wide"
|
|
8415
8469
|
};
|
|
8416
|
-
var ModalSizeContext =
|
|
8470
|
+
var ModalSizeContext = createContext15(
|
|
8417
8471
|
ModalSizeOptions.WIDE
|
|
8418
8472
|
);
|
|
8419
8473
|
function ModalSizeProvider({
|
|
@@ -8422,7 +8476,7 @@ function ModalSizeProvider({
|
|
|
8422
8476
|
}) {
|
|
8423
8477
|
const { width } = useWindowSize();
|
|
8424
8478
|
const isSmallScreen = width && width < largeScreenMinWidth;
|
|
8425
|
-
const { connector } =
|
|
8479
|
+
const { connector } = useContext11(WalletButtonContext);
|
|
8426
8480
|
let shouldUseCompactOnMobile = false;
|
|
8427
8481
|
try {
|
|
8428
8482
|
const config2 = useRainbowKitConfig();
|
|
@@ -8434,8 +8488,8 @@ function ModalSizeProvider({
|
|
|
8434
8488
|
}
|
|
8435
8489
|
|
|
8436
8490
|
// src/components/RainbowKitProvider/ShowRecentTransactionsContext.ts
|
|
8437
|
-
import { createContext as
|
|
8438
|
-
var ShowRecentTransactionsContext =
|
|
8491
|
+
import { createContext as createContext16 } from "react";
|
|
8492
|
+
var ShowRecentTransactionsContext = createContext16(false);
|
|
8439
8493
|
|
|
8440
8494
|
// src/components/RainbowKitProvider/useFingerprint.ts
|
|
8441
8495
|
import { useCallback as useCallback16, useEffect as useEffect22 } from "react";
|
|
@@ -8445,7 +8499,7 @@ function setRainbowKitVersion({ version }) {
|
|
|
8445
8499
|
}
|
|
8446
8500
|
function useFingerprint() {
|
|
8447
8501
|
const fingerprint = useCallback16(() => {
|
|
8448
|
-
setRainbowKitVersion({ version: "2.5.
|
|
8502
|
+
setRainbowKitVersion({ version: "2.5.7" });
|
|
8449
8503
|
}, []);
|
|
8450
8504
|
useEffect22(() => {
|
|
8451
8505
|
fingerprint();
|
|
@@ -8456,6 +8510,7 @@ function useFingerprint() {
|
|
|
8456
8510
|
import { useCallback as useCallback18, useEffect as useEffect23 } from "react";
|
|
8457
8511
|
|
|
8458
8512
|
// src/wallets/useWalletConnectors.ts
|
|
8513
|
+
import { useRef as useRef10 } from "react";
|
|
8459
8514
|
import { useConnect } from "wagmi";
|
|
8460
8515
|
|
|
8461
8516
|
// src/utils/indexBy.ts
|
|
@@ -8645,16 +8700,23 @@ function useWalletConnectors(mergeEIP6963WithRkConnectors = false) {
|
|
|
8645
8700
|
}
|
|
8646
8701
|
}
|
|
8647
8702
|
}
|
|
8703
|
+
const rawWcUriCacheRef = useRef10(/* @__PURE__ */ new Map());
|
|
8704
|
+
const rawWcUriCache = rawWcUriCacheRef.current;
|
|
8648
8705
|
const getWalletConnectUri = async (connector, uriConverter) => {
|
|
8649
8706
|
const provider = await connector.getProvider();
|
|
8650
8707
|
if (connector.id === "coinbase") {
|
|
8651
8708
|
return provider.qrUrl;
|
|
8652
8709
|
}
|
|
8710
|
+
const cached = rawWcUriCache.get(connector.id);
|
|
8711
|
+
if (cached) {
|
|
8712
|
+
return uriConverter(cached);
|
|
8713
|
+
}
|
|
8653
8714
|
return new Promise(
|
|
8654
8715
|
(resolve) => (
|
|
8655
8716
|
// Wagmi v2 doesn't have a return type for provider yet
|
|
8656
8717
|
// @ts-expect-error
|
|
8657
8718
|
provider.once("display_uri", (uri) => {
|
|
8719
|
+
rawWcUriCache.set(connector.id, uri);
|
|
8658
8720
|
resolve(uriConverter(uri));
|
|
8659
8721
|
})
|
|
8660
8722
|
)
|
|
@@ -8760,7 +8822,7 @@ var LoginIcon = () => /* @__PURE__ */ React44.createElement(
|
|
|
8760
8822
|
);
|
|
8761
8823
|
|
|
8762
8824
|
// src/components/SignIn/SignIn.tsx
|
|
8763
|
-
import React49, { useCallback as useCallback17, useContext as
|
|
8825
|
+
import React49, { useCallback as useCallback17, useContext as useContext12, useRef as useRef11 } from "react";
|
|
8764
8826
|
import { UserRejectedRequestError } from "viem";
|
|
8765
8827
|
import { useAccount as useAccount11, useSignMessage } from "wagmi";
|
|
8766
8828
|
|
|
@@ -8961,7 +9023,7 @@ function SignIn({
|
|
|
8961
9023
|
onClose,
|
|
8962
9024
|
onCloseModal
|
|
8963
9025
|
}) {
|
|
8964
|
-
const { i18n: i18n2 } =
|
|
9026
|
+
const { i18n: i18n2 } = useContext12(I18nContext);
|
|
8965
9027
|
const [{ status, ...state }, setState] = React49.useState({ status: "idle" });
|
|
8966
9028
|
const authAdapter = useAuthenticationAdapter();
|
|
8967
9029
|
const getNonce = useCallback17(async () => {
|
|
@@ -8976,7 +9038,7 @@ function SignIn({
|
|
|
8976
9038
|
}));
|
|
8977
9039
|
}
|
|
8978
9040
|
}, [authAdapter, i18n2.t]);
|
|
8979
|
-
const onceRef =
|
|
9041
|
+
const onceRef = useRef11(false);
|
|
8980
9042
|
React49.useEffect(() => {
|
|
8981
9043
|
if (onceRef.current)
|
|
8982
9044
|
return;
|
|
@@ -9216,7 +9278,7 @@ function clearWalletConnectDeepLink() {
|
|
|
9216
9278
|
}
|
|
9217
9279
|
|
|
9218
9280
|
// src/components/RainbowKitProvider/RainbowKitProvider.tsx
|
|
9219
|
-
var ThemeIdContext =
|
|
9281
|
+
var ThemeIdContext = createContext17(void 0);
|
|
9220
9282
|
var attr = "data-rk";
|
|
9221
9283
|
var createThemeRootProps = (id) => ({ [attr]: id || "" });
|
|
9222
9284
|
var createThemeRootSelector = (id) => {
|
|
@@ -9226,7 +9288,7 @@ var createThemeRootSelector = (id) => {
|
|
|
9226
9288
|
return id ? `[${attr}="${id}"]` : `[${attr}]`;
|
|
9227
9289
|
};
|
|
9228
9290
|
var useThemeRootProps = () => {
|
|
9229
|
-
const id =
|
|
9291
|
+
const id = useContext13(ThemeIdContext);
|
|
9230
9292
|
return createThemeRootProps(id);
|
|
9231
9293
|
};
|
|
9232
9294
|
var defaultTheme = lightTheme();
|
|
@@ -9255,6 +9317,16 @@ function RainbowKitProvider({
|
|
|
9255
9317
|
'A theme function was provided to the "theme" prop instead of a theme object. You must execute this function to get the resulting theme object.'
|
|
9256
9318
|
);
|
|
9257
9319
|
}
|
|
9320
|
+
const modalThemeMode = useMemo15(() => {
|
|
9321
|
+
if (!theme)
|
|
9322
|
+
return "auto";
|
|
9323
|
+
if ("lightMode" in theme && "darkMode" in theme)
|
|
9324
|
+
return "auto";
|
|
9325
|
+
const light = isLightColor(theme.colors.modalBackground);
|
|
9326
|
+
if (light === null)
|
|
9327
|
+
return "auto";
|
|
9328
|
+
return light ? "light" : "dark";
|
|
9329
|
+
}, [theme]);
|
|
9258
9330
|
const selector = createThemeRootSelector(id);
|
|
9259
9331
|
const appContext = {
|
|
9260
9332
|
...defaultAppInfo,
|
|
@@ -9270,50 +9342,56 @@ function RainbowKitProvider({
|
|
|
9270
9342
|
{
|
|
9271
9343
|
value: showRecentTransactions
|
|
9272
9344
|
},
|
|
9273
|
-
/* @__PURE__ */ React50.createElement(TransactionStoreProvider, null, /* @__PURE__ */ React50.createElement(AvatarContext.Provider, { value: avatarContext }, /* @__PURE__ */ React50.createElement(AppContext.Provider, { value: appContext }, /* @__PURE__ */ React50.createElement(ThemeIdContext.Provider, { value: id }, /* @__PURE__ */ React50.createElement(
|
|
9274
|
-
|
|
9345
|
+
/* @__PURE__ */ React50.createElement(TransactionStoreProvider, null, /* @__PURE__ */ React50.createElement(AvatarContext.Provider, { value: avatarContext }, /* @__PURE__ */ React50.createElement(AppContext.Provider, { value: appContext }, /* @__PURE__ */ React50.createElement(ThemeIdContext.Provider, { value: id }, /* @__PURE__ */ React50.createElement(
|
|
9346
|
+
ModalThemeModeContext.Provider,
|
|
9275
9347
|
{
|
|
9276
|
-
|
|
9277
|
-
// Selectors are sanitized to only contain alphanumeric
|
|
9278
|
-
// and underscore characters. Theme values generated by
|
|
9279
|
-
// cssStringFromTheme are sanitized, removing
|
|
9280
|
-
// characters that terminate values / HTML tags.
|
|
9281
|
-
__html: [
|
|
9282
|
-
`${selector}{${cssStringFromTheme(
|
|
9283
|
-
"lightMode" in theme ? theme.lightMode : theme
|
|
9284
|
-
)}}`,
|
|
9285
|
-
"darkMode" in theme ? `@media(prefers-color-scheme:dark){${selector}{${cssStringFromTheme(
|
|
9286
|
-
theme.darkMode,
|
|
9287
|
-
{ extends: theme.lightMode }
|
|
9288
|
-
)}}}` : null
|
|
9289
|
-
].join("")
|
|
9290
|
-
}
|
|
9291
|
-
}
|
|
9292
|
-
), /* @__PURE__ */ React50.createElement(
|
|
9293
|
-
SignConfirmationProvider,
|
|
9294
|
-
{
|
|
9295
|
-
disabled: !showSignConfirmation
|
|
9348
|
+
value: modalThemeMode
|
|
9296
9349
|
},
|
|
9297
|
-
/* @__PURE__ */ React50.createElement(
|
|
9298
|
-
|
|
9350
|
+
/* @__PURE__ */ React50.createElement(ShowBalanceProvider, null, /* @__PURE__ */ React50.createElement(ModalProvider, null, theme ? /* @__PURE__ */ React50.createElement("div", { ...createThemeRootProps(id) }, /* @__PURE__ */ React50.createElement(
|
|
9351
|
+
"style",
|
|
9299
9352
|
{
|
|
9300
|
-
|
|
9353
|
+
dangerouslySetInnerHTML: {
|
|
9354
|
+
// Selectors are sanitized to only contain alphanumeric
|
|
9355
|
+
// and underscore characters. Theme values generated by
|
|
9356
|
+
// cssStringFromTheme are sanitized, removing
|
|
9357
|
+
// characters that terminate values / HTML tags.
|
|
9358
|
+
__html: [
|
|
9359
|
+
`${selector}{${cssStringFromTheme(
|
|
9360
|
+
"lightMode" in theme ? theme.lightMode : theme
|
|
9361
|
+
)}}`,
|
|
9362
|
+
"darkMode" in theme ? `@media(prefers-color-scheme:dark){${selector}{${cssStringFromTheme(
|
|
9363
|
+
theme.darkMode,
|
|
9364
|
+
{ extends: theme.lightMode }
|
|
9365
|
+
)}}}` : null
|
|
9366
|
+
].join("")
|
|
9367
|
+
}
|
|
9368
|
+
}
|
|
9369
|
+
), /* @__PURE__ */ React50.createElement(
|
|
9370
|
+
SignConfirmationProvider,
|
|
9371
|
+
{
|
|
9372
|
+
disabled: !showSignConfirmation
|
|
9301
9373
|
},
|
|
9302
|
-
|
|
9303
|
-
|
|
9304
|
-
|
|
9305
|
-
|
|
9306
|
-
|
|
9307
|
-
|
|
9308
|
-
|
|
9309
|
-
/* @__PURE__ */ React50.createElement(
|
|
9310
|
-
|
|
9374
|
+
/* @__PURE__ */ React50.createElement(TransactionResultProvider, null, /* @__PURE__ */ React50.createElement(
|
|
9375
|
+
InternalPinProvider,
|
|
9376
|
+
{
|
|
9377
|
+
disabled: disableAutoPinProvider
|
|
9378
|
+
},
|
|
9379
|
+
children
|
|
9380
|
+
))
|
|
9381
|
+
)) : /* @__PURE__ */ React50.createElement(
|
|
9382
|
+
SignConfirmationProvider,
|
|
9311
9383
|
{
|
|
9312
|
-
disabled:
|
|
9384
|
+
disabled: !showSignConfirmation
|
|
9313
9385
|
},
|
|
9314
|
-
|
|
9315
|
-
|
|
9316
|
-
|
|
9386
|
+
/* @__PURE__ */ React50.createElement(TransactionResultProvider, null, /* @__PURE__ */ React50.createElement(
|
|
9387
|
+
InternalPinProvider,
|
|
9388
|
+
{
|
|
9389
|
+
disabled: disableAutoPinProvider
|
|
9390
|
+
},
|
|
9391
|
+
children
|
|
9392
|
+
))
|
|
9393
|
+
)))
|
|
9394
|
+
)))))
|
|
9317
9395
|
)))))));
|
|
9318
9396
|
if (!enableSolana) {
|
|
9319
9397
|
return providerTree;
|
|
@@ -9359,7 +9437,7 @@ var overlay6 = "qjzye43 kwh1ip9h kwh1ipb3 kwh1ipa kwh1ip2q kwh1ip8q";
|
|
|
9359
9437
|
|
|
9360
9438
|
// src/components/Dialog/FocusTrap.tsx
|
|
9361
9439
|
import React51 from "react";
|
|
9362
|
-
import { useCallback as useCallback19, useEffect as useEffect24, useRef as
|
|
9440
|
+
import { useCallback as useCallback19, useEffect as useEffect24, useRef as useRef12 } from "react";
|
|
9363
9441
|
var moveFocusWithin = (element2, position) => {
|
|
9364
9442
|
const focusableElements = element2.querySelectorAll(
|
|
9365
9443
|
"button:not(:disabled), a[href]"
|
|
@@ -9369,7 +9447,7 @@ var moveFocusWithin = (element2, position) => {
|
|
|
9369
9447
|
focusableElements[position === "end" ? focusableElements.length - 1 : 0].focus();
|
|
9370
9448
|
};
|
|
9371
9449
|
function FocusTrap(props) {
|
|
9372
|
-
const contentRef =
|
|
9450
|
+
const contentRef = useRef12(null);
|
|
9373
9451
|
useEffect24(() => {
|
|
9374
9452
|
const previouslyActiveElement = document.activeElement;
|
|
9375
9453
|
return () => {
|
|
@@ -9460,7 +9538,7 @@ function Dialog({ children, onClose, open, titleId }) {
|
|
|
9460
9538
|
}
|
|
9461
9539
|
|
|
9462
9540
|
// src/components/Dialog/DialogContent.tsx
|
|
9463
|
-
import React53, { useContext as
|
|
9541
|
+
import React53, { useContext as useContext14 } from "react";
|
|
9464
9542
|
|
|
9465
9543
|
// src/components/Dialog/DialogContent.css.ts
|
|
9466
9544
|
var bottomSheetOverrides = "qs007r7";
|
|
@@ -9486,7 +9564,7 @@ function DialogContent({
|
|
|
9486
9564
|
} catch (_err) {
|
|
9487
9565
|
}
|
|
9488
9566
|
const mobile = mobileMode === "full" ? false : isMobile();
|
|
9489
|
-
const modalSize =
|
|
9567
|
+
const modalSize = useContext14(ModalSizeContext);
|
|
9490
9568
|
const compactModeEnabled = modalSize === ModalSizeOptions.COMPACT;
|
|
9491
9569
|
return /* @__PURE__ */ React53.createElement(Box, { marginTop }, /* @__PURE__ */ React53.createElement(
|
|
9492
9570
|
Box,
|
|
@@ -9502,7 +9580,7 @@ function DialogContent({
|
|
|
9502
9580
|
}
|
|
9503
9581
|
|
|
9504
9582
|
// src/components/ProfileDetails/ProfileDetails.tsx
|
|
9505
|
-
import React62, { useCallback as useCallback22, useContext as
|
|
9583
|
+
import React62, { useCallback as useCallback22, useContext as useContext16, useEffect as useEffect26, useState as useState24 } from "react";
|
|
9506
9584
|
|
|
9507
9585
|
// src/components/ConnectButton/abbreviateETHBalance.ts
|
|
9508
9586
|
var units = ["k", "m", "b", "t"];
|
|
@@ -9595,7 +9673,7 @@ var DisconnectIcon = () => /* @__PURE__ */ React56.createElement(
|
|
|
9595
9673
|
);
|
|
9596
9674
|
|
|
9597
9675
|
// src/components/Txs/TxList.tsx
|
|
9598
|
-
import React61, { useContext as
|
|
9676
|
+
import React61, { useContext as useContext15 } from "react";
|
|
9599
9677
|
import { useAccount as useAccount14 } from "wagmi";
|
|
9600
9678
|
|
|
9601
9679
|
// src/transactions/useClearRecentTransactions.ts
|
|
@@ -9766,8 +9844,8 @@ function TxList({ address }) {
|
|
|
9766
9844
|
const visibleTxs = recentTransactions.slice(0, NUMBER_OF_VISIBLE_TXS);
|
|
9767
9845
|
const hasTransactions = visibleTxs.length > 0;
|
|
9768
9846
|
const mobile = isMobile();
|
|
9769
|
-
const { appName } =
|
|
9770
|
-
const { i18n: i18n2 } =
|
|
9847
|
+
const { appName } = useContext15(AppContext);
|
|
9848
|
+
const { i18n: i18n2 } = useContext15(I18nContext);
|
|
9771
9849
|
return /* @__PURE__ */ React61.createElement(React61.Fragment, null, /* @__PURE__ */ React61.createElement(
|
|
9772
9850
|
Box,
|
|
9773
9851
|
{
|
|
@@ -9894,8 +9972,8 @@ function ProfileDetails({
|
|
|
9894
9972
|
onClose,
|
|
9895
9973
|
onDisconnect
|
|
9896
9974
|
}) {
|
|
9897
|
-
const showRecentTransactions =
|
|
9898
|
-
const { i18n: i18n2 } =
|
|
9975
|
+
const showRecentTransactions = useContext16(ShowRecentTransactionsContext);
|
|
9976
|
+
const { i18n: i18n2 } = useContext16(I18nContext);
|
|
9899
9977
|
const mobile = isMobile();
|
|
9900
9978
|
const [copiedChain, setCopiedChain] = useState24(null);
|
|
9901
9979
|
const copyAddress = useCallback22((chainType, addr) => {
|
|
@@ -10096,7 +10174,7 @@ function AccountModal({ onClose, open }) {
|
|
|
10096
10174
|
const chainId = useChainId();
|
|
10097
10175
|
const { ensAvatar } = useProfile({ address });
|
|
10098
10176
|
const { disconnect } = useDisconnect();
|
|
10099
|
-
const multiChainContext =
|
|
10177
|
+
const multiChainContext = useContext17(MultiChainContext);
|
|
10100
10178
|
const solanaWallet = useSolanaWallet();
|
|
10101
10179
|
const bitcoinWallet = useBitcoinWallet();
|
|
10102
10180
|
const tronWallet = useTronWallet();
|
|
@@ -10168,7 +10246,7 @@ function AccountModal({ onClose, open }) {
|
|
|
10168
10246
|
}
|
|
10169
10247
|
|
|
10170
10248
|
// src/components/ChainModal/ChainModal.tsx
|
|
10171
|
-
import React67, { useContext as
|
|
10249
|
+
import React67, { useContext as useContext19, useState as useState25 } from "react";
|
|
10172
10250
|
import { useAccount as useAccount16, useDisconnect as useDisconnect2, useSwitchChain } from "wagmi";
|
|
10173
10251
|
import { useConfig as useConfig2 } from "wagmi";
|
|
10174
10252
|
|
|
@@ -10254,7 +10332,7 @@ var MenuButton = React65.forwardRef(
|
|
|
10254
10332
|
MenuButton.displayName = "MenuButton";
|
|
10255
10333
|
|
|
10256
10334
|
// src/components/ChainModal/Chain.tsx
|
|
10257
|
-
import React66, { Fragment, useContext as
|
|
10335
|
+
import React66, { Fragment, useContext as useContext18 } from "react";
|
|
10258
10336
|
var Chain = ({
|
|
10259
10337
|
chainId,
|
|
10260
10338
|
currentChainId,
|
|
@@ -10267,7 +10345,7 @@ var Chain = ({
|
|
|
10267
10345
|
idx
|
|
10268
10346
|
}) => {
|
|
10269
10347
|
const mobile = isMobile();
|
|
10270
|
-
const { i18n: i18n2 } =
|
|
10348
|
+
const { i18n: i18n2 } = useContext18(I18nContext);
|
|
10271
10349
|
const rainbowkitChains = useRainbowKitChains();
|
|
10272
10350
|
const isCurrentChain = currentChainId === chainId;
|
|
10273
10351
|
return /* @__PURE__ */ React66.createElement(Fragment, null, /* @__PURE__ */ React66.createElement(
|
|
@@ -10383,7 +10461,7 @@ function ChainModal({ onClose, open }) {
|
|
|
10383
10461
|
}
|
|
10384
10462
|
}
|
|
10385
10463
|
});
|
|
10386
|
-
const { i18n: i18n2 } =
|
|
10464
|
+
const { i18n: i18n2 } = useContext19(I18nContext);
|
|
10387
10465
|
const { disconnect } = useDisconnect2();
|
|
10388
10466
|
const titleId = "rk_chain_modal_title";
|
|
10389
10467
|
const mobile = isMobile();
|
|
@@ -10493,14 +10571,14 @@ function ChainModal({ onClose, open }) {
|
|
|
10493
10571
|
}
|
|
10494
10572
|
|
|
10495
10573
|
// src/components/ConnectModal/ConnectModal.tsx
|
|
10496
|
-
import React98, { useContext as
|
|
10574
|
+
import React98, { useContext as useContext28 } from "react";
|
|
10497
10575
|
import { useAccount as useAccount18, useDisconnect as useDisconnect3 } from "wagmi";
|
|
10498
10576
|
|
|
10499
10577
|
// src/components/ConnectOptions/ConnectOptions.tsx
|
|
10500
10578
|
import {
|
|
10501
10579
|
WalletContext as WalletContext2
|
|
10502
10580
|
} from "@solana/wallet-adapter-react";
|
|
10503
|
-
import React94, { useCallback as useCallback25, useContext as
|
|
10581
|
+
import React94, { useCallback as useCallback25, useContext as useContext26, useMemo as useMemo20, useState as useState37 } from "react";
|
|
10504
10582
|
|
|
10505
10583
|
// src/wallets/recentSolanaWalletIds.ts
|
|
10506
10584
|
var storageKey5 = "rk-recent-solana";
|
|
@@ -10524,11 +10602,11 @@ function addRecentSolanaWalletId(walletName2) {
|
|
|
10524
10602
|
}
|
|
10525
10603
|
|
|
10526
10604
|
// src/components/ConnectOptions/ConnectOptionsModal.tsx
|
|
10527
|
-
import React91, { useContext as
|
|
10605
|
+
import React91, { useContext as useContext23, useEffect as useEffect32, useRef as useRef15, useState as useState35 } from "react";
|
|
10528
10606
|
import { useConnect as useConnect2, useConnectors } from "wagmi";
|
|
10529
10607
|
|
|
10530
10608
|
// src/components/ConnectModal/ConnectModalIntro.tsx
|
|
10531
|
-
import React70, { useContext as
|
|
10609
|
+
import React70, { useContext as useContext20 } from "react";
|
|
10532
10610
|
|
|
10533
10611
|
// src/components/Disclaimer/DisclaimerLink.tsx
|
|
10534
10612
|
import React68 from "react";
|
|
@@ -10560,8 +10638,8 @@ function ConnectModalIntro({
|
|
|
10560
10638
|
compactModeEnabled = false,
|
|
10561
10639
|
getWallet
|
|
10562
10640
|
}) {
|
|
10563
|
-
const { disclaimer: Disclaimer, learnMoreUrl } =
|
|
10564
|
-
const { i18n: i18n2 } =
|
|
10641
|
+
const { disclaimer: Disclaimer, learnMoreUrl } = useContext20(AppContext);
|
|
10642
|
+
const { i18n: i18n2 } = useContext20(I18nContext);
|
|
10565
10643
|
return /* @__PURE__ */ React70.createElement(React70.Fragment, null, /* @__PURE__ */ React70.createElement(
|
|
10566
10644
|
Box,
|
|
10567
10645
|
{
|
|
@@ -10796,15 +10874,16 @@ var KakaoIcon = () => {
|
|
|
10796
10874
|
};
|
|
10797
10875
|
|
|
10798
10876
|
// src/components/ConnectOptions/AbcWaasAuth/AbcWaasAuthSections.css.ts
|
|
10799
|
-
var container = "
|
|
10800
|
-
var emailFormContainer = "
|
|
10801
|
-
var emailInputStyle = "
|
|
10802
|
-
var
|
|
10803
|
-
var
|
|
10804
|
-
var
|
|
10805
|
-
var
|
|
10806
|
-
var
|
|
10807
|
-
var
|
|
10877
|
+
var container = "er9ts12";
|
|
10878
|
+
var emailFormContainer = "er9ts13";
|
|
10879
|
+
var emailInputStyle = "er9ts14";
|
|
10880
|
+
var otpInput = "er9ts11";
|
|
10881
|
+
var socialButtonStyle = "er9ts19";
|
|
10882
|
+
var socialButtonText = "er9ts1a";
|
|
10883
|
+
var socialButtonsContainer = "er9ts17";
|
|
10884
|
+
var socialIconWrapper = "er9ts18";
|
|
10885
|
+
var submitArrow = "er9ts16";
|
|
10886
|
+
var submitButtonStyle = "er9ts15";
|
|
10808
10887
|
|
|
10809
10888
|
// src/components/ConnectOptions/AbcWaasAuth/AbcWaasAuthSections.tsx
|
|
10810
10889
|
function AbcWaasAuthSections(props) {
|
|
@@ -10915,41 +10994,22 @@ function AbcWaasAuthSections(props) {
|
|
|
10915
10994
|
style: { flexGrow: 1 }
|
|
10916
10995
|
}
|
|
10917
10996
|
)
|
|
10918
|
-
)), abcWaasStep === "OTP" /* Otp */ && /* @__PURE__ */ React77.createElement(Box, { marginX: "6", marginBottom: "16" }, /* @__PURE__ */ React77.createElement(Box, { marginBottom: "12" }, /* @__PURE__ */ React77.createElement(Text, { color: "modalText", size: "16", weight: "semibold" }, "Enter verification code"), /* @__PURE__ */ React77.createElement(Box, { marginTop: "4" }, /* @__PURE__ */ React77.createElement(Text, { color: "modalTextSecondary", size: "14", weight: "medium" }, "We sent a code to ", abcWaasEmail))), /* @__PURE__ */ React77.createElement("form", { onSubmit: handleOtpSubmit }, /* @__PURE__ */ React77.createElement(
|
|
10919
|
-
|
|
10997
|
+
)), abcWaasStep === "OTP" /* Otp */ && /* @__PURE__ */ React77.createElement(Box, { marginX: "6", marginBottom: "16" }, /* @__PURE__ */ React77.createElement(Box, { marginBottom: "12" }, /* @__PURE__ */ React77.createElement(Text, { color: "modalText", size: "16", weight: "semibold" }, "Enter verification code"), /* @__PURE__ */ React77.createElement(Box, { marginTop: "4" }, /* @__PURE__ */ React77.createElement(Text, { color: "modalTextSecondary", size: "14", weight: "medium" }, "We sent a code to ", abcWaasEmail))), /* @__PURE__ */ React77.createElement("form", { onSubmit: handleOtpSubmit }, /* @__PURE__ */ React77.createElement(Box, { marginBottom: "12" }, /* @__PURE__ */ React77.createElement(
|
|
10998
|
+
"input",
|
|
10920
10999
|
{
|
|
10921
|
-
|
|
10922
|
-
|
|
10923
|
-
|
|
10924
|
-
|
|
10925
|
-
|
|
10926
|
-
|
|
10927
|
-
|
|
10928
|
-
|
|
10929
|
-
|
|
10930
|
-
"
|
|
10931
|
-
|
|
10932
|
-
|
|
10933
|
-
|
|
10934
|
-
value: abcWaasOtp,
|
|
10935
|
-
onChange: (e) => setAbcWaasOtp(e.target.value.replace(/\D/g, "").slice(0, 6)),
|
|
10936
|
-
maxLength: 6,
|
|
10937
|
-
disabled: isAbcWaasLoading,
|
|
10938
|
-
required: true,
|
|
10939
|
-
style: {
|
|
10940
|
-
width: "100%",
|
|
10941
|
-
border: "none",
|
|
10942
|
-
outline: "none",
|
|
10943
|
-
background: "transparent",
|
|
10944
|
-
fontSize: "16px",
|
|
10945
|
-
color: themeVars.colors.modalText,
|
|
10946
|
-
fontFamily: "inherit",
|
|
10947
|
-
textAlign: "center",
|
|
10948
|
-
letterSpacing: "0.15em"
|
|
10949
|
-
}
|
|
10950
|
-
}
|
|
10951
|
-
)
|
|
10952
|
-
), /* @__PURE__ */ React77.createElement(Box, { display: "flex", gap: "12" }, /* @__PURE__ */ React77.createElement(
|
|
11000
|
+
type: "text",
|
|
11001
|
+
inputMode: "numeric",
|
|
11002
|
+
autoComplete: "one-time-code",
|
|
11003
|
+
placeholder: "000000",
|
|
11004
|
+
value: abcWaasOtp,
|
|
11005
|
+
onChange: (e) => setAbcWaasOtp(e.target.value.replace(/\D/g, "").slice(0, 6)),
|
|
11006
|
+
maxLength: 6,
|
|
11007
|
+
disabled: isAbcWaasLoading,
|
|
11008
|
+
required: true,
|
|
11009
|
+
"aria-label": "Enter 6-digit verification code",
|
|
11010
|
+
className: otpInput
|
|
11011
|
+
}
|
|
11012
|
+
)), /* @__PURE__ */ React77.createElement(Box, { display: "flex", gap: "12" }, /* @__PURE__ */ React77.createElement(
|
|
10953
11013
|
Box,
|
|
10954
11014
|
{
|
|
10955
11015
|
as: "button",
|
|
@@ -10988,10 +11048,27 @@ function AbcWaasAuthSections(props) {
|
|
|
10988
11048
|
fontWeight: "600",
|
|
10989
11049
|
textAlign: "center",
|
|
10990
11050
|
cursor: isAbcWaasLoading || abcWaasOtp.length !== 6 ? "not-allowed" : "pointer",
|
|
10991
|
-
opacity: isAbcWaasLoading
|
|
10992
|
-
}
|
|
11051
|
+
opacity: isAbcWaasLoading ? 1 : abcWaasOtp.length !== 6 ? 0.5 : 1
|
|
11052
|
+
},
|
|
11053
|
+
"aria-label": isAbcWaasLoading ? "Verifying" : void 0,
|
|
11054
|
+
"aria-busy": isAbcWaasLoading || void 0
|
|
10993
11055
|
},
|
|
10994
|
-
|
|
11056
|
+
isAbcWaasLoading ? /* @__PURE__ */ React77.createElement(
|
|
11057
|
+
"span",
|
|
11058
|
+
{
|
|
11059
|
+
className: "spinner-rotate",
|
|
11060
|
+
"aria-hidden": "true",
|
|
11061
|
+
style: {
|
|
11062
|
+
display: "inline-block",
|
|
11063
|
+
width: "18px",
|
|
11064
|
+
height: "18px",
|
|
11065
|
+
border: "2px solid rgba(255,255,255,0.3)",
|
|
11066
|
+
borderTopColor: "#ffffff",
|
|
11067
|
+
borderRadius: "50%",
|
|
11068
|
+
verticalAlign: "middle"
|
|
11069
|
+
}
|
|
11070
|
+
}
|
|
11071
|
+
) : "Verify"
|
|
10995
11072
|
))), abcWaasError && /* @__PURE__ */ React77.createElement(Box, { marginTop: "8" }, /* @__PURE__ */ React77.createElement(Text, { color: "error", size: "14", weight: "medium" }, abcWaasError))));
|
|
10996
11073
|
}
|
|
10997
11074
|
|
|
@@ -11084,8 +11161,10 @@ function useAbcWaasAuth(props) {
|
|
|
11084
11161
|
email: result.email,
|
|
11085
11162
|
provider: "email"
|
|
11086
11163
|
},
|
|
11087
|
-
wallet: result.evmAddress ? { address: result.evmAddress } : null,
|
|
11164
|
+
wallet: result.evmAddress ? { address: result.evmAddress, chainId: getEvmNetwork() } : null,
|
|
11088
11165
|
solanaWallet: result.addresses?.sol ? { address: result.addresses.sol } : null,
|
|
11166
|
+
bitcoinWallet: result.addresses?.btc ? { address: result.addresses.btc } : null,
|
|
11167
|
+
tronWallet: result.addresses?.trx ? { address: result.addresses.trx } : null,
|
|
11089
11168
|
accessToken: null,
|
|
11090
11169
|
refreshToken: null,
|
|
11091
11170
|
expiresAt: null,
|
|
@@ -11812,29 +11891,12 @@ function useAbcWaasSocial(props) {
|
|
|
11812
11891
|
function AbcWaasAuthFlow({
|
|
11813
11892
|
onPinCreateRequired,
|
|
11814
11893
|
onPinVerifyRequired,
|
|
11894
|
+
onEnsureUserComplete,
|
|
11815
11895
|
compact = false
|
|
11816
11896
|
}) {
|
|
11817
|
-
const STORAGE_PREFIX3 = "talkenkit_abc_";
|
|
11818
11897
|
const abcAuth = useAbcWaasAuth({
|
|
11819
|
-
|
|
11820
|
-
|
|
11821
|
-
const canVerifyPin = !!(localStorage.getItem(`${STORAGE_PREFIX3}enc_tokens`) && localStorage.getItem(`${STORAGE_PREFIX3}enc_salt`));
|
|
11822
|
-
console.log("[AbcWaasAuthFlow] \u{1F50D} PIN verification check:", {
|
|
11823
|
-
result: canVerifyPin ? "Verify PIN" : "Create new PIN"
|
|
11824
|
-
});
|
|
11825
|
-
if (canVerifyPin) {
|
|
11826
|
-
console.log(
|
|
11827
|
-
"[AbcWaasAuthFlow] \u2705 PIN verification possible - routing to verify modal"
|
|
11828
|
-
);
|
|
11829
|
-
const { getCredentialManager: getCredentialManager2 } = await import("./AbcCredentialManager-JV4ZBMKF.js");
|
|
11830
|
-
getCredentialManager2().setEmail(abcAuth.email);
|
|
11831
|
-
onPinVerifyRequired(loginData);
|
|
11832
|
-
} else {
|
|
11833
|
-
console.log(
|
|
11834
|
-
"[AbcWaasAuthFlow] \u26A0\uFE0F PIN verification not possible - routing to create modal"
|
|
11835
|
-
);
|
|
11836
|
-
onPinCreateRequired(loginData);
|
|
11837
|
-
}
|
|
11898
|
+
onAuthSuccess: (data) => {
|
|
11899
|
+
onEnsureUserComplete(data);
|
|
11838
11900
|
}
|
|
11839
11901
|
});
|
|
11840
11902
|
const socialAuth = useAbcWaasSocial({
|
|
@@ -11887,7 +11949,7 @@ function AbcWaasAuthFlow({
|
|
|
11887
11949
|
}
|
|
11888
11950
|
|
|
11889
11951
|
// src/components/ConnectOptions/ConnectDetails.tsx
|
|
11890
|
-
import React84, { useContext as
|
|
11952
|
+
import React84, { useContext as useContext21, useEffect as useEffect27 } from "react";
|
|
11891
11953
|
|
|
11892
11954
|
// src/utils/colors.ts
|
|
11893
11955
|
var convertHexToRGBA = (hexCode, opacity = 1) => {
|
|
@@ -12168,7 +12230,7 @@ function GetDetail({
|
|
|
12168
12230
|
(wallet) => wallet.isRainbowKitConnector
|
|
12169
12231
|
);
|
|
12170
12232
|
const shownWallets = wallets.splice(0, 5);
|
|
12171
|
-
const { i18n: i18n2 } =
|
|
12233
|
+
const { i18n: i18n2 } = useContext21(I18nContext);
|
|
12172
12234
|
return /* @__PURE__ */ React84.createElement(
|
|
12173
12235
|
Box,
|
|
12174
12236
|
{
|
|
@@ -12279,7 +12341,7 @@ function ConnectDetail({
|
|
|
12279
12341
|
} = wallet;
|
|
12280
12342
|
const isDesktopDeepLinkAvailable = !!getDesktopUri;
|
|
12281
12343
|
const safari = isSafari();
|
|
12282
|
-
const { i18n: i18n2 } =
|
|
12344
|
+
const { i18n: i18n2 } = useContext21(I18nContext);
|
|
12283
12345
|
const hasExtension = !!wallet.extensionDownloadUrl;
|
|
12284
12346
|
const hasQrCodeAndExtension = downloadUrls?.qrCode && hasExtension;
|
|
12285
12347
|
const hasQrCodeAndDesktop = downloadUrls?.qrCode && !!wallet.desktopDownloadUrl;
|
|
@@ -12676,7 +12738,7 @@ function DownloadOptionsDetail({
|
|
|
12676
12738
|
}) {
|
|
12677
12739
|
const browser = getBrowser();
|
|
12678
12740
|
const platform = getPlatform();
|
|
12679
|
-
const modalSize =
|
|
12741
|
+
const modalSize = useContext21(ModalSizeContext);
|
|
12680
12742
|
const isCompact = modalSize === "compact";
|
|
12681
12743
|
const {
|
|
12682
12744
|
desktop,
|
|
@@ -12685,7 +12747,7 @@ function DownloadOptionsDetail({
|
|
|
12685
12747
|
extensionDownloadUrl,
|
|
12686
12748
|
mobileDownloadUrl
|
|
12687
12749
|
} = wallet;
|
|
12688
|
-
const { i18n: i18n2 } =
|
|
12750
|
+
const { i18n: i18n2 } = useContext21(I18nContext);
|
|
12689
12751
|
useEffect27(() => {
|
|
12690
12752
|
preloadCreateIcon();
|
|
12691
12753
|
preloadScanIcon();
|
|
@@ -12781,7 +12843,7 @@ function DownloadDetail({
|
|
|
12781
12843
|
wallet
|
|
12782
12844
|
}) {
|
|
12783
12845
|
const { downloadUrls, qrCode } = wallet;
|
|
12784
|
-
const { i18n: i18n2 } =
|
|
12846
|
+
const { i18n: i18n2 } = useContext21(I18nContext);
|
|
12785
12847
|
useEffect27(() => {
|
|
12786
12848
|
preloadCreateIcon();
|
|
12787
12849
|
preloadScanIcon();
|
|
@@ -12844,7 +12906,7 @@ function InstructionMobileDetail({
|
|
|
12844
12906
|
connectWallet,
|
|
12845
12907
|
wallet
|
|
12846
12908
|
}) {
|
|
12847
|
-
const { i18n: i18n2 } =
|
|
12909
|
+
const { i18n: i18n2 } = useContext21(I18nContext);
|
|
12848
12910
|
return /* @__PURE__ */ React84.createElement(
|
|
12849
12911
|
Box,
|
|
12850
12912
|
{
|
|
@@ -12932,7 +12994,7 @@ function InstructionMobileDetail({
|
|
|
12932
12994
|
function InstructionExtensionDetail({
|
|
12933
12995
|
wallet
|
|
12934
12996
|
}) {
|
|
12935
|
-
const { i18n: i18n2 } =
|
|
12997
|
+
const { i18n: i18n2 } = useContext21(I18nContext);
|
|
12936
12998
|
return /* @__PURE__ */ React84.createElement(
|
|
12937
12999
|
Box,
|
|
12938
13000
|
{
|
|
@@ -13021,7 +13083,7 @@ function InstructionDesktopDetail({
|
|
|
13021
13083
|
connectWallet,
|
|
13022
13084
|
wallet
|
|
13023
13085
|
}) {
|
|
13024
|
-
const { i18n: i18n2 } =
|
|
13086
|
+
const { i18n: i18n2 } = useContext21(I18nContext);
|
|
13025
13087
|
return /* @__PURE__ */ React84.createElement(
|
|
13026
13088
|
Box,
|
|
13027
13089
|
{
|
|
@@ -13114,10 +13176,10 @@ import React86, { Fragment as Fragment2 } from "react";
|
|
|
13114
13176
|
import React85 from "react";
|
|
13115
13177
|
|
|
13116
13178
|
// src/components/RainbowKitProvider/useCoolMode.ts
|
|
13117
|
-
import { useContext as
|
|
13179
|
+
import { useContext as useContext22, useEffect as useEffect28, useRef as useRef13 } from "react";
|
|
13118
13180
|
var useCoolMode = (imageUrl) => {
|
|
13119
|
-
const ref =
|
|
13120
|
-
const coolModeEnabled =
|
|
13181
|
+
const ref = useRef13(null);
|
|
13182
|
+
const coolModeEnabled = useContext22(CoolModeContext);
|
|
13121
13183
|
const resolvedImageUrl = useAsyncImage(imageUrl);
|
|
13122
13184
|
useEffect28(() => {
|
|
13123
13185
|
if (coolModeEnabled && ref.current && resolvedImageUrl) {
|
|
@@ -13561,7 +13623,7 @@ function PopularWalletList({
|
|
|
13561
13623
|
PopularWalletList.displayName = "PopularWalletList";
|
|
13562
13624
|
|
|
13563
13625
|
// src/components/ConnectOptions/ExternalWallets/hooks/useWalletConnection.ts
|
|
13564
|
-
import { useCallback as useCallback23, useEffect as useEffect29, useRef as
|
|
13626
|
+
import { useCallback as useCallback23, useEffect as useEffect29, useRef as useRef14, useState as useState29 } from "react";
|
|
13565
13627
|
import { useAccount as useAccount17, useConfig as useConfig3 } from "wagmi";
|
|
13566
13628
|
import { reconnect } from "wagmi/actions";
|
|
13567
13629
|
|
|
@@ -13587,9 +13649,9 @@ function useWalletConnection({
|
|
|
13587
13649
|
const [connectionError, setConnectionError] = useState29(false);
|
|
13588
13650
|
const { isConnected } = useAccount17();
|
|
13589
13651
|
const config2 = useConfig3();
|
|
13590
|
-
const onSuccessRef =
|
|
13652
|
+
const onSuccessRef = useRef14(onSuccess);
|
|
13591
13653
|
onSuccessRef.current = onSuccess;
|
|
13592
|
-
const successCalledRef =
|
|
13654
|
+
const successCalledRef = useRef14(false);
|
|
13593
13655
|
const callOnSuccess = useCallback23(() => {
|
|
13594
13656
|
if (!successCalledRef.current) {
|
|
13595
13657
|
successCalledRef.current = true;
|
|
@@ -14653,20 +14715,29 @@ function ConnectOptionsModal({
|
|
|
14653
14715
|
compact = false
|
|
14654
14716
|
}) {
|
|
14655
14717
|
const titleId = "rk_connect_title";
|
|
14656
|
-
const modalSize =
|
|
14718
|
+
const modalSize = useContext23(ModalSizeContext);
|
|
14657
14719
|
const compactModeEnabled = modalSize === ModalSizeOptions.COMPACT;
|
|
14658
|
-
const { disclaimer: Disclaimer } =
|
|
14659
|
-
const { i18n: i18n2 } =
|
|
14720
|
+
const { disclaimer: Disclaimer } = useContext23(AppContext);
|
|
14721
|
+
const { i18n: i18n2 } = useContext23(I18nContext);
|
|
14660
14722
|
const STORAGE_PREFIX3 = "talkenkit_abc_";
|
|
14661
14723
|
const [abcWaasLoginData, setAbcWaasLoginData] = useState35(null);
|
|
14662
14724
|
const [email, setEmail] = useState35("");
|
|
14663
|
-
const initialized =
|
|
14664
|
-
const pinAuthFlowRef =
|
|
14665
|
-
const { connector } =
|
|
14725
|
+
const initialized = useRef15(false);
|
|
14726
|
+
const pinAuthFlowRef = useRef15(null);
|
|
14727
|
+
const { connector } = useContext23(WalletButtonContext);
|
|
14666
14728
|
const wallets = useWalletConnectors(false).filter((wallet) => wallet.ready || !!wallet.extensionDownloadUrl).sort((a, b) => a.groupIndex - b.groupIndex);
|
|
14667
14729
|
const unfilteredWallets = useWalletConnectors();
|
|
14668
14730
|
const { connect } = useConnect2();
|
|
14669
14731
|
const connectors = useConnectors();
|
|
14732
|
+
const handleEnsureUserComplete = async (_data) => {
|
|
14733
|
+
const abcConnector = connectors.find(
|
|
14734
|
+
(c) => c.id === "abc" || c.id === "abcWallet"
|
|
14735
|
+
);
|
|
14736
|
+
if (abcConnector) {
|
|
14737
|
+
connect({ connector: abcConnector });
|
|
14738
|
+
}
|
|
14739
|
+
onClose();
|
|
14740
|
+
};
|
|
14670
14741
|
const walletConnection = useWalletConnection({
|
|
14671
14742
|
onSuccess: () => {
|
|
14672
14743
|
onClose();
|
|
@@ -14852,6 +14923,7 @@ function ConnectOptionsModal({
|
|
|
14852
14923
|
setEmail(loginData?.email || "");
|
|
14853
14924
|
pinAuthFlowRef.current?.showPinVerify(loginData);
|
|
14854
14925
|
},
|
|
14926
|
+
onEnsureUserComplete: handleEnsureUserComplete,
|
|
14855
14927
|
compact: true,
|
|
14856
14928
|
onClose
|
|
14857
14929
|
}
|
|
@@ -14930,6 +15002,7 @@ function ConnectOptionsModal({
|
|
|
14930
15002
|
setEmail(loginData?.email || "");
|
|
14931
15003
|
pinAuthFlowRef.current?.showPinVerify(loginData);
|
|
14932
15004
|
},
|
|
15005
|
+
onEnsureUserComplete: handleEnsureUserComplete,
|
|
14933
15006
|
compact: compactModeEnabled,
|
|
14934
15007
|
onClose
|
|
14935
15008
|
}
|
|
@@ -15112,9 +15185,9 @@ function ConnectOptionsModal({
|
|
|
15112
15185
|
// src/components/ConnectOptions/MobileOptions.tsx
|
|
15113
15186
|
import React92, {
|
|
15114
15187
|
useCallback as useCallback24,
|
|
15115
|
-
useContext as
|
|
15188
|
+
useContext as useContext24,
|
|
15116
15189
|
useEffect as useEffect33,
|
|
15117
|
-
useRef as
|
|
15190
|
+
useRef as useRef16,
|
|
15118
15191
|
useState as useState36
|
|
15119
15192
|
} from "react";
|
|
15120
15193
|
|
|
@@ -15167,8 +15240,8 @@ function WalletButton({
|
|
|
15167
15240
|
showWalletConnectModal
|
|
15168
15241
|
} = wallet;
|
|
15169
15242
|
const coolModeRef = useCoolMode(iconUrl);
|
|
15170
|
-
const initialized =
|
|
15171
|
-
const { i18n: i18n2 } =
|
|
15243
|
+
const initialized = useRef16(false);
|
|
15244
|
+
const { i18n: i18n2 } = useContext24(I18nContext);
|
|
15172
15245
|
const onConnect = useCallback24(async () => {
|
|
15173
15246
|
const onMobileUri = async () => {
|
|
15174
15247
|
const mobileUri = await getMobileUri?.();
|
|
@@ -15266,7 +15339,7 @@ function MobileOptions({ onClose }) {
|
|
|
15266
15339
|
const wallets = useWalletConnectors().filter(
|
|
15267
15340
|
(wallet) => wallet.isRainbowKitConnector
|
|
15268
15341
|
);
|
|
15269
|
-
const { disclaimer: Disclaimer, learnMoreUrl } =
|
|
15342
|
+
const { disclaimer: Disclaimer, learnMoreUrl } = useContext24(AppContext);
|
|
15270
15343
|
let headerLabel2 = null;
|
|
15271
15344
|
let walletContent = null;
|
|
15272
15345
|
let headerBackgroundContrast = false;
|
|
@@ -15274,7 +15347,7 @@ function MobileOptions({ onClose }) {
|
|
|
15274
15347
|
const [walletStep, setWalletStep] = useState36(
|
|
15275
15348
|
"CONNECT" /* Connect */
|
|
15276
15349
|
);
|
|
15277
|
-
const { i18n: i18n2 } =
|
|
15350
|
+
const { i18n: i18n2 } = useContext24(I18nContext);
|
|
15278
15351
|
const ios = isIOS();
|
|
15279
15352
|
switch (walletStep) {
|
|
15280
15353
|
case "CONNECT" /* Connect */: {
|
|
@@ -15512,10 +15585,10 @@ function MobileOptions({ onClose }) {
|
|
|
15512
15585
|
}
|
|
15513
15586
|
|
|
15514
15587
|
// src/components/ConnectOptions/MobileStatus.tsx
|
|
15515
|
-
import React93, { useContext as
|
|
15588
|
+
import React93, { useContext as useContext25 } from "react";
|
|
15516
15589
|
var MobileStatus = ({ onClose }) => {
|
|
15517
|
-
const { connector } =
|
|
15518
|
-
const { i18n: i18n2 } =
|
|
15590
|
+
const { connector } = useContext25(WalletButtonContext);
|
|
15591
|
+
const { i18n: i18n2 } = useContext25(I18nContext);
|
|
15519
15592
|
const connectorName = connector?.name || "";
|
|
15520
15593
|
return /* @__PURE__ */ React93.createElement(Box, null, /* @__PURE__ */ React93.createElement(
|
|
15521
15594
|
Box,
|
|
@@ -15559,9 +15632,9 @@ var MobileStatus = ({ onClose }) => {
|
|
|
15559
15632
|
|
|
15560
15633
|
// src/components/ConnectOptions/ConnectOptions.tsx
|
|
15561
15634
|
function ConnectOptions({ onClose }) {
|
|
15562
|
-
const { connector } =
|
|
15563
|
-
const multiChainContext =
|
|
15564
|
-
const walletContext =
|
|
15635
|
+
const { connector } = useContext26(WalletButtonContext);
|
|
15636
|
+
const multiChainContext = useContext26(MultiChainContext);
|
|
15637
|
+
const walletContext = useContext26(
|
|
15565
15638
|
WalletContext2
|
|
15566
15639
|
);
|
|
15567
15640
|
const { solanaWallets, select, connecting } = useMemo20(() => {
|
|
@@ -15695,7 +15768,7 @@ function ConnectOptions({ onClose }) {
|
|
|
15695
15768
|
|
|
15696
15769
|
// src/components/ConnectOptions/MultiChainConnectOptions.tsx
|
|
15697
15770
|
import { useWallet as useWallet5 } from "@solana/wallet-adapter-react";
|
|
15698
|
-
import React97, { useContext as
|
|
15771
|
+
import React97, { useContext as useContext27, useCallback as useCallback27, useState as useState39 } from "react";
|
|
15699
15772
|
|
|
15700
15773
|
// src/components/ChainSelector/ChainSelector.tsx
|
|
15701
15774
|
import clsx3 from "clsx";
|
|
@@ -15850,8 +15923,8 @@ function MultiChainConnectOptions({
|
|
|
15850
15923
|
onClose,
|
|
15851
15924
|
showChainSelector = true
|
|
15852
15925
|
}) {
|
|
15853
|
-
const multiChainContext =
|
|
15854
|
-
const { connector } =
|
|
15926
|
+
const multiChainContext = useContext27(MultiChainContext);
|
|
15927
|
+
const { connector } = useContext27(WalletButtonContext);
|
|
15855
15928
|
let useMobileUI = isMobile();
|
|
15856
15929
|
try {
|
|
15857
15930
|
const config2 = useRainbowKitConfig();
|
|
@@ -15881,7 +15954,7 @@ function MultiChainConnectOptions({
|
|
|
15881
15954
|
}
|
|
15882
15955
|
function UnifiedWalletList({ onClose }) {
|
|
15883
15956
|
const { wallets: solanaWallets, select, connecting } = useWallet5();
|
|
15884
|
-
const _multiChainContext =
|
|
15957
|
+
const _multiChainContext = useContext27(MultiChainContext);
|
|
15885
15958
|
const [connectingWallet, setConnectingWallet] = useState39(null);
|
|
15886
15959
|
const handleSolanaWalletClick = useCallback27(
|
|
15887
15960
|
async (walletName2) => {
|
|
@@ -15965,7 +16038,7 @@ function UnifiedWalletList({ onClose }) {
|
|
|
15965
16038
|
function ConnectModal({ onClose, open }) {
|
|
15966
16039
|
const titleId = "rk_connect_title";
|
|
15967
16040
|
const connectionStatus = useConnectionStatus();
|
|
15968
|
-
const multiChainContext =
|
|
16041
|
+
const multiChainContext = useContext28(MultiChainContext);
|
|
15969
16042
|
const { disconnect } = useDisconnect3();
|
|
15970
16043
|
const { isConnecting, isConnected } = useAccount18();
|
|
15971
16044
|
React98.useEffect(() => {
|
|
@@ -16016,7 +16089,7 @@ function useModalStateValue() {
|
|
|
16016
16089
|
openModal: useCallback28(() => setModalOpen(true), [])
|
|
16017
16090
|
};
|
|
16018
16091
|
}
|
|
16019
|
-
var ModalContext =
|
|
16092
|
+
var ModalContext = createContext18({
|
|
16020
16093
|
accountModalOpen: false,
|
|
16021
16094
|
chainModalOpen: false,
|
|
16022
16095
|
connectModalOpen: false,
|
|
@@ -16045,7 +16118,7 @@ function ModalProvider({ children }) {
|
|
|
16045
16118
|
const { chainId } = useAccount19();
|
|
16046
16119
|
const { chains } = useConfig4();
|
|
16047
16120
|
const isCurrentChainSupported = chains.some((chain) => chain.id === chainId);
|
|
16048
|
-
const multiChainContext =
|
|
16121
|
+
const multiChainContext = useContext29(MultiChainContext);
|
|
16049
16122
|
const _isAnyChainConnected = connectionStatus === "connected" || multiChainContext?.solanaConnected;
|
|
16050
16123
|
const closeModals = useCallback28(
|
|
16051
16124
|
({ keepConnectModalOpen = false } = {}) => {
|
|
@@ -16101,7 +16174,7 @@ function ModalProvider({ children }) {
|
|
|
16101
16174
|
);
|
|
16102
16175
|
}
|
|
16103
16176
|
function useModalState() {
|
|
16104
|
-
const { accountModalOpen, chainModalOpen, connectModalOpen } =
|
|
16177
|
+
const { accountModalOpen, chainModalOpen, connectModalOpen } = useContext29(ModalContext);
|
|
16105
16178
|
return {
|
|
16106
16179
|
accountModalOpen,
|
|
16107
16180
|
chainModalOpen,
|
|
@@ -16109,19 +16182,19 @@ function useModalState() {
|
|
|
16109
16182
|
};
|
|
16110
16183
|
}
|
|
16111
16184
|
function useAccountModal() {
|
|
16112
|
-
const { accountModalOpen, openAccountModal } =
|
|
16185
|
+
const { accountModalOpen, openAccountModal } = useContext29(ModalContext);
|
|
16113
16186
|
return { accountModalOpen, openAccountModal };
|
|
16114
16187
|
}
|
|
16115
16188
|
function useChainModal() {
|
|
16116
|
-
const { chainModalOpen, openChainModal } =
|
|
16189
|
+
const { chainModalOpen, openChainModal } = useContext29(ModalContext);
|
|
16117
16190
|
return { chainModalOpen, openChainModal };
|
|
16118
16191
|
}
|
|
16119
16192
|
function useWalletConnectOpenState() {
|
|
16120
|
-
const { isWalletConnectModalOpen, setIsWalletConnectModalOpen } =
|
|
16193
|
+
const { isWalletConnectModalOpen, setIsWalletConnectModalOpen } = useContext29(ModalContext);
|
|
16121
16194
|
return { isWalletConnectModalOpen, setIsWalletConnectModalOpen };
|
|
16122
16195
|
}
|
|
16123
16196
|
function useConnectModal() {
|
|
16124
|
-
const { connectModalOpen, openConnectModal } =
|
|
16197
|
+
const { connectModalOpen, openConnectModal } = useContext29(ModalContext);
|
|
16125
16198
|
const { isWalletConnectModalOpen } = useWalletConnectOpenState();
|
|
16126
16199
|
return {
|
|
16127
16200
|
connectModalOpen: connectModalOpen || isWalletConnectModalOpen,
|
|
@@ -16170,8 +16243,8 @@ function ConnectButtonRenderer({
|
|
|
16170
16243
|
const chainIconUrl = rainbowKitChain?.iconUrl ?? void 0;
|
|
16171
16244
|
const chainIconBackground = rainbowKitChain?.iconBackground ?? void 0;
|
|
16172
16245
|
const resolvedChainIconUrl = useAsyncImage(chainIconUrl);
|
|
16173
|
-
const multiChainContext =
|
|
16174
|
-
const showRecentTransactions =
|
|
16246
|
+
const multiChainContext = useContext30(MultiChainContext);
|
|
16247
|
+
const showRecentTransactions = useContext30(ShowRecentTransactionsContext);
|
|
16175
16248
|
const hasPendingTransactions = useRecentTransactions().some(({ status }) => status === "pending") && showRecentTransactions;
|
|
16176
16249
|
const { balance, ensAvatar, ensName } = useProfile({
|
|
16177
16250
|
address
|
|
@@ -16239,7 +16312,7 @@ function ConnectButton({
|
|
|
16239
16312
|
const connectionStatus = useConnectionStatus();
|
|
16240
16313
|
const { setShowBalance } = useShowBalance();
|
|
16241
16314
|
const [ready, setReady] = useState41(false);
|
|
16242
|
-
const { i18n: i18n2 } =
|
|
16315
|
+
const { i18n: i18n2 } = useContext31(I18nContext);
|
|
16243
16316
|
const bitcoinWallet = useBitcoinWallet();
|
|
16244
16317
|
const [rollingChainIndex, setRollingChainIndex] = useState41(0);
|
|
16245
16318
|
const chainTypes = [
|
|
@@ -16525,7 +16598,7 @@ ConnectButton.__defaultProps = defaultProps;
|
|
|
16525
16598
|
ConnectButton.Custom = ConnectButtonRenderer;
|
|
16526
16599
|
|
|
16527
16600
|
// src/components/WalletButton/WalletButton.tsx
|
|
16528
|
-
import React103, { useContext as
|
|
16601
|
+
import React103, { useContext as useContext33 } from "react";
|
|
16529
16602
|
|
|
16530
16603
|
// src/components/WalletButton/WalletButton.css.ts
|
|
16531
16604
|
var border = "hk857q0";
|
|
@@ -16533,7 +16606,7 @@ var maxWidth = "hk857q1";
|
|
|
16533
16606
|
|
|
16534
16607
|
// src/components/WalletButton/WalletButtonRenderer.tsx
|
|
16535
16608
|
import React102, {
|
|
16536
|
-
useContext as
|
|
16609
|
+
useContext as useContext32,
|
|
16537
16610
|
useEffect as useEffect36,
|
|
16538
16611
|
useMemo as useMemo22,
|
|
16539
16612
|
useState as useState42
|
|
@@ -16548,7 +16621,7 @@ function WalletButtonRenderer({
|
|
|
16548
16621
|
const isMounted = useIsMounted();
|
|
16549
16622
|
const { openConnectModal } = useConnectModal();
|
|
16550
16623
|
const { connectModalOpen } = useModalState();
|
|
16551
|
-
const { connector, setConnector } =
|
|
16624
|
+
const { connector, setConnector } = useContext32(WalletButtonContext);
|
|
16552
16625
|
const [firstConnector] = useWalletConnectors().filter((wallet2) => wallet2.isRainbowKitConnector).filter((_wallet) => _wallet.id.toLowerCase() === wallet.toLowerCase()).sort((a, b) => a.groupIndex - b.groupIndex);
|
|
16553
16626
|
if (!firstConnector) {
|
|
16554
16627
|
throw new Error("Connector not found");
|
|
@@ -16619,7 +16692,7 @@ function WalletButtonRenderer({
|
|
|
16619
16692
|
var WalletButton2 = ({ wallet }) => {
|
|
16620
16693
|
return /* @__PURE__ */ React103.createElement(WalletButtonRenderer, { wallet }, ({ ready, connect, connected, mounted, connector, loading }) => {
|
|
16621
16694
|
const isDisabled = !ready || loading;
|
|
16622
|
-
const { i18n: i18n2 } =
|
|
16695
|
+
const { i18n: i18n2 } = useContext33(I18nContext);
|
|
16623
16696
|
const connectorName = connector?.name || "";
|
|
16624
16697
|
if (!mounted)
|
|
16625
16698
|
return;
|
|
@@ -17800,12 +17873,12 @@ function getSolanaConfig(options = {}) {
|
|
|
17800
17873
|
}
|
|
17801
17874
|
|
|
17802
17875
|
// src/wallets/walletConnectors/abcWallet/AbcEvmAutoConnector.tsx
|
|
17803
|
-
import { useEffect as useEffect39, useRef as
|
|
17876
|
+
import { useEffect as useEffect39, useRef as useRef17 } from "react";
|
|
17804
17877
|
import { useAccount as useAccount24, useConnect as useConnect3 } from "wagmi";
|
|
17805
17878
|
function AbcEvmAutoConnector() {
|
|
17806
17879
|
const { connectors, connect } = useConnect3();
|
|
17807
17880
|
const { isConnected } = useAccount24();
|
|
17808
|
-
const hasAttemptedRef =
|
|
17881
|
+
const hasAttemptedRef = useRef17(false);
|
|
17809
17882
|
useEffect39(() => {
|
|
17810
17883
|
if (isConnected || hasAttemptedRef.current) {
|
|
17811
17884
|
return;
|
|
@@ -17867,17 +17940,17 @@ function ChainIndicator({
|
|
|
17867
17940
|
|
|
17868
17941
|
// src/providers/AbcAuthProvider.tsx
|
|
17869
17942
|
import React105, {
|
|
17870
|
-
createContext as
|
|
17871
|
-
useContext as
|
|
17943
|
+
createContext as createContext19,
|
|
17944
|
+
useContext as useContext34,
|
|
17872
17945
|
useState as useState45,
|
|
17873
17946
|
useEffect as useEffect40,
|
|
17874
17947
|
useCallback as useCallback31
|
|
17875
17948
|
} from "react";
|
|
17876
17949
|
var DEBUG = true;
|
|
17877
17950
|
var STORAGE_PREFIX2 = "talkenkit_abc_";
|
|
17878
|
-
var AbcAuthContext =
|
|
17951
|
+
var AbcAuthContext = createContext19(null);
|
|
17879
17952
|
function useAbcAuth() {
|
|
17880
|
-
const context =
|
|
17953
|
+
const context = useContext34(AbcAuthContext);
|
|
17881
17954
|
if (!context) {
|
|
17882
17955
|
throw new Error("useAbcAuth must be used within AbcAuthProvider");
|
|
17883
17956
|
}
|
|
@@ -18160,12 +18233,12 @@ function AbcAuthProvider({ children }) {
|
|
|
18160
18233
|
|
|
18161
18234
|
// src/components/AbcAuth/PinProvider.tsx
|
|
18162
18235
|
import React106, {
|
|
18163
|
-
createContext as
|
|
18164
|
-
useContext as
|
|
18236
|
+
createContext as createContext20,
|
|
18237
|
+
useContext as useContext35,
|
|
18165
18238
|
useState as useState46,
|
|
18166
18239
|
useCallback as useCallback32
|
|
18167
18240
|
} from "react";
|
|
18168
|
-
var PinContext =
|
|
18241
|
+
var PinContext = createContext20(null);
|
|
18169
18242
|
function PinProvider({ children }) {
|
|
18170
18243
|
const [isModalOpen, setIsModalOpen] = useState46(false);
|
|
18171
18244
|
const [purpose, setPurpose] = useState46("transaction");
|
|
@@ -18235,7 +18308,7 @@ function PinProvider({ children }) {
|
|
|
18235
18308
|
));
|
|
18236
18309
|
}
|
|
18237
18310
|
function usePin() {
|
|
18238
|
-
const context =
|
|
18311
|
+
const context = useContext35(PinContext);
|
|
18239
18312
|
if (!context) {
|
|
18240
18313
|
return {
|
|
18241
18314
|
requestPin: async () => {
|
|
@@ -18504,6 +18577,8 @@ export {
|
|
|
18504
18577
|
useConnectModal,
|
|
18505
18578
|
useDeviceType,
|
|
18506
18579
|
useEstimateFee,
|
|
18580
|
+
useModalThemeClass,
|
|
18581
|
+
useModalThemeMode,
|
|
18507
18582
|
useMultiChain,
|
|
18508
18583
|
useNonEvmConfirmation,
|
|
18509
18584
|
usePin,
|