@funkit/connect 1.4.0 → 1.4.2
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/CHANGELOG.md +18 -0
- package/dist/__private__/index.d.ts +0 -4
- package/dist/components/FunConnectOptions/ConnectDetails.d.ts +7 -0
- package/dist/components/QRCode/QRCode.css.d.ts +1 -0
- package/dist/index.css +5 -43
- package/dist/index.js +514 -2202
- package/dist/wallets/walletConnectors/index.js +52 -52
- package/package.json +5 -5
- package/dist/components/ConnectOptions/ConnectDetails.d.ts +0 -35
- package/dist/components/ConnectOptions/ConnectOptions.d.ts +0 -4
- package/dist/components/ConnectOptions/DesktopOptions.css.d.ts +0 -4
- package/dist/components/ConnectOptions/DesktopOptions.d.ts +0 -15
- package/dist/components/ConnectOptions/MobileOptions.css.d.ts +0 -3
- package/dist/components/ConnectOptions/MobileOptions.d.ts +0 -10
- package/dist/components/ConnectOptions/MobileStatus.d.ts +0 -4
- package/dist/connect-XNDTNVUH.js +0 -6
- package/dist/create-PAJXJDV3.js +0 -6
- package/dist/refresh-5KGGHTJP.js +0 -6
- package/dist/scan-HZBLXLM4.js +0 -6
- package/dist/wallets/walletConnectors/chunk-2DWBVWFI.js +0 -87
- package/dist/wallets/walletConnectors/chunk-3F5GNHAG.js +0 -182
- package/dist/wallets/walletConnectors/chunk-3R3RNCGE.js +0 -100
- package/dist/wallets/walletConnectors/chunk-5L2OLU3J.js +0 -102
- package/dist/wallets/walletConnectors/chunk-BCXBFAL4.js +0 -98
- package/dist/wallets/walletConnectors/chunk-M4SPCKW4.js +0 -66
- package/dist/wallets/walletConnectors/chunk-MFS6NY6T.js +0 -105
- package/dist/wallets/walletConnectors/chunk-MOAWRDEM.js +0 -95
- package/dist/wallets/walletConnectors/chunk-NK3DYIAB.js +0 -92
- package/dist/wallets/walletConnectors/chunk-OMKARG6Y.js +0 -94
- package/dist/wallets/walletConnectors/chunk-OPO2D6GL.js +0 -102
- package/dist/wallets/walletConnectors/chunk-OXWTS7HX.js +0 -98
- package/dist/wallets/walletConnectors/chunk-PJRUHFBT.js +0 -71
- package/dist/wallets/walletConnectors/chunk-R5GNFRXW.js +0 -96
- package/dist/wallets/walletConnectors/chunk-S2IWMXKX.js +0 -94
- package/dist/wallets/walletConnectors/chunk-WH7S23VZ.js +0 -73
- package/dist/wallets/walletConnectors/chunk-XB2GFXBL.js +0 -107
- package/dist/wallets/walletConnectors/chunk-XUXFYTCV.js +0 -96
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import "./chunk-I24HX4XM.js";
|
|
12
12
|
|
|
13
13
|
// src/components/ConnectButton/ConnectButton.tsx
|
|
14
|
-
import
|
|
14
|
+
import React135, { useContext as useContext27, useEffect as useEffect34, useState as useState44 } from "react";
|
|
15
15
|
|
|
16
16
|
// src/css/sprinkles.css.ts
|
|
17
17
|
import { createMapValueFn as _51c72 } from "@vanilla-extract/sprinkles/createUtils";
|
|
@@ -130,13 +130,13 @@ import PrivyJS, {
|
|
|
130
130
|
getUserEmbeddedWallet,
|
|
131
131
|
LocalStorage
|
|
132
132
|
} from "@privy-io/js-sdk-core";
|
|
133
|
-
import
|
|
134
|
-
createContext as
|
|
133
|
+
import React130, {
|
|
134
|
+
createContext as createContext18,
|
|
135
135
|
useCallback as useCallback31,
|
|
136
|
-
useContext as
|
|
137
|
-
useEffect as
|
|
136
|
+
useContext as useContext23,
|
|
137
|
+
useEffect as useEffect30,
|
|
138
138
|
useMemo as useMemo35,
|
|
139
|
-
useState as
|
|
139
|
+
useState as useState39
|
|
140
140
|
} from "react";
|
|
141
141
|
import { useConfig as useConfig5, useConnect as useConnect2, useDisconnect as useDisconnect3 } from "wagmi";
|
|
142
142
|
|
|
@@ -192,7 +192,8 @@ import { datadogLogs } from "@datadog/browser-logs";
|
|
|
192
192
|
var DDOG_CLIENT_TOKEN = "pub4f86c6be8c792cb48dc156a8c17d9a47";
|
|
193
193
|
var FUN_DEV_API_KEYS = [
|
|
194
194
|
"hnHevQR0y394nBprGrvNx4HgoZHUwMet5mXTOBhf",
|
|
195
|
-
"MYny3w7xJh6PRlRgkJ9604sHouY2MTke6lCPpSHq"
|
|
195
|
+
"MYny3w7xJh6PRlRgkJ9604sHouY2MTke6lCPpSHq",
|
|
196
|
+
"Z9SZaOwpmE40KX61mUKWm5hrpGh7WHVkaTvQJpQk"
|
|
196
197
|
];
|
|
197
198
|
function setDdogEnv(environment) {
|
|
198
199
|
datadogLogs.setGlobalContextProperty("env", environment);
|
|
@@ -367,7 +368,7 @@ var flagConfig = {
|
|
|
367
368
|
{
|
|
368
369
|
key: "apiKey",
|
|
369
370
|
type: "isAnyOf",
|
|
370
|
-
values: ["
|
|
371
|
+
values: ["Z9SZaOwpmE40KX61mUKWm5hrpGh7WHVkaTvQJpQk"]
|
|
371
372
|
}
|
|
372
373
|
],
|
|
373
374
|
value: true
|
|
@@ -1129,13 +1130,13 @@ var useFunkitConnectChainsById = () => groupChainsById(useFunkitConnectChains())
|
|
|
1129
1130
|
var useInitialChainId = () => useContext3(FunkitConnectChainContext).initialChainId;
|
|
1130
1131
|
|
|
1131
1132
|
// src/components/FunkitProvider/ModalContext.tsx
|
|
1132
|
-
import
|
|
1133
|
-
createContext as
|
|
1133
|
+
import React129, {
|
|
1134
|
+
createContext as createContext17,
|
|
1134
1135
|
useCallback as useCallback30,
|
|
1135
|
-
useContext as
|
|
1136
|
-
useEffect as
|
|
1136
|
+
useContext as useContext22,
|
|
1137
|
+
useEffect as useEffect29,
|
|
1137
1138
|
useMemo as useMemo34,
|
|
1138
|
-
useState as
|
|
1139
|
+
useState as useState38
|
|
1139
1140
|
} from "react";
|
|
1140
1141
|
import { useAccount as useAccount11, useAccountEffect as useAccountEffect2, useConfig as useConfig4 } from "wagmi";
|
|
1141
1142
|
|
|
@@ -1888,7 +1889,7 @@ function GeneralWalletProvider({ children }) {
|
|
|
1888
1889
|
userId: userInfo.id
|
|
1889
1890
|
});
|
|
1890
1891
|
}
|
|
1891
|
-
}, [userInfo]);
|
|
1892
|
+
}, [apiKey, userInfo]);
|
|
1892
1893
|
const intervalRef = useRef2();
|
|
1893
1894
|
const [isFetchingAssets, setIsFetchingAssets] = useState6(false);
|
|
1894
1895
|
const [walletAssets, setWalletAssets] = useState6(null);
|
|
@@ -2183,12 +2184,6 @@ var useActivityTraversal = () => {
|
|
|
2183
2184
|
// src/components/ProfileDetails/ProfileDetails.tsx
|
|
2184
2185
|
import React107, { useCallback as useCallback24, useState as useState31 } from "react";
|
|
2185
2186
|
|
|
2186
|
-
// src/components/ConnectOptions/DesktopOptions.css.ts
|
|
2187
|
-
var QRCodeBackgroundClassName = "mu4zht0";
|
|
2188
|
-
var ScrollClassName = "mu4zht2 _1rsrm2fba _1rsrm2fbw";
|
|
2189
|
-
var sidebar = "mu4zht3";
|
|
2190
|
-
var sidebarCompactMode = "mu4zht4";
|
|
2191
|
-
|
|
2192
2187
|
// src/components/FunCheckoutHistoryModal/FunCheckoutHistoryContent.tsx
|
|
2193
2188
|
import React91, { useCallback as useCallback22, useMemo as useMemo26, useState as useState26 } from "react";
|
|
2194
2189
|
|
|
@@ -2936,7 +2931,6 @@ function FunkitCheckoutProvider({ children }) {
|
|
|
2936
2931
|
historyDepositAddress,
|
|
2937
2932
|
isGuestUserOnCheckoutHistory,
|
|
2938
2933
|
isUserLoggedIn,
|
|
2939
|
-
walletAddress,
|
|
2940
2934
|
userInfo
|
|
2941
2935
|
]);
|
|
2942
2936
|
useEffect7(() => {
|
|
@@ -4207,7 +4201,7 @@ var ASSET_LOGO_SRCS = {
|
|
|
4207
4201
|
WEETH: "https://assets.coingecko.com/coins/images/33033/large/weETH.png?1701438396",
|
|
4208
4202
|
GMX: "https://raw.githubusercontent.com/Uniswap/assets/master/blockchains/arbitrum/assets/0xfc5A1A6EB076a2C7aD06eD22C90d7E710E35ad0a/logo.png",
|
|
4209
4203
|
TYBG: "https://assets.coingecko.com/coins/images/34563/large/tybg.png?1705400778",
|
|
4210
|
-
LUCK: "https://
|
|
4204
|
+
LUCK: "https://s3.us-west-2.amazonaws.com/sdk-cdn.fun.xyz/images/luck.jpg",
|
|
4211
4205
|
WSTETH: "https://assets.coingecko.com/coins/images/18834/large/wstETH.png?1696518295",
|
|
4212
4206
|
WETH: "https://www.cryptocompare.com/media/38553079/weth.png",
|
|
4213
4207
|
MNT: "https://img.cryptorank.io/coins/mantle1681720399218.png",
|
|
@@ -4272,8 +4266,8 @@ function AsyncImage({
|
|
|
4272
4266
|
width,
|
|
4273
4267
|
testId
|
|
4274
4268
|
}) {
|
|
4275
|
-
const
|
|
4276
|
-
const isRemoteImage =
|
|
4269
|
+
const src3 = useAsyncImage(srcProp || fallbackSrc);
|
|
4270
|
+
const isRemoteImage = src3 && /^http/.test(src3);
|
|
4277
4271
|
const [isRemoteImageLoaded, setRemoteImageLoaded] = useReducer2(
|
|
4278
4272
|
() => true,
|
|
4279
4273
|
false
|
|
@@ -4294,11 +4288,11 @@ function AsyncImage({
|
|
|
4294
4288
|
width: typeof width === "string" ? width : void 0,
|
|
4295
4289
|
testId
|
|
4296
4290
|
}, /* @__PURE__ */ React26.createElement(Box, {
|
|
4297
|
-
...useAsImage ? { "aria-hidden": true, as: "img", src:
|
|
4291
|
+
...useAsImage ? { "aria-hidden": true, as: "img", src: src3 } : isRemoteImage ? {
|
|
4298
4292
|
"aria-hidden": true,
|
|
4299
4293
|
as: "img",
|
|
4300
4294
|
onLoad: setRemoteImageLoaded,
|
|
4301
|
-
src:
|
|
4295
|
+
src: src3,
|
|
4302
4296
|
onError: ({ currentTarget }) => {
|
|
4303
4297
|
currentTarget.onerror = null;
|
|
4304
4298
|
currentTarget.src = fallbackSrc;
|
|
@@ -4315,9 +4309,9 @@ function AsyncImage({
|
|
|
4315
4309
|
...!useAsImage ? isRemoteImage ? {
|
|
4316
4310
|
opacity: isRemoteImageLoaded ? 1 : 0
|
|
4317
4311
|
} : {
|
|
4318
|
-
backgroundImage:
|
|
4312
|
+
backgroundImage: src3 ? `url(${src3})` : void 0,
|
|
4319
4313
|
backgroundRepeat: "no-repeat",
|
|
4320
|
-
opacity:
|
|
4314
|
+
opacity: src3 ? 1 : 0
|
|
4321
4315
|
} : {}
|
|
4322
4316
|
},
|
|
4323
4317
|
width: "full"
|
|
@@ -5845,16 +5839,6 @@ import React52, { useMemo as useMemo10 } from "react";
|
|
|
5845
5839
|
|
|
5846
5840
|
// src/components/Icons/Info.tsx
|
|
5847
5841
|
import React51 from "react";
|
|
5848
|
-
var InfoIcon = () => /* @__PURE__ */ React51.createElement("svg", {
|
|
5849
|
-
fill: "none",
|
|
5850
|
-
height: "12",
|
|
5851
|
-
viewBox: "0 0 8 12",
|
|
5852
|
-
width: "8",
|
|
5853
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
5854
|
-
}, /* @__PURE__ */ React51.createElement("path", {
|
|
5855
|
-
d: "M3.64258 7.99609C4.19336 7.99609 4.5625 7.73828 4.68555 7.24609C4.69141 7.21094 4.70312 7.16406 4.70898 7.13477C4.80859 6.60742 5.05469 6.35547 6.04492 5.76367C7.14648 5.10156 7.67969 4.3457 7.67969 3.24414C7.67969 1.39844 6.17383 0.255859 3.95898 0.255859C2.32422 0.255859 1.05859 0.894531 0.548828 1.86719C0.396484 2.14844 0.320312 2.44727 0.320312 2.74023C0.314453 3.37305 0.742188 3.79492 1.42188 3.79492C1.91406 3.79492 2.33594 3.54883 2.53516 3.11523C2.78711 2.47656 3.23242 2.21289 3.83594 2.21289C4.55664 2.21289 5.10742 2.65234 5.10742 3.29102C5.10742 3.9707 4.7793 4.29883 3.81836 4.87891C3.02148 5.36523 2.50586 5.92773 2.50586 6.76562V6.90039C2.50586 7.55664 2.96289 7.99609 3.64258 7.99609ZM3.67188 11.4473C4.42773 11.4473 5.04297 10.8672 5.04297 10.1406C5.04297 9.41406 4.42773 8.83984 3.67188 8.83984C2.91602 8.83984 2.30664 9.41406 2.30664 10.1406C2.30664 10.8672 2.91602 11.4473 3.67188 11.4473Z",
|
|
5856
|
-
fill: "currentColor"
|
|
5857
|
-
}));
|
|
5858
5842
|
var FunInfoIcon = () => /* @__PURE__ */ React51.createElement("svg", {
|
|
5859
5843
|
width: "13",
|
|
5860
5844
|
height: "14",
|
|
@@ -6744,6 +6728,11 @@ import React63 from "react";
|
|
|
6744
6728
|
// src/components/QRCode/QRCode.tsx
|
|
6745
6729
|
import QRCodeUtil from "qrcode";
|
|
6746
6730
|
import React62, { useMemo as useMemo15 } from "react";
|
|
6731
|
+
|
|
6732
|
+
// src/components/QRCode/QRCode.css.ts
|
|
6733
|
+
var QRCodeBackgroundClassName = "mthwt00";
|
|
6734
|
+
|
|
6735
|
+
// src/components/QRCode/QRCode.tsx
|
|
6747
6736
|
var generateMatrix = (value, errorCorrectionLevel) => {
|
|
6748
6737
|
const arr = Array.prototype.slice.call(
|
|
6749
6738
|
QRCodeUtil.create(value, { errorCorrectionLevel }).modules.data,
|
|
@@ -7942,7 +7931,7 @@ var Chain3 = ({
|
|
|
7942
7931
|
switchChain,
|
|
7943
7932
|
chainIconSize,
|
|
7944
7933
|
isLoading,
|
|
7945
|
-
src:
|
|
7934
|
+
src: src3,
|
|
7946
7935
|
name,
|
|
7947
7936
|
iconBackground,
|
|
7948
7937
|
idx
|
|
@@ -11664,12 +11653,12 @@ function ProfileDetails({ onClose, onDisconnect }) {
|
|
|
11664
11653
|
[onSelectActivity, view]
|
|
11665
11654
|
);
|
|
11666
11655
|
return /* @__PURE__ */ React107.createElement(Box, {
|
|
11667
|
-
className: sidebarCompactMode,
|
|
11668
11656
|
display: "flex",
|
|
11669
11657
|
flexDirection: "column",
|
|
11670
11658
|
marginTop: "16",
|
|
11671
11659
|
paddingX: "20",
|
|
11672
|
-
width: "full"
|
|
11660
|
+
width: "full",
|
|
11661
|
+
minWidth: "full"
|
|
11673
11662
|
}, view === 0 /* HOME */ ? /* @__PURE__ */ React107.createElement(Home, {
|
|
11674
11663
|
onClose,
|
|
11675
11664
|
onChangeView: (newView) => setView(newView),
|
|
@@ -11842,11 +11831,11 @@ function ChainModal({ onClose, open }) {
|
|
|
11842
11831
|
}
|
|
11843
11832
|
|
|
11844
11833
|
// src/components/ConnectModal/ConnectModal.tsx
|
|
11845
|
-
import
|
|
11834
|
+
import React126 from "react";
|
|
11846
11835
|
import { useAccount as useAccount10, useDisconnect as useDisconnect2 } from "wagmi";
|
|
11847
11836
|
|
|
11848
11837
|
// src/components/FunConnectOptions/FunConnectOptions.tsx
|
|
11849
|
-
import
|
|
11838
|
+
import React123, { useCallback as useCallback28, useState as useState37 } from "react";
|
|
11850
11839
|
|
|
11851
11840
|
// src/components/FunConnectOptions/FunConnectErrorStep.tsx
|
|
11852
11841
|
import React111 from "react";
|
|
@@ -11896,7 +11885,7 @@ function isArc() {
|
|
|
11896
11885
|
}
|
|
11897
11886
|
function getBrowser() {
|
|
11898
11887
|
var _a, _b;
|
|
11899
|
-
if (typeof navigator === "undefined"
|
|
11888
|
+
if (typeof navigator === "undefined")
|
|
11900
11889
|
return "Browser" /* Browser */;
|
|
11901
11890
|
const ua2 = (_a = navigator.userAgent) == null ? void 0 : _a.toLowerCase();
|
|
11902
11891
|
if ((_b = navigator.brave) == null ? void 0 : _b.isBrave)
|
|
@@ -12931,10 +12920,10 @@ var FunWeb2ConnectingStep = (props) => {
|
|
|
12931
12920
|
};
|
|
12932
12921
|
|
|
12933
12922
|
// src/components/FunConnectOptions/FunWeb3ConnectingStep.tsx
|
|
12934
|
-
import
|
|
12923
|
+
import React122 from "react";
|
|
12935
12924
|
|
|
12936
|
-
// src/components/
|
|
12937
|
-
import
|
|
12925
|
+
// src/components/FunConnectOptions/ConnectDetails.tsx
|
|
12926
|
+
import React121, { useEffect as useEffect28 } from "react";
|
|
12938
12927
|
|
|
12939
12928
|
// src/hooks/useWindowSize.ts
|
|
12940
12929
|
import { useEffect as useEffect27, useState as useState36 } from "react";
|
|
@@ -12973,33 +12962,6 @@ var useWindowSize = () => {
|
|
|
12973
12962
|
return windowSize;
|
|
12974
12963
|
};
|
|
12975
12964
|
|
|
12976
|
-
// src/utils/colors.ts
|
|
12977
|
-
var convertHexToRGBA = (hexCode, opacity = 1) => {
|
|
12978
|
-
let hex = hexCode.replace("#", "");
|
|
12979
|
-
if (hex.length === 3) {
|
|
12980
|
-
hex = `${hex[0]}${hex[0]}${hex[1]}${hex[1]}${hex[2]}${hex[2]}`;
|
|
12981
|
-
}
|
|
12982
|
-
const r = parseInt(hex.substring(0, 2), 16);
|
|
12983
|
-
const g = parseInt(hex.substring(2, 4), 16);
|
|
12984
|
-
const b = parseInt(hex.substring(4, 6), 16);
|
|
12985
|
-
if (opacity > 1 && opacity <= 100) {
|
|
12986
|
-
opacity = opacity / 100;
|
|
12987
|
-
}
|
|
12988
|
-
return `rgba(${r},${g},${b},${opacity})`;
|
|
12989
|
-
};
|
|
12990
|
-
var getGradientRGBAs = (hexColor) => {
|
|
12991
|
-
if (!hexColor)
|
|
12992
|
-
return null;
|
|
12993
|
-
return [
|
|
12994
|
-
convertHexToRGBA(hexColor, 0.2),
|
|
12995
|
-
convertHexToRGBA(hexColor, 0.14),
|
|
12996
|
-
convertHexToRGBA(hexColor, 0.1)
|
|
12997
|
-
];
|
|
12998
|
-
};
|
|
12999
|
-
var isHexString = (color) => {
|
|
13000
|
-
return /^#([0-9a-f]{3}){1,2}$/i.test(color);
|
|
13001
|
-
};
|
|
13002
|
-
|
|
13003
12965
|
// src/utils/platforms.ts
|
|
13004
12966
|
import { UAParser } from "ua-parser-js";
|
|
13005
12967
|
var ua = UAParser();
|
|
@@ -13025,117 +12987,28 @@ function getPlatform() {
|
|
|
13025
12987
|
return "Desktop" /* Desktop */;
|
|
13026
12988
|
}
|
|
13027
12989
|
|
|
13028
|
-
// src/components/Button/ActionButton.tsx
|
|
13029
|
-
import React120 from "react";
|
|
13030
|
-
var sizeVariants = {
|
|
13031
|
-
large: {
|
|
13032
|
-
fontSize: "16",
|
|
13033
|
-
paddingX: "24",
|
|
13034
|
-
paddingY: "10"
|
|
13035
|
-
},
|
|
13036
|
-
medium: {
|
|
13037
|
-
fontSize: "14",
|
|
13038
|
-
height: "28",
|
|
13039
|
-
paddingX: "12",
|
|
13040
|
-
paddingY: "4"
|
|
13041
|
-
},
|
|
13042
|
-
small: {
|
|
13043
|
-
fontSize: "14",
|
|
13044
|
-
paddingX: "10",
|
|
13045
|
-
paddingY: "5"
|
|
13046
|
-
}
|
|
13047
|
-
};
|
|
13048
|
-
function ActionButton({
|
|
13049
|
-
disabled = false,
|
|
13050
|
-
href,
|
|
13051
|
-
label,
|
|
13052
|
-
onClick,
|
|
13053
|
-
rel = "noreferrer noopener",
|
|
13054
|
-
size = "medium",
|
|
13055
|
-
target = "_blank",
|
|
13056
|
-
testId,
|
|
13057
|
-
type = "primary"
|
|
13058
|
-
}) {
|
|
13059
|
-
const isPrimary = type === "primary";
|
|
13060
|
-
const isNotLarge = size !== "large";
|
|
13061
|
-
const mobile = isMobile();
|
|
13062
|
-
const background = !disabled ? isPrimary ? "accentColor" : isNotLarge ? "actionButtonSecondaryBackground" : null : "actionButtonSecondaryBackground";
|
|
13063
|
-
const { fontSize, height, paddingX, paddingY } = sizeVariants[size];
|
|
13064
|
-
const hasBorder = !mobile || !isNotLarge;
|
|
13065
|
-
return /* @__PURE__ */ React120.createElement(Box, {
|
|
13066
|
-
...href ? !disabled ? { as: "a", href, rel, target } : {} : { as: "button", type: "button" },
|
|
13067
|
-
onClick: !disabled ? onClick : void 0,
|
|
13068
|
-
...hasBorder ? {
|
|
13069
|
-
borderColor: mobile && !isNotLarge && !isPrimary ? "actionButtonBorderMobile" : "actionButtonBorder",
|
|
13070
|
-
borderStyle: "solid",
|
|
13071
|
-
borderWidth: "1"
|
|
13072
|
-
} : {},
|
|
13073
|
-
borderRadius: "actionButton",
|
|
13074
|
-
className: !disabled && touchableStyles({ active: "shrinkSm", hover: "grow" }),
|
|
13075
|
-
display: "block",
|
|
13076
|
-
paddingX,
|
|
13077
|
-
paddingY,
|
|
13078
|
-
style: { willChange: "transform" },
|
|
13079
|
-
testId,
|
|
13080
|
-
textAlign: "center",
|
|
13081
|
-
transition: "transform",
|
|
13082
|
-
...background ? { background } : {},
|
|
13083
|
-
...height ? { height } : {}
|
|
13084
|
-
}, /* @__PURE__ */ React120.createElement(Text, {
|
|
13085
|
-
color: !disabled ? isPrimary ? "accentColorForeground" : "accentColor" : "modalTextSecondary",
|
|
13086
|
-
size: fontSize,
|
|
13087
|
-
weight: "bold"
|
|
13088
|
-
}, label));
|
|
13089
|
-
}
|
|
13090
|
-
|
|
13091
|
-
// src/components/Icons/Connect.tsx
|
|
13092
|
-
import React121 from "react";
|
|
13093
|
-
var src = async () => (await import("./connect-XNDTNVUH.js")).default;
|
|
13094
|
-
var preloadConnectIcon = () => loadImages(src);
|
|
13095
|
-
var ConnectIcon = () => /* @__PURE__ */ React121.createElement(AsyncImage, {
|
|
13096
|
-
background: "#515a70",
|
|
13097
|
-
borderColor: "generalBorder",
|
|
13098
|
-
borderRadius: "10",
|
|
13099
|
-
height: "48",
|
|
13100
|
-
src,
|
|
13101
|
-
width: "48"
|
|
13102
|
-
});
|
|
13103
|
-
|
|
13104
|
-
// src/components/Icons/Create.tsx
|
|
13105
|
-
import React122 from "react";
|
|
13106
|
-
var src2 = async () => (await import("./create-PAJXJDV3.js")).default;
|
|
13107
|
-
var preloadCreateIcon = () => loadImages(src2);
|
|
13108
|
-
var CreateIcon = () => /* @__PURE__ */ React122.createElement(AsyncImage, {
|
|
13109
|
-
background: "#e3a5e8",
|
|
13110
|
-
borderColor: "generalBorder",
|
|
13111
|
-
borderRadius: "10",
|
|
13112
|
-
height: "48",
|
|
13113
|
-
src: src2,
|
|
13114
|
-
width: "48"
|
|
13115
|
-
});
|
|
13116
|
-
|
|
13117
12990
|
// src/components/Icons/LinkIcon.tsx
|
|
13118
|
-
import
|
|
12991
|
+
import React120 from "react";
|
|
13119
12992
|
var LinkIcon = () => {
|
|
13120
|
-
return /* @__PURE__ */
|
|
12993
|
+
return /* @__PURE__ */ React120.createElement("svg", {
|
|
13121
12994
|
width: "21",
|
|
13122
12995
|
height: "11",
|
|
13123
12996
|
viewBox: "0 0 21 11",
|
|
13124
12997
|
fill: "none",
|
|
13125
12998
|
xmlns: "http://www.w3.org/2000/svg"
|
|
13126
|
-
}, /* @__PURE__ */
|
|
12999
|
+
}, /* @__PURE__ */ React120.createElement("path", {
|
|
13127
13000
|
d: "M7.375 1.33325H5.29167C3.32748 1.33325 2.34539 1.33325 1.73519 1.94345C1.125 2.55365 1.125 3.53575 1.125 5.49992C1.125 7.46409 1.125 8.44617 1.7352 9.05638C2.34539 9.66658 3.32748 9.66658 5.29167 9.66658H7.375",
|
|
13128
13001
|
stroke: "currentColor",
|
|
13129
13002
|
strokeWidth: "2.08333",
|
|
13130
13003
|
strokeLinecap: "round",
|
|
13131
13004
|
strokeLinejoin: "round"
|
|
13132
|
-
}), /* @__PURE__ */
|
|
13005
|
+
}), /* @__PURE__ */ React120.createElement("path", {
|
|
13133
13006
|
d: "M13.625 9.66658H15.7083C17.6725 9.66658 18.6546 9.66658 19.2648 9.05638C19.875 8.44617 19.875 7.46409 19.875 5.49992C19.875 3.53575 19.875 2.55364 19.2648 1.94344C18.6546 1.33325 17.6725 1.33325 15.7083 1.33325H13.625",
|
|
13134
13007
|
stroke: "currentColor",
|
|
13135
13008
|
strokeWidth: "2.08333",
|
|
13136
13009
|
strokeLinecap: "round",
|
|
13137
13010
|
strokeLinejoin: "round"
|
|
13138
|
-
}), /* @__PURE__ */
|
|
13011
|
+
}), /* @__PURE__ */ React120.createElement("path", {
|
|
13139
13012
|
d: "M6.3335 5.5H14.6668",
|
|
13140
13013
|
stroke: "currentColor",
|
|
13141
13014
|
strokeWidth: "2.08333",
|
|
@@ -13144,1436 +13017,178 @@ var LinkIcon = () => {
|
|
|
13144
13017
|
}));
|
|
13145
13018
|
};
|
|
13146
13019
|
|
|
13147
|
-
// src/components/
|
|
13148
|
-
|
|
13149
|
-
|
|
13150
|
-
|
|
13151
|
-
|
|
13152
|
-
|
|
13153
|
-
|
|
13154
|
-
|
|
13155
|
-
|
|
13156
|
-
|
|
13157
|
-
|
|
13158
|
-
|
|
13159
|
-
|
|
13160
|
-
|
|
13161
|
-
|
|
13162
|
-
|
|
13163
|
-
|
|
13164
|
-
|
|
13165
|
-
|
|
13166
|
-
|
|
13167
|
-
|
|
13168
|
-
height: "48",
|
|
13169
|
-
src: src4,
|
|
13170
|
-
width: "48"
|
|
13171
|
-
});
|
|
13172
|
-
|
|
13173
|
-
// src/components/ConnectOptions/DesktopOptions.tsx
|
|
13174
|
-
import React134, { Fragment as Fragment4, useContext as useContext22, useEffect as useEffect28, useRef as useRef10, useState as useState37 } from "react";
|
|
13175
|
-
|
|
13176
|
-
// src/components/ConnectModal/ConnectModalIntro.tsx
|
|
13177
|
-
import React131, { useContext as useContext21 } from "react";
|
|
13178
|
-
|
|
13179
|
-
// src/components/Disclaimer/DisclaimerLink.tsx
|
|
13180
|
-
import React126 from "react";
|
|
13181
|
-
var DisclaimerLink = ({
|
|
13182
|
-
children,
|
|
13183
|
-
href
|
|
13184
|
-
}) => {
|
|
13185
|
-
return /* @__PURE__ */ React126.createElement(Box, {
|
|
13186
|
-
as: "a",
|
|
13187
|
-
color: "accentColor",
|
|
13188
|
-
href,
|
|
13189
|
-
rel: "noreferrer",
|
|
13190
|
-
target: "_blank"
|
|
13191
|
-
}, children);
|
|
13192
|
-
};
|
|
13193
|
-
|
|
13194
|
-
// src/components/Disclaimer/DisclaimerText.tsx
|
|
13195
|
-
import React127 from "react";
|
|
13196
|
-
var DisclaimerText = ({ children }) => {
|
|
13197
|
-
return /* @__PURE__ */ React127.createElement(Text, {
|
|
13198
|
-
color: "modalTextSecondary",
|
|
13199
|
-
size: "12",
|
|
13200
|
-
weight: "medium"
|
|
13201
|
-
}, children);
|
|
13020
|
+
// src/components/FunConnectOptions/ConnectDetails.tsx
|
|
13021
|
+
var getBrowserSrc = async () => {
|
|
13022
|
+
const browser = getBrowser();
|
|
13023
|
+
switch (browser) {
|
|
13024
|
+
case "Arc" /* Arc */:
|
|
13025
|
+
return (await import("./Arc-QDJFTGH2.js")).default;
|
|
13026
|
+
case "Brave" /* Brave */:
|
|
13027
|
+
return (await import("./Brave-YATE5BIM.js")).default;
|
|
13028
|
+
case "Chrome" /* Chrome */:
|
|
13029
|
+
return (await import("./Chrome-LGF33C3S.js")).default;
|
|
13030
|
+
case "Edge" /* Edge */:
|
|
13031
|
+
return (await import("./Edge-K2JEGI5S.js")).default;
|
|
13032
|
+
case "Firefox" /* Firefox */:
|
|
13033
|
+
return (await import("./Firefox-NP5SYEK5.js")).default;
|
|
13034
|
+
case "Opera" /* Opera */:
|
|
13035
|
+
return (await import("./Opera-KV54PXPA.js")).default;
|
|
13036
|
+
case "Safari" /* Safari */:
|
|
13037
|
+
return (await import("./Safari-2QIYKJ4P.js")).default;
|
|
13038
|
+
default:
|
|
13039
|
+
return (await import("./Browser-HN7O5MN7.js")).default;
|
|
13040
|
+
}
|
|
13202
13041
|
};
|
|
13203
|
-
|
|
13204
|
-
|
|
13205
|
-
|
|
13206
|
-
|
|
13207
|
-
|
|
13208
|
-
|
|
13209
|
-
|
|
13042
|
+
var preloadBrowserIcon = () => loadImages(getBrowserSrc);
|
|
13043
|
+
var getPlatformSrc = async () => {
|
|
13044
|
+
const platform = getPlatform();
|
|
13045
|
+
switch (platform) {
|
|
13046
|
+
case "Windows" /* Windows */:
|
|
13047
|
+
return (await import("./Windows-R3CKAIUV.js")).default;
|
|
13048
|
+
case "macOS" /* MacOS */:
|
|
13049
|
+
return (await import("./Macos-2KTZ2XLP.js")).default;
|
|
13050
|
+
case "Linux" /* Linux */:
|
|
13051
|
+
return (await import("./Linux-NS2LQPT4.js")).default;
|
|
13052
|
+
default:
|
|
13053
|
+
return (await import("./Linux-NS2LQPT4.js")).default;
|
|
13054
|
+
}
|
|
13210
13055
|
};
|
|
13211
|
-
var
|
|
13212
|
-
|
|
13213
|
-
|
|
13214
|
-
|
|
13215
|
-
|
|
13216
|
-
|
|
13217
|
-
|
|
13218
|
-
|
|
13219
|
-
|
|
13220
|
-
|
|
13221
|
-
|
|
13222
|
-
width: "48"
|
|
13223
|
-
});
|
|
13224
|
-
|
|
13225
|
-
// src/components/Icons/Login.tsx
|
|
13226
|
-
import React130 from "react";
|
|
13227
|
-
var src6 = async () => (await import("./login-ZSMM5UYL.js")).default;
|
|
13228
|
-
var preloadLoginIcon = () => loadImages(src6);
|
|
13229
|
-
var LoginIcon = () => /* @__PURE__ */ React130.createElement(AsyncImage, {
|
|
13230
|
-
background: "#d0d5de",
|
|
13231
|
-
borderRadius: "10",
|
|
13232
|
-
height: "48",
|
|
13233
|
-
src: src6,
|
|
13234
|
-
width: "48"
|
|
13235
|
-
});
|
|
13236
|
-
|
|
13237
|
-
// src/components/ConnectModal/ConnectModalIntro.tsx
|
|
13238
|
-
function ConnectModalIntro({
|
|
13239
|
-
compactModeEnabled = false,
|
|
13240
|
-
getWallet
|
|
13241
|
-
}) {
|
|
13242
|
-
const { disclaimer: Disclaimer, learnMoreUrl } = useContext21(AppContext);
|
|
13243
|
-
const { i18n: i18n2 } = useContext21(I18nContext);
|
|
13244
|
-
return /* @__PURE__ */ React131.createElement(React131.Fragment, null, /* @__PURE__ */ React131.createElement(Box, {
|
|
13056
|
+
var preloadPlatformIcon = () => loadImages(getPlatformSrc);
|
|
13057
|
+
function LinkItem() {
|
|
13058
|
+
return /* @__PURE__ */ React121.createElement(Box, {
|
|
13059
|
+
display: "flex",
|
|
13060
|
+
alignItems: "center",
|
|
13061
|
+
justifyContent: "center",
|
|
13062
|
+
width: "full"
|
|
13063
|
+
}, /* @__PURE__ */ React121.createElement(Box, {
|
|
13064
|
+
style: { flex: 1 }
|
|
13065
|
+
}, /* @__PURE__ */ React121.createElement(FunDivider, null)), /* @__PURE__ */ React121.createElement(Box, {
|
|
13066
|
+
display: "flex",
|
|
13245
13067
|
alignItems: "center",
|
|
13068
|
+
justifyContent: "center",
|
|
13246
13069
|
color: "accentColor",
|
|
13070
|
+
background: "modalBorder",
|
|
13071
|
+
padding: "8",
|
|
13072
|
+
borderRadius: "13"
|
|
13073
|
+
}, /* @__PURE__ */ React121.createElement(LinkIcon, null)), /* @__PURE__ */ React121.createElement(Box, {
|
|
13074
|
+
style: { flex: 1 }
|
|
13075
|
+
}, /* @__PURE__ */ React121.createElement(FunDivider, null)));
|
|
13076
|
+
}
|
|
13077
|
+
function ConnectDetail({
|
|
13078
|
+
compactModeEnabled,
|
|
13079
|
+
qrCodeUri,
|
|
13080
|
+
wallet
|
|
13081
|
+
}) {
|
|
13082
|
+
const {
|
|
13083
|
+
downloadUrls,
|
|
13084
|
+
iconBackground,
|
|
13085
|
+
iconUrl,
|
|
13086
|
+
name,
|
|
13087
|
+
qrCode,
|
|
13088
|
+
ready,
|
|
13089
|
+
getDesktopUri
|
|
13090
|
+
} = wallet;
|
|
13091
|
+
const safari = isSafari();
|
|
13092
|
+
const funkitConfig = useFunkitConfig();
|
|
13093
|
+
const appConfig = {
|
|
13094
|
+
name: funkitConfig.appName,
|
|
13095
|
+
logoSrc: funkitConfig.appLogoSrc,
|
|
13096
|
+
logoBackground: funkitConfig.appLogoBackgroundColor
|
|
13097
|
+
};
|
|
13098
|
+
const hasExtension = !!wallet.extensionDownloadUrl;
|
|
13099
|
+
const hasQrCode = qrCode && qrCodeUri;
|
|
13100
|
+
const { width: windowWidth } = useWindowSize();
|
|
13101
|
+
const smallWindow = windowWidth && windowWidth < 768;
|
|
13102
|
+
useEffect28(() => {
|
|
13103
|
+
preloadBrowserIcon();
|
|
13104
|
+
preloadPlatformIcon();
|
|
13105
|
+
}, []);
|
|
13106
|
+
return /* @__PURE__ */ React121.createElement(Box, {
|
|
13247
13107
|
display: "flex",
|
|
13248
13108
|
flexDirection: "column",
|
|
13249
13109
|
height: "full",
|
|
13250
|
-
|
|
13251
|
-
}, /* @__PURE__ */
|
|
13252
|
-
marginBottom: "10"
|
|
13253
|
-
}, !compactModeEnabled && /* @__PURE__ */ React131.createElement(Text, {
|
|
13254
|
-
color: "modalText",
|
|
13255
|
-
size: "18",
|
|
13256
|
-
weight: "heavy"
|
|
13257
|
-
}, i18n2.t("intro.title"))), /* @__PURE__ */ React131.createElement(Box, {
|
|
13258
|
-
display: "flex",
|
|
13259
|
-
flexDirection: "column",
|
|
13260
|
-
gap: "32",
|
|
13261
|
-
justifyContent: "center",
|
|
13262
|
-
marginY: "20",
|
|
13263
|
-
style: { maxWidth: 312 }
|
|
13264
|
-
}, /* @__PURE__ */ React131.createElement(Box, {
|
|
13110
|
+
width: "full"
|
|
13111
|
+
}, hasQrCode ? /* @__PURE__ */ React121.createElement(Box, {
|
|
13265
13112
|
alignItems: "center",
|
|
13266
13113
|
display: "flex",
|
|
13267
|
-
|
|
13268
|
-
|
|
13269
|
-
|
|
13270
|
-
|
|
13271
|
-
|
|
13272
|
-
|
|
13273
|
-
|
|
13274
|
-
|
|
13114
|
+
height: "full",
|
|
13115
|
+
justifyContent: "center",
|
|
13116
|
+
flexDirection: "column"
|
|
13117
|
+
}, /* @__PURE__ */ React121.createElement(QRCode, {
|
|
13118
|
+
logoBackground: iconBackground,
|
|
13119
|
+
logoSize: compactModeEnabled ? 60 : 72,
|
|
13120
|
+
logoUrl: iconUrl,
|
|
13121
|
+
size: compactModeEnabled ? 318 : smallWindow ? Math.max(280, Math.min(windowWidth - 308, 382)) : 382,
|
|
13122
|
+
uri: qrCodeUri
|
|
13123
|
+
}), /* @__PURE__ */ React121.createElement(Box, {
|
|
13275
13124
|
display: "flex",
|
|
13276
|
-
|
|
13277
|
-
|
|
13278
|
-
|
|
13125
|
+
alignItems: "center",
|
|
13126
|
+
justifyContent: "center",
|
|
13127
|
+
paddingTop: "20"
|
|
13128
|
+
}, /* @__PURE__ */ React121.createElement(Text, {
|
|
13129
|
+
weight: "medium",
|
|
13279
13130
|
color: "modalText",
|
|
13280
13131
|
size: "14",
|
|
13281
|
-
|
|
13282
|
-
},
|
|
13283
|
-
|
|
13284
|
-
|
|
13285
|
-
|
|
13286
|
-
}, i18n2.t("intro.digital_asset.description")))), /* @__PURE__ */ React131.createElement(Box, {
|
|
13132
|
+
style: { paddingRight: 8 }
|
|
13133
|
+
}, "Copy Link"), /* @__PURE__ */ React121.createElement(CopyAddress, {
|
|
13134
|
+
address: qrCodeUri,
|
|
13135
|
+
type: "button"
|
|
13136
|
+
}))) : /* @__PURE__ */ React121.createElement(Box, {
|
|
13287
13137
|
alignItems: "center",
|
|
13288
13138
|
display: "flex",
|
|
13289
|
-
|
|
13290
|
-
|
|
13291
|
-
}, /* @__PURE__ */
|
|
13292
|
-
|
|
13293
|
-
height: "48",
|
|
13294
|
-
minWidth: "48",
|
|
13295
|
-
width: "48"
|
|
13296
|
-
}, /* @__PURE__ */ React131.createElement(LoginIcon, null)), /* @__PURE__ */ React131.createElement(Box, {
|
|
13139
|
+
justifyContent: "center",
|
|
13140
|
+
style: { flexGrow: 1 }
|
|
13141
|
+
}, /* @__PURE__ */ React121.createElement(Box, {
|
|
13142
|
+
alignItems: "center",
|
|
13297
13143
|
display: "flex",
|
|
13298
13144
|
flexDirection: "column",
|
|
13299
|
-
gap: "
|
|
13300
|
-
}, /* @__PURE__ */
|
|
13301
|
-
color: "modalText",
|
|
13302
|
-
size: "14",
|
|
13303
|
-
weight: "bold"
|
|
13304
|
-
}, i18n2.t("intro.login.title")), /* @__PURE__ */ React131.createElement(Text, {
|
|
13305
|
-
color: "modalTextSecondary",
|
|
13306
|
-
size: "14",
|
|
13307
|
-
weight: "medium"
|
|
13308
|
-
}, i18n2.t("intro.login.description"))))), /* @__PURE__ */ React131.createElement(Box, {
|
|
13309
|
-
alignItems: "center",
|
|
13310
|
-
display: "flex",
|
|
13311
|
-
flexDirection: "column",
|
|
13312
|
-
gap: "12",
|
|
13313
|
-
justifyContent: "center",
|
|
13314
|
-
margin: "10"
|
|
13315
|
-
}, /* @__PURE__ */ React131.createElement(ActionButton, {
|
|
13316
|
-
label: i18n2.t("intro.get.label"),
|
|
13317
|
-
onClick: getWallet
|
|
13318
|
-
}), /* @__PURE__ */ React131.createElement(Box, {
|
|
13319
|
-
as: "a",
|
|
13320
|
-
className: touchableStyles({ active: "shrink", hover: "grow" }),
|
|
13321
|
-
display: "block",
|
|
13322
|
-
href: learnMoreUrl,
|
|
13323
|
-
paddingX: "12",
|
|
13324
|
-
paddingY: "4",
|
|
13325
|
-
rel: "noreferrer",
|
|
13326
|
-
style: { willChange: "transform" },
|
|
13327
|
-
target: "_blank",
|
|
13328
|
-
transition: "default"
|
|
13329
|
-
}, /* @__PURE__ */ React131.createElement(Text, {
|
|
13330
|
-
color: "accentColor",
|
|
13331
|
-
size: "14",
|
|
13332
|
-
weight: "bold"
|
|
13333
|
-
}, i18n2.t("intro.learn_more.label")))), Disclaimer && !compactModeEnabled && /* @__PURE__ */ React131.createElement(Box, {
|
|
13334
|
-
marginBottom: "8",
|
|
13335
|
-
marginTop: "12",
|
|
13336
|
-
textAlign: "center"
|
|
13337
|
-
}, /* @__PURE__ */ React131.createElement(Disclaimer, {
|
|
13338
|
-
Link: DisclaimerLink,
|
|
13339
|
-
Text: DisclaimerText
|
|
13340
|
-
}))));
|
|
13341
|
-
}
|
|
13342
|
-
|
|
13343
|
-
// src/components/Icons/Back.tsx
|
|
13344
|
-
import React132 from "react";
|
|
13345
|
-
var BackIcon = () => /* @__PURE__ */ React132.createElement("svg", {
|
|
13346
|
-
fill: "none",
|
|
13347
|
-
height: "17",
|
|
13348
|
-
viewBox: "0 0 11 17",
|
|
13349
|
-
width: "11",
|
|
13350
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
13351
|
-
}, /* @__PURE__ */ React132.createElement("path", {
|
|
13352
|
-
d: "M0.99707 8.6543C0.99707 9.08496 1.15527 9.44531 1.51562 9.79688L8.16016 16.3096C8.43262 16.5732 8.74902 16.7051 9.13574 16.7051C9.90918 16.7051 10.5508 16.0811 10.5508 15.3076C10.5508 14.9121 10.3838 14.5605 10.0938 14.2705L4.30176 8.64551L10.0938 3.0293C10.3838 2.74805 10.5508 2.3877 10.5508 2.00098C10.5508 1.23633 9.90918 0.603516 9.13574 0.603516C8.74902 0.603516 8.43262 0.735352 8.16016 0.999023L1.51562 7.51172C1.15527 7.85449 1.00586 8.21484 0.99707 8.6543Z",
|
|
13353
|
-
fill: "currentColor"
|
|
13354
|
-
}));
|
|
13355
|
-
|
|
13356
|
-
// src/components/InfoButton/InfoButton.tsx
|
|
13357
|
-
import React133 from "react";
|
|
13358
|
-
var InfoButton = ({
|
|
13359
|
-
"aria-label": ariaLabel = "Info",
|
|
13360
|
-
onClick
|
|
13361
|
-
}) => {
|
|
13362
|
-
const mobile = isMobile();
|
|
13363
|
-
return /* @__PURE__ */ React133.createElement(Box, {
|
|
13364
|
-
alignItems: "center",
|
|
13365
|
-
"aria-label": ariaLabel,
|
|
13366
|
-
as: "button",
|
|
13367
|
-
background: "closeButtonBackground",
|
|
13368
|
-
borderColor: "actionButtonBorder",
|
|
13369
|
-
borderRadius: "full",
|
|
13370
|
-
borderStyle: "solid",
|
|
13371
|
-
borderWidth: mobile ? "0" : "1",
|
|
13372
|
-
className: touchableStyles({ active: "shrinkSm", hover: "growLg" }),
|
|
13373
|
-
color: "closeButton",
|
|
13374
|
-
display: "flex",
|
|
13375
|
-
height: mobile ? "30" : "28",
|
|
13376
|
-
justifyContent: "center",
|
|
13377
|
-
onClick,
|
|
13378
|
-
style: { willChange: "transform" },
|
|
13379
|
-
transition: "default",
|
|
13380
|
-
type: "button",
|
|
13381
|
-
width: mobile ? "30" : "28"
|
|
13382
|
-
}, /* @__PURE__ */ React133.createElement(InfoIcon, null));
|
|
13383
|
-
};
|
|
13384
|
-
|
|
13385
|
-
// src/components/ConnectOptions/DesktopOptions.tsx
|
|
13386
|
-
function DesktopOptions({ onClose }) {
|
|
13387
|
-
const titleId = "rk_connect_title";
|
|
13388
|
-
const [selectedOptionId, setSelectedOptionId] = useState37();
|
|
13389
|
-
const [selectedWallet, setSelectedWallet] = useState37();
|
|
13390
|
-
const [qrCodeUri, setQrCodeUri] = useState37();
|
|
13391
|
-
const hasQrCode = !!(selectedWallet == null ? void 0 : selectedWallet.qrCode) && qrCodeUri;
|
|
13392
|
-
const [connectionError, setConnectionError] = useState37(false);
|
|
13393
|
-
const modalSize = useContext22(ModalSizeContext);
|
|
13394
|
-
const compactModeEnabled = modalSize === ModalSizeOptions.COMPACT;
|
|
13395
|
-
const { disclaimer: Disclaimer } = useContext22(AppContext);
|
|
13396
|
-
const { i18n: i18n2 } = useContext22(I18nContext);
|
|
13397
|
-
const safari = isSafari();
|
|
13398
|
-
const initialized = useRef10(false);
|
|
13399
|
-
const { connector } = useContext22(WalletButtonContext);
|
|
13400
|
-
const mergeEIP6963WithRkConnectors = !connector;
|
|
13401
|
-
const wallets = useWalletConnectors(mergeEIP6963WithRkConnectors).filter((wallet) => wallet.ready || !!wallet.extensionDownloadUrl).sort((a, b) => a.groupIndex - b.groupIndex);
|
|
13402
|
-
const groupedWallets = groupBy(wallets, (wallet) => wallet.groupName);
|
|
13403
|
-
const supportedI18nGroupNames = [
|
|
13404
|
-
"Recommended",
|
|
13405
|
-
"Other",
|
|
13406
|
-
"Popular",
|
|
13407
|
-
"More",
|
|
13408
|
-
"Others",
|
|
13409
|
-
"Installed"
|
|
13410
|
-
];
|
|
13411
|
-
useEffect28(() => {
|
|
13412
|
-
if (connector && !initialized.current) {
|
|
13413
|
-
changeWalletStep("CONNECT" /* Connect */);
|
|
13414
|
-
selectWallet(connector);
|
|
13415
|
-
initialized.current = true;
|
|
13416
|
-
}
|
|
13417
|
-
}, [connector]);
|
|
13418
|
-
const connectToWallet = (wallet) => {
|
|
13419
|
-
var _a, _b;
|
|
13420
|
-
setConnectionError(false);
|
|
13421
|
-
if (wallet.ready) {
|
|
13422
|
-
(_b = (_a = wallet == null ? void 0 : wallet.connect) == null ? void 0 : _a.call(wallet)) == null ? void 0 : _b.catch(() => {
|
|
13423
|
-
setConnectionError(true);
|
|
13424
|
-
});
|
|
13425
|
-
}
|
|
13426
|
-
};
|
|
13427
|
-
const onDesktopUri = async (wallet) => {
|
|
13428
|
-
const sWallet = wallets.find((w) => wallet.id === w.id);
|
|
13429
|
-
if (!(sWallet == null ? void 0 : sWallet.getDesktopUri))
|
|
13430
|
-
return;
|
|
13431
|
-
setTimeout(async () => {
|
|
13432
|
-
var _a;
|
|
13433
|
-
const uri = await ((_a = sWallet == null ? void 0 : sWallet.getDesktopUri) == null ? void 0 : _a.call(sWallet));
|
|
13434
|
-
if (uri)
|
|
13435
|
-
window.open(uri, safari ? "_blank" : "_self");
|
|
13436
|
-
}, 0);
|
|
13437
|
-
};
|
|
13438
|
-
const onQrCode = async (wallet) => {
|
|
13439
|
-
var _a;
|
|
13440
|
-
const sWallet = wallets.find((w) => wallet.id === w.id);
|
|
13441
|
-
const uri = await ((_a = sWallet == null ? void 0 : sWallet.getQrCodeUri) == null ? void 0 : _a.call(sWallet));
|
|
13442
|
-
setQrCodeUri(uri);
|
|
13443
|
-
setTimeout(
|
|
13444
|
-
() => {
|
|
13445
|
-
setSelectedWallet(sWallet);
|
|
13446
|
-
changeWalletStep("CONNECT" /* Connect */);
|
|
13447
|
-
},
|
|
13448
|
-
uri ? 0 : 50
|
|
13449
|
-
);
|
|
13450
|
-
};
|
|
13451
|
-
const selectWallet = async (wallet) => {
|
|
13452
|
-
addLatestWalletId(wallet.id);
|
|
13453
|
-
if (wallet.ready) {
|
|
13454
|
-
onQrCode(wallet);
|
|
13455
|
-
onDesktopUri(wallet);
|
|
13456
|
-
}
|
|
13457
|
-
connectToWallet(wallet);
|
|
13458
|
-
setSelectedOptionId(wallet.id);
|
|
13459
|
-
if (!wallet.ready) {
|
|
13460
|
-
setSelectedWallet(wallet);
|
|
13461
|
-
changeWalletStep(
|
|
13462
|
-
(wallet == null ? void 0 : wallet.extensionDownloadUrl) ? "DOWNLOAD_OPTIONS" /* DownloadOptions */ : "CONNECT" /* Connect */
|
|
13463
|
-
);
|
|
13464
|
-
}
|
|
13465
|
-
};
|
|
13466
|
-
const getWalletDownload = (id) => {
|
|
13467
|
-
var _a;
|
|
13468
|
-
setSelectedOptionId(id);
|
|
13469
|
-
const sWallet = wallets.find((w) => id === w.id);
|
|
13470
|
-
const isMobile2 = (_a = sWallet == null ? void 0 : sWallet.downloadUrls) == null ? void 0 : _a.qrCode;
|
|
13471
|
-
const isDesktop = !!(sWallet == null ? void 0 : sWallet.desktopDownloadUrl);
|
|
13472
|
-
const isExtension = !!(sWallet == null ? void 0 : sWallet.extensionDownloadUrl);
|
|
13473
|
-
setSelectedWallet(sWallet);
|
|
13474
|
-
if (isMobile2 && (isExtension || isDesktop)) {
|
|
13475
|
-
changeWalletStep("DOWNLOAD_OPTIONS" /* DownloadOptions */);
|
|
13476
|
-
} else if (isMobile2) {
|
|
13477
|
-
changeWalletStep("DOWNLOAD" /* Download */);
|
|
13478
|
-
} else if (isDesktop) {
|
|
13479
|
-
changeWalletStep("INSTRUCTIONS_DESKTOP" /* InstructionsDesktop */);
|
|
13480
|
-
} else {
|
|
13481
|
-
changeWalletStep("INSTRUCTIONS_EXTENSION" /* InstructionsExtension */);
|
|
13482
|
-
}
|
|
13483
|
-
};
|
|
13484
|
-
const clearSelectedWallet = () => {
|
|
13485
|
-
setSelectedOptionId(void 0);
|
|
13486
|
-
setSelectedWallet(void 0);
|
|
13487
|
-
setQrCodeUri(void 0);
|
|
13488
|
-
};
|
|
13489
|
-
const changeWalletStep = (newWalletStep, isBack = false) => {
|
|
13490
|
-
if (isBack && newWalletStep === "GET" /* Get */ && initialWalletStep === "GET" /* Get */) {
|
|
13491
|
-
clearSelectedWallet();
|
|
13492
|
-
} else if (!isBack && newWalletStep === "GET" /* Get */) {
|
|
13493
|
-
setInitialWalletStep("GET" /* Get */);
|
|
13494
|
-
} else if (!isBack && newWalletStep === "CONNECT" /* Connect */) {
|
|
13495
|
-
setInitialWalletStep("CONNECT" /* Connect */);
|
|
13496
|
-
}
|
|
13497
|
-
setWalletStep(newWalletStep);
|
|
13498
|
-
};
|
|
13499
|
-
const [initialWalletStep, setInitialWalletStep] = useState37(
|
|
13500
|
-
"NONE" /* None */
|
|
13501
|
-
);
|
|
13502
|
-
const [walletStep, setWalletStep] = useState37("NONE" /* None */);
|
|
13503
|
-
let walletContent = null;
|
|
13504
|
-
let headerLabel = null;
|
|
13505
|
-
let headerBackButtonLink = null;
|
|
13506
|
-
let headerBackButtonCallback;
|
|
13507
|
-
useEffect28(() => {
|
|
13508
|
-
setConnectionError(false);
|
|
13509
|
-
}, [walletStep, selectedWallet]);
|
|
13510
|
-
const hasExtension = !!(selectedWallet == null ? void 0 : selectedWallet.extensionDownloadUrl);
|
|
13511
|
-
const hasExtensionAndMobile = !!(hasExtension && (selectedWallet == null ? void 0 : selectedWallet.mobileDownloadUrl));
|
|
13512
|
-
switch (walletStep) {
|
|
13513
|
-
case "NONE" /* None */:
|
|
13514
|
-
walletContent = /* @__PURE__ */ React134.createElement(ConnectModalIntro, {
|
|
13515
|
-
getWallet: () => changeWalletStep("GET" /* Get */)
|
|
13516
|
-
});
|
|
13517
|
-
break;
|
|
13518
|
-
case "LEARN_COMPACT" /* LearnCompact */:
|
|
13519
|
-
walletContent = /* @__PURE__ */ React134.createElement(ConnectModalIntro, {
|
|
13520
|
-
compactModeEnabled,
|
|
13521
|
-
getWallet: () => changeWalletStep("GET" /* Get */)
|
|
13522
|
-
});
|
|
13523
|
-
headerLabel = i18n2.t("intro.title");
|
|
13524
|
-
headerBackButtonLink = "NONE" /* None */;
|
|
13525
|
-
break;
|
|
13526
|
-
case "GET" /* Get */:
|
|
13527
|
-
walletContent = /* @__PURE__ */ React134.createElement(GetDetail, {
|
|
13528
|
-
getWalletDownload,
|
|
13529
|
-
compactModeEnabled
|
|
13530
|
-
});
|
|
13531
|
-
headerLabel = i18n2.t("get.title");
|
|
13532
|
-
headerBackButtonLink = compactModeEnabled ? "LEARN_COMPACT" /* LearnCompact */ : "NONE" /* None */;
|
|
13533
|
-
break;
|
|
13534
|
-
case "CONNECT" /* Connect */:
|
|
13535
|
-
walletContent = selectedWallet && /* @__PURE__ */ React134.createElement(ConnectDetail, {
|
|
13536
|
-
changeWalletStep,
|
|
13537
|
-
compactModeEnabled,
|
|
13538
|
-
connectionError,
|
|
13539
|
-
onClose,
|
|
13540
|
-
qrCodeUri,
|
|
13541
|
-
reconnect: connectToWallet,
|
|
13542
|
-
wallet: selectedWallet
|
|
13543
|
-
});
|
|
13544
|
-
headerLabel = hasQrCode && (selectedWallet.name === "WalletConnect" ? i18n2.t("connect_scan.fallback_title") : i18n2.t("connect_scan.title", {
|
|
13545
|
-
wallet: selectedWallet.name
|
|
13546
|
-
}));
|
|
13547
|
-
headerBackButtonLink = compactModeEnabled ? connector ? null : "NONE" /* None */ : null;
|
|
13548
|
-
headerBackButtonCallback = compactModeEnabled ? !connector ? clearSelectedWallet : () => void 0 : () => void 0;
|
|
13549
|
-
break;
|
|
13550
|
-
case "DOWNLOAD_OPTIONS" /* DownloadOptions */:
|
|
13551
|
-
walletContent = selectedWallet && /* @__PURE__ */ React134.createElement(DownloadOptionsDetail, {
|
|
13552
|
-
changeWalletStep,
|
|
13553
|
-
wallet: selectedWallet
|
|
13554
|
-
});
|
|
13555
|
-
headerLabel = selectedWallet && i18n2.t("get_options.short_title", { wallet: selectedWallet.name });
|
|
13556
|
-
headerBackButtonLink = connector ? "CONNECT" /* Connect */ : compactModeEnabled ? "NONE" /* None */ : null;
|
|
13557
|
-
break;
|
|
13558
|
-
case "DOWNLOAD" /* Download */:
|
|
13559
|
-
walletContent = selectedWallet && /* @__PURE__ */ React134.createElement(DownloadDetail, {
|
|
13560
|
-
changeWalletStep,
|
|
13561
|
-
wallet: selectedWallet
|
|
13562
|
-
});
|
|
13563
|
-
headerLabel = selectedWallet && i18n2.t("get_mobile.title", { wallet: selectedWallet.name });
|
|
13564
|
-
headerBackButtonLink = hasExtensionAndMobile ? "DOWNLOAD_OPTIONS" /* DownloadOptions */ : initialWalletStep;
|
|
13565
|
-
break;
|
|
13566
|
-
case "INSTRUCTIONS_MOBILE" /* InstructionsMobile */:
|
|
13567
|
-
walletContent = selectedWallet && /* @__PURE__ */ React134.createElement(InstructionMobileDetail, {
|
|
13568
|
-
connectWallet: selectWallet,
|
|
13569
|
-
wallet: selectedWallet
|
|
13570
|
-
});
|
|
13571
|
-
headerLabel = selectedWallet && i18n2.t("get_options.title", {
|
|
13572
|
-
wallet: compactModeEnabled ? selectedWallet.shortName || selectedWallet.name : selectedWallet.name
|
|
13573
|
-
});
|
|
13574
|
-
headerBackButtonLink = "DOWNLOAD" /* Download */;
|
|
13575
|
-
break;
|
|
13576
|
-
case "INSTRUCTIONS_EXTENSION" /* InstructionsExtension */:
|
|
13577
|
-
walletContent = selectedWallet && /* @__PURE__ */ React134.createElement(InstructionExtensionDetail, {
|
|
13578
|
-
wallet: selectedWallet
|
|
13579
|
-
});
|
|
13580
|
-
headerLabel = selectedWallet && i18n2.t("get_options.title", {
|
|
13581
|
-
wallet: compactModeEnabled ? selectedWallet.shortName || selectedWallet.name : selectedWallet.name
|
|
13582
|
-
});
|
|
13583
|
-
headerBackButtonLink = "DOWNLOAD_OPTIONS" /* DownloadOptions */;
|
|
13584
|
-
break;
|
|
13585
|
-
case "INSTRUCTIONS_DESKTOP" /* InstructionsDesktop */:
|
|
13586
|
-
walletContent = selectedWallet && /* @__PURE__ */ React134.createElement(InstructionDesktopDetail, {
|
|
13587
|
-
connectWallet: selectWallet,
|
|
13588
|
-
wallet: selectedWallet
|
|
13589
|
-
});
|
|
13590
|
-
headerLabel = selectedWallet && i18n2.t("get_options.title", {
|
|
13591
|
-
wallet: compactModeEnabled ? selectedWallet.shortName || selectedWallet.name : selectedWallet.name
|
|
13592
|
-
});
|
|
13593
|
-
headerBackButtonLink = "DOWNLOAD_OPTIONS" /* DownloadOptions */;
|
|
13594
|
-
break;
|
|
13595
|
-
default:
|
|
13596
|
-
break;
|
|
13597
|
-
}
|
|
13598
|
-
return /* @__PURE__ */ React134.createElement(Box, {
|
|
13599
|
-
display: "flex",
|
|
13600
|
-
flexDirection: "row",
|
|
13601
|
-
style: { maxHeight: compactModeEnabled ? 468 : 504 }
|
|
13602
|
-
}, (compactModeEnabled ? walletStep === "NONE" /* None */ : true) && /* @__PURE__ */ React134.createElement(Box, {
|
|
13603
|
-
className: compactModeEnabled ? sidebarCompactMode : sidebar,
|
|
13604
|
-
display: "flex",
|
|
13605
|
-
flexDirection: "column",
|
|
13606
|
-
marginTop: "16"
|
|
13607
|
-
}, /* @__PURE__ */ React134.createElement(Box, {
|
|
13608
|
-
display: "flex",
|
|
13609
|
-
justifyContent: "space-between"
|
|
13610
|
-
}, compactModeEnabled && Disclaimer && /* @__PURE__ */ React134.createElement(Box, {
|
|
13611
|
-
marginLeft: "16",
|
|
13612
|
-
width: "28"
|
|
13613
|
-
}, /* @__PURE__ */ React134.createElement(InfoButton, {
|
|
13614
|
-
onClick: () => changeWalletStep("LEARN_COMPACT" /* LearnCompact */)
|
|
13615
|
-
})), compactModeEnabled && !Disclaimer && /* @__PURE__ */ React134.createElement(Box, {
|
|
13616
|
-
marginLeft: "16",
|
|
13617
|
-
width: "28"
|
|
13618
|
-
}), /* @__PURE__ */ React134.createElement(Box, {
|
|
13619
|
-
marginLeft: compactModeEnabled ? "0" : "6",
|
|
13620
|
-
paddingBottom: "8",
|
|
13621
|
-
paddingTop: "2",
|
|
13622
|
-
paddingX: "18"
|
|
13623
|
-
}, /* @__PURE__ */ React134.createElement(Text, {
|
|
13624
|
-
as: "h1",
|
|
13625
|
-
color: "modalText",
|
|
13626
|
-
id: titleId,
|
|
13627
|
-
size: "18",
|
|
13628
|
-
weight: "heavy",
|
|
13629
|
-
testId: "connect-header-label"
|
|
13630
|
-
}, i18n2.t("connect.title"))), compactModeEnabled && /* @__PURE__ */ React134.createElement(Box, {
|
|
13631
|
-
marginRight: "16"
|
|
13632
|
-
}, /* @__PURE__ */ React134.createElement(CloseButton, {
|
|
13633
|
-
onClose
|
|
13634
|
-
}))), /* @__PURE__ */ React134.createElement(Box, {
|
|
13635
|
-
className: ScrollClassName,
|
|
13636
|
-
paddingBottom: "18"
|
|
13637
|
-
}, Object.entries(groupedWallets).map(
|
|
13638
|
-
([groupName, wallets2], index) => wallets2.length > 0 && /* @__PURE__ */ React134.createElement(Fragment4, {
|
|
13639
|
-
key: index
|
|
13640
|
-
}, groupName ? /* @__PURE__ */ React134.createElement(Box, {
|
|
13641
|
-
marginBottom: "8",
|
|
13642
|
-
marginTop: "16",
|
|
13643
|
-
marginX: "6"
|
|
13644
|
-
}, /* @__PURE__ */ React134.createElement(Text, {
|
|
13645
|
-
color: groupName === "Installed" ? "accentColor" : "modalTextSecondary",
|
|
13646
|
-
size: "14",
|
|
13647
|
-
weight: "bold"
|
|
13648
|
-
}, supportedI18nGroupNames.includes(groupName) ? i18n2.t(
|
|
13649
|
-
`connector_group.${groupName.toLowerCase()}`
|
|
13650
|
-
) : groupName)) : null, /* @__PURE__ */ React134.createElement(Box, {
|
|
13651
|
-
display: "flex",
|
|
13652
|
-
flexDirection: "column",
|
|
13653
|
-
gap: "4"
|
|
13654
|
-
}, wallets2.map((wallet) => {
|
|
13655
|
-
return /* @__PURE__ */ React134.createElement(ModalSelection, {
|
|
13656
|
-
currentlySelected: wallet.id === selectedOptionId,
|
|
13657
|
-
iconBackground: wallet.iconBackground,
|
|
13658
|
-
iconUrl: wallet.iconUrl,
|
|
13659
|
-
key: wallet.id,
|
|
13660
|
-
name: wallet.name,
|
|
13661
|
-
onClick: () => selectWallet(wallet),
|
|
13662
|
-
ready: wallet.ready,
|
|
13663
|
-
recent: wallet.recent,
|
|
13664
|
-
testId: `wallet-option-${wallet.id}`,
|
|
13665
|
-
isFunkitSdkConnector: wallet.isFunkitSdkConnector
|
|
13666
|
-
});
|
|
13667
|
-
})))
|
|
13668
|
-
)), compactModeEnabled && /* @__PURE__ */ React134.createElement(React134.Fragment, null, /* @__PURE__ */ React134.createElement(Box, {
|
|
13669
|
-
background: "generalBorder",
|
|
13670
|
-
height: "1",
|
|
13671
|
-
marginTop: "-1"
|
|
13672
|
-
}), Disclaimer ? /* @__PURE__ */ React134.createElement(Box, {
|
|
13673
|
-
paddingX: "24",
|
|
13674
|
-
paddingY: "16",
|
|
13675
|
-
textAlign: "center"
|
|
13676
|
-
}, /* @__PURE__ */ React134.createElement(Disclaimer, {
|
|
13677
|
-
Link: DisclaimerLink,
|
|
13678
|
-
Text: DisclaimerText
|
|
13679
|
-
})) : /* @__PURE__ */ React134.createElement(Box, {
|
|
13680
|
-
alignItems: "center",
|
|
13681
|
-
display: "flex",
|
|
13682
|
-
justifyContent: "space-between",
|
|
13683
|
-
paddingX: "24",
|
|
13684
|
-
paddingY: "16"
|
|
13685
|
-
}, /* @__PURE__ */ React134.createElement(Box, {
|
|
13686
|
-
paddingY: "4"
|
|
13687
|
-
}, /* @__PURE__ */ React134.createElement(Text, {
|
|
13688
|
-
color: "modalTextSecondary",
|
|
13689
|
-
size: "14",
|
|
13690
|
-
weight: "medium"
|
|
13691
|
-
}, i18n2.t("connect.new_to_ethereum.description"))), /* @__PURE__ */ React134.createElement(Box, {
|
|
13692
|
-
alignItems: "center",
|
|
13693
|
-
display: "flex",
|
|
13694
|
-
flexDirection: "row",
|
|
13695
|
-
gap: "4",
|
|
13696
|
-
justifyContent: "center"
|
|
13697
|
-
}, /* @__PURE__ */ React134.createElement(Box, {
|
|
13698
|
-
className: touchableStyles({
|
|
13699
|
-
active: "shrink",
|
|
13700
|
-
hover: "grow"
|
|
13701
|
-
}),
|
|
13702
|
-
cursor: "pointer",
|
|
13703
|
-
onClick: () => changeWalletStep("LEARN_COMPACT" /* LearnCompact */),
|
|
13704
|
-
paddingY: "4",
|
|
13705
|
-
style: { willChange: "transform" },
|
|
13706
|
-
transition: "default"
|
|
13707
|
-
}, /* @__PURE__ */ React134.createElement(Text, {
|
|
13708
|
-
color: "accentColor",
|
|
13709
|
-
size: "14",
|
|
13710
|
-
weight: "bold"
|
|
13711
|
-
}, i18n2.t("connect.new_to_ethereum.learn_more.label"))))))), (compactModeEnabled ? walletStep !== "NONE" /* None */ : true) && /* @__PURE__ */ React134.createElement(React134.Fragment, null, !compactModeEnabled && /* @__PURE__ */ React134.createElement(Box, {
|
|
13712
|
-
background: "generalBorder",
|
|
13713
|
-
minWidth: "1",
|
|
13714
|
-
width: "1"
|
|
13715
|
-
}), /* @__PURE__ */ React134.createElement(Box, {
|
|
13716
|
-
display: "flex",
|
|
13717
|
-
flexDirection: "column",
|
|
13718
|
-
margin: "16",
|
|
13719
|
-
style: { flexGrow: 1 }
|
|
13720
|
-
}, /* @__PURE__ */ React134.createElement(Box, {
|
|
13721
|
-
alignItems: "center",
|
|
13722
|
-
display: "flex",
|
|
13723
|
-
justifyContent: "space-between",
|
|
13724
|
-
marginBottom: "12"
|
|
13725
|
-
}, /* @__PURE__ */ React134.createElement(Box, {
|
|
13726
|
-
width: "28"
|
|
13727
|
-
}, headerBackButtonLink && /* @__PURE__ */ React134.createElement(Box, {
|
|
13728
|
-
as: "button",
|
|
13729
|
-
className: touchableStyles({
|
|
13730
|
-
active: "shrinkSm",
|
|
13731
|
-
hover: "growLg"
|
|
13732
|
-
}),
|
|
13733
|
-
color: "accentColor",
|
|
13734
|
-
onClick: () => {
|
|
13735
|
-
headerBackButtonLink && changeWalletStep(headerBackButtonLink, true);
|
|
13736
|
-
headerBackButtonCallback == null ? void 0 : headerBackButtonCallback();
|
|
13737
|
-
},
|
|
13738
|
-
paddingX: "8",
|
|
13739
|
-
paddingY: "4",
|
|
13740
|
-
style: {
|
|
13741
|
-
boxSizing: "content-box",
|
|
13742
|
-
height: 17,
|
|
13743
|
-
willChange: "transform"
|
|
13744
|
-
},
|
|
13745
|
-
transition: "default",
|
|
13746
|
-
type: "button"
|
|
13747
|
-
}, /* @__PURE__ */ React134.createElement(BackIcon, null))), /* @__PURE__ */ React134.createElement(Box, {
|
|
13748
|
-
display: "flex",
|
|
13749
|
-
justifyContent: "center",
|
|
13750
|
-
style: { flexGrow: 1 }
|
|
13751
|
-
}, headerLabel && /* @__PURE__ */ React134.createElement(Text, {
|
|
13752
|
-
color: "modalText",
|
|
13753
|
-
size: "18",
|
|
13754
|
-
textAlign: "center",
|
|
13755
|
-
weight: "heavy"
|
|
13756
|
-
}, headerLabel)), /* @__PURE__ */ React134.createElement(CloseButton, {
|
|
13757
|
-
onClose
|
|
13758
|
-
})), /* @__PURE__ */ React134.createElement(Box, {
|
|
13759
|
-
display: "flex",
|
|
13760
|
-
flexDirection: "column",
|
|
13761
|
-
style: { minHeight: compactModeEnabled ? 396 : 432 }
|
|
13762
|
-
}, /* @__PURE__ */ React134.createElement(Box, {
|
|
13763
|
-
alignItems: "center",
|
|
13764
|
-
display: "flex",
|
|
13765
|
-
flexDirection: "column",
|
|
13766
|
-
gap: "6",
|
|
13767
|
-
height: "full",
|
|
13768
|
-
justifyContent: "center",
|
|
13769
|
-
marginX: "8"
|
|
13770
|
-
}, walletContent)))));
|
|
13771
|
-
}
|
|
13772
|
-
|
|
13773
|
-
// src/components/ConnectOptions/ConnectDetails.tsx
|
|
13774
|
-
var getBrowserSrc = async () => {
|
|
13775
|
-
const browser = getBrowser();
|
|
13776
|
-
switch (browser) {
|
|
13777
|
-
case "Arc" /* Arc */:
|
|
13778
|
-
return (await import("./Arc-QDJFTGH2.js")).default;
|
|
13779
|
-
case "Brave" /* Brave */:
|
|
13780
|
-
return (await import("./Brave-YATE5BIM.js")).default;
|
|
13781
|
-
case "Chrome" /* Chrome */:
|
|
13782
|
-
return (await import("./Chrome-LGF33C3S.js")).default;
|
|
13783
|
-
case "Edge" /* Edge */:
|
|
13784
|
-
return (await import("./Edge-K2JEGI5S.js")).default;
|
|
13785
|
-
case "Firefox" /* Firefox */:
|
|
13786
|
-
return (await import("./Firefox-NP5SYEK5.js")).default;
|
|
13787
|
-
case "Opera" /* Opera */:
|
|
13788
|
-
return (await import("./Opera-KV54PXPA.js")).default;
|
|
13789
|
-
case "Safari" /* Safari */:
|
|
13790
|
-
return (await import("./Safari-2QIYKJ4P.js")).default;
|
|
13791
|
-
default:
|
|
13792
|
-
return (await import("./Browser-HN7O5MN7.js")).default;
|
|
13793
|
-
}
|
|
13794
|
-
};
|
|
13795
|
-
var preloadBrowserIcon = () => loadImages(getBrowserSrc);
|
|
13796
|
-
var getPlatformSrc = async () => {
|
|
13797
|
-
const platform = getPlatform();
|
|
13798
|
-
switch (platform) {
|
|
13799
|
-
case "Windows" /* Windows */:
|
|
13800
|
-
return (await import("./Windows-R3CKAIUV.js")).default;
|
|
13801
|
-
case "macOS" /* MacOS */:
|
|
13802
|
-
return (await import("./Macos-2KTZ2XLP.js")).default;
|
|
13803
|
-
case "Linux" /* Linux */:
|
|
13804
|
-
return (await import("./Linux-NS2LQPT4.js")).default;
|
|
13805
|
-
default:
|
|
13806
|
-
return (await import("./Linux-NS2LQPT4.js")).default;
|
|
13807
|
-
}
|
|
13808
|
-
};
|
|
13809
|
-
var preloadPlatformIcon = () => loadImages(getPlatformSrc);
|
|
13810
|
-
function GetDetail({
|
|
13811
|
-
getWalletDownload,
|
|
13812
|
-
compactModeEnabled
|
|
13813
|
-
}) {
|
|
13814
|
-
const wallets = useWalletConnectors().filter(
|
|
13815
|
-
(wallet) => wallet.isFunkitSdkConnector
|
|
13816
|
-
);
|
|
13817
|
-
const shownWallets = wallets.splice(0, 5);
|
|
13818
|
-
const { i18n: i18n2 } = useContext23(I18nContext);
|
|
13819
|
-
return /* @__PURE__ */ React135.createElement(Box, {
|
|
13820
|
-
alignItems: "center",
|
|
13821
|
-
display: "flex",
|
|
13822
|
-
flexDirection: "column",
|
|
13823
|
-
height: "full",
|
|
13824
|
-
marginTop: "18",
|
|
13825
|
-
width: "full"
|
|
13826
|
-
}, /* @__PURE__ */ React135.createElement(Box, {
|
|
13827
|
-
alignItems: "center",
|
|
13828
|
-
display: "flex",
|
|
13829
|
-
flexDirection: "column",
|
|
13830
|
-
gap: "28",
|
|
13831
|
-
height: "full",
|
|
13832
|
-
width: "full"
|
|
13833
|
-
}, shownWallets == null ? void 0 : shownWallets.filter(
|
|
13834
|
-
(wallet) => {
|
|
13835
|
-
var _a;
|
|
13836
|
-
return wallet.extensionDownloadUrl || wallet.desktopDownloadUrl || wallet.qrCode && ((_a = wallet.downloadUrls) == null ? void 0 : _a.qrCode);
|
|
13837
|
-
}
|
|
13838
|
-
).map((wallet) => {
|
|
13839
|
-
const { downloadUrls, iconBackground, iconUrl, id, name, qrCode } = wallet;
|
|
13840
|
-
const hasMobileCompanionApp = (downloadUrls == null ? void 0 : downloadUrls.qrCode) && qrCode;
|
|
13841
|
-
const hasExtension = !!wallet.extensionDownloadUrl;
|
|
13842
|
-
const hasMobileAndExtension = (downloadUrls == null ? void 0 : downloadUrls.qrCode) && hasExtension;
|
|
13843
|
-
const hasMobileAndDesktop = (downloadUrls == null ? void 0 : downloadUrls.qrCode) && !!wallet.desktopDownloadUrl;
|
|
13844
|
-
return /* @__PURE__ */ React135.createElement(Box, {
|
|
13845
|
-
alignItems: "center",
|
|
13846
|
-
display: "flex",
|
|
13847
|
-
gap: "16",
|
|
13848
|
-
justifyContent: "space-between",
|
|
13849
|
-
key: wallet.id,
|
|
13850
|
-
width: "full"
|
|
13851
|
-
}, /* @__PURE__ */ React135.createElement(Box, {
|
|
13852
|
-
alignItems: "center",
|
|
13853
|
-
display: "flex",
|
|
13854
|
-
flexDirection: "row",
|
|
13855
|
-
gap: "16"
|
|
13856
|
-
}, /* @__PURE__ */ React135.createElement(AsyncImage, {
|
|
13857
|
-
background: iconBackground,
|
|
13858
|
-
borderColor: "actionButtonBorder",
|
|
13859
|
-
borderRadius: "10",
|
|
13860
|
-
height: "48",
|
|
13861
|
-
src: iconUrl,
|
|
13862
|
-
width: "48"
|
|
13863
|
-
}), /* @__PURE__ */ React135.createElement(Box, {
|
|
13864
|
-
display: "flex",
|
|
13865
|
-
flexDirection: "column",
|
|
13866
|
-
gap: "2"
|
|
13867
|
-
}, /* @__PURE__ */ React135.createElement(Text, {
|
|
13868
|
-
color: "modalText",
|
|
13869
|
-
size: "14",
|
|
13870
|
-
weight: "bold"
|
|
13871
|
-
}, name), /* @__PURE__ */ React135.createElement(Text, {
|
|
13872
|
-
color: "modalTextSecondary",
|
|
13873
|
-
size: "14",
|
|
13874
|
-
weight: "medium"
|
|
13875
|
-
}, hasMobileAndExtension ? i18n2.t("get.mobile_and_extension.description") : hasMobileAndDesktop ? i18n2.t("get.mobile_and_desktop.description") : hasMobileCompanionApp ? i18n2.t("get.mobile.description") : hasExtension ? i18n2.t("get.extension.description") : null))), /* @__PURE__ */ React135.createElement(Box, {
|
|
13876
|
-
display: "flex",
|
|
13877
|
-
flexDirection: "column",
|
|
13878
|
-
gap: "4"
|
|
13879
|
-
}, /* @__PURE__ */ React135.createElement(ActionButton, {
|
|
13880
|
-
label: i18n2.t("get.action.label"),
|
|
13881
|
-
onClick: () => getWalletDownload(id),
|
|
13882
|
-
type: "secondary"
|
|
13883
|
-
})));
|
|
13884
|
-
})), /* @__PURE__ */ React135.createElement(Box, {
|
|
13885
|
-
alignItems: "center",
|
|
13886
|
-
borderRadius: "10",
|
|
13887
|
-
display: "flex",
|
|
13888
|
-
flexDirection: "column",
|
|
13889
|
-
gap: "8",
|
|
13890
|
-
justifyContent: "space-between",
|
|
13891
|
-
marginBottom: "4",
|
|
13892
|
-
paddingY: "8",
|
|
13893
|
-
style: { maxWidth: 275, textAlign: "center" }
|
|
13894
|
-
}, /* @__PURE__ */ React135.createElement(Text, {
|
|
13895
|
-
color: "modalText",
|
|
13896
|
-
size: "14",
|
|
13897
|
-
weight: "bold"
|
|
13898
|
-
}, i18n2.t("get.looking_for.title")), /* @__PURE__ */ React135.createElement(Text, {
|
|
13899
|
-
color: "modalTextSecondary",
|
|
13900
|
-
size: "14",
|
|
13901
|
-
weight: "medium"
|
|
13902
|
-
}, compactModeEnabled ? i18n2.t("get.looking_for.desktop.compact_description") : i18n2.t("get.looking_for.desktop.wide_description"))));
|
|
13903
|
-
}
|
|
13904
|
-
function LinkItem() {
|
|
13905
|
-
return /* @__PURE__ */ React135.createElement(Box, {
|
|
13906
|
-
display: "flex",
|
|
13907
|
-
alignItems: "center",
|
|
13908
|
-
justifyContent: "center",
|
|
13909
|
-
width: "full"
|
|
13910
|
-
}, /* @__PURE__ */ React135.createElement(Box, {
|
|
13911
|
-
style: { flex: 1 }
|
|
13912
|
-
}, /* @__PURE__ */ React135.createElement(FunDivider, null)), /* @__PURE__ */ React135.createElement(Box, {
|
|
13913
|
-
display: "flex",
|
|
13914
|
-
alignItems: "center",
|
|
13915
|
-
justifyContent: "center",
|
|
13916
|
-
color: "accentColor",
|
|
13917
|
-
background: "modalBorder",
|
|
13918
|
-
padding: "8",
|
|
13919
|
-
borderRadius: "13"
|
|
13920
|
-
}, /* @__PURE__ */ React135.createElement(LinkIcon, null)), /* @__PURE__ */ React135.createElement(Box, {
|
|
13921
|
-
style: { flex: 1 }
|
|
13922
|
-
}, /* @__PURE__ */ React135.createElement(FunDivider, null)));
|
|
13923
|
-
}
|
|
13924
|
-
function ConnectDetail({
|
|
13925
|
-
compactModeEnabled,
|
|
13926
|
-
qrCodeUri,
|
|
13927
|
-
wallet
|
|
13928
|
-
}) {
|
|
13929
|
-
const {
|
|
13930
|
-
downloadUrls,
|
|
13931
|
-
iconBackground,
|
|
13932
|
-
iconUrl,
|
|
13933
|
-
name,
|
|
13934
|
-
qrCode,
|
|
13935
|
-
ready,
|
|
13936
|
-
getDesktopUri
|
|
13937
|
-
} = wallet;
|
|
13938
|
-
const safari = isSafari();
|
|
13939
|
-
const funkitConfig = useFunkitConfig();
|
|
13940
|
-
const appConfig = {
|
|
13941
|
-
name: funkitConfig.appName,
|
|
13942
|
-
logoSrc: funkitConfig.appLogoSrc,
|
|
13943
|
-
logoBackground: funkitConfig.appLogoBackgroundColor
|
|
13944
|
-
};
|
|
13945
|
-
const hasExtension = !!wallet.extensionDownloadUrl;
|
|
13946
|
-
const hasQrCode = qrCode && qrCodeUri;
|
|
13947
|
-
const { width: windowWidth } = useWindowSize();
|
|
13948
|
-
const smallWindow = windowWidth && windowWidth < 768;
|
|
13949
|
-
useEffect29(() => {
|
|
13950
|
-
preloadBrowserIcon();
|
|
13951
|
-
preloadPlatformIcon();
|
|
13952
|
-
}, []);
|
|
13953
|
-
return /* @__PURE__ */ React135.createElement(Box, {
|
|
13954
|
-
display: "flex",
|
|
13955
|
-
flexDirection: "column",
|
|
13956
|
-
height: "full",
|
|
13957
|
-
width: "full"
|
|
13958
|
-
}, hasQrCode ? /* @__PURE__ */ React135.createElement(Box, {
|
|
13959
|
-
alignItems: "center",
|
|
13960
|
-
display: "flex",
|
|
13961
|
-
height: "full",
|
|
13962
|
-
justifyContent: "center",
|
|
13963
|
-
flexDirection: "column"
|
|
13964
|
-
}, /* @__PURE__ */ React135.createElement(QRCode, {
|
|
13965
|
-
logoBackground: iconBackground,
|
|
13966
|
-
logoSize: compactModeEnabled ? 60 : 72,
|
|
13967
|
-
logoUrl: iconUrl,
|
|
13968
|
-
size: compactModeEnabled ? 318 : smallWindow ? Math.max(280, Math.min(windowWidth - 308, 382)) : 382,
|
|
13969
|
-
uri: qrCodeUri
|
|
13970
|
-
}), /* @__PURE__ */ React135.createElement(Box, {
|
|
13971
|
-
display: "flex",
|
|
13972
|
-
alignItems: "center",
|
|
13973
|
-
justifyContent: "center",
|
|
13974
|
-
paddingTop: "20"
|
|
13975
|
-
}, /* @__PURE__ */ React135.createElement(Text, {
|
|
13976
|
-
weight: "medium",
|
|
13977
|
-
color: "modalText",
|
|
13978
|
-
size: "14",
|
|
13979
|
-
style: { paddingRight: 8 }
|
|
13980
|
-
}, "Copy Link"), /* @__PURE__ */ React135.createElement(CopyAddress, {
|
|
13981
|
-
address: qrCodeUri,
|
|
13982
|
-
type: "button"
|
|
13983
|
-
}))) : /* @__PURE__ */ React135.createElement(Box, {
|
|
13984
|
-
alignItems: "center",
|
|
13985
|
-
display: "flex",
|
|
13986
|
-
justifyContent: "center",
|
|
13987
|
-
style: { flexGrow: 1 }
|
|
13988
|
-
}, /* @__PURE__ */ React135.createElement(Box, {
|
|
13989
|
-
alignItems: "center",
|
|
13990
|
-
display: "flex",
|
|
13991
|
-
flexDirection: "column",
|
|
13992
|
-
gap: "8"
|
|
13993
|
-
}, /* @__PURE__ */ React135.createElement(Box, {
|
|
13994
|
-
alignItems: "center",
|
|
13995
|
-
display: "flex",
|
|
13996
|
-
flexDirection: "column",
|
|
13997
|
-
gap: "4",
|
|
13998
|
-
style: { textAlign: "center" }
|
|
13999
|
-
}, ready && !hasQrCode ? /* @__PURE__ */ React135.createElement(Box, {
|
|
14000
|
-
width: "full",
|
|
14001
|
-
display: "flex",
|
|
14002
|
-
flexDirection: "column",
|
|
14003
|
-
gap: "24"
|
|
14004
|
-
}, /* @__PURE__ */ React135.createElement(Box, {
|
|
14005
|
-
id: "link-graphics",
|
|
14006
|
-
display: "flex",
|
|
14007
|
-
flexDirection: "row",
|
|
14008
|
-
justifyContent: "space-between"
|
|
14009
|
-
}, /* @__PURE__ */ React135.createElement(Box, {
|
|
14010
|
-
style: { width: 80, height: 80 }
|
|
14011
|
-
}, /* @__PURE__ */ React135.createElement(AsyncImage, {
|
|
14012
|
-
background: appConfig.logoBackground,
|
|
14013
|
-
borderRadius: "menuButton",
|
|
14014
|
-
src: appConfig.logoSrc,
|
|
14015
|
-
width: 80,
|
|
14016
|
-
height: 80
|
|
14017
|
-
})), /* @__PURE__ */ React135.createElement(LinkItem, null), /* @__PURE__ */ React135.createElement(Box, {
|
|
14018
|
-
style: { width: 80, height: 80 }
|
|
14019
|
-
}, /* @__PURE__ */ React135.createElement(AsyncImage, {
|
|
14020
|
-
background: iconBackground,
|
|
14021
|
-
borderRadius: "menuButton",
|
|
14022
|
-
src: iconUrl,
|
|
14023
|
-
width: 80,
|
|
14024
|
-
height: 80
|
|
14025
|
-
}))), /* @__PURE__ */ React135.createElement(Box, {
|
|
14026
|
-
id: "link-text",
|
|
14027
|
-
display: "flex",
|
|
14028
|
-
flexDirection: "column",
|
|
14029
|
-
gap: "10"
|
|
14030
|
-
}, /* @__PURE__ */ React135.createElement(Text, {
|
|
14031
|
-
color: "accentColor",
|
|
14032
|
-
weight: "semibold",
|
|
14033
|
-
size: "18"
|
|
14034
|
-
}, "Connecting to ", name, "..."), /* @__PURE__ */ React135.createElement(Text, {
|
|
14035
|
-
color: "modalTextSecondary",
|
|
14036
|
-
weight: "medium",
|
|
14037
|
-
size: "14"
|
|
14038
|
-
}, "Approve the ", appConfig.name, " application to execute transactions seamlessly."))) : null))));
|
|
14039
|
-
}
|
|
14040
|
-
var DownloadOptionsBox = ({
|
|
14041
|
-
actionLabel,
|
|
14042
|
-
description,
|
|
14043
|
-
iconAccent,
|
|
14044
|
-
iconBackground,
|
|
14045
|
-
iconUrl,
|
|
14046
|
-
isCompact,
|
|
14047
|
-
onAction,
|
|
14048
|
-
title,
|
|
14049
|
-
url,
|
|
14050
|
-
variant
|
|
14051
|
-
}) => {
|
|
14052
|
-
const isBrowserCard = variant === "browser";
|
|
14053
|
-
const gradientRgbas = !isBrowserCard && iconAccent && getGradientRGBAs(iconAccent);
|
|
14054
|
-
return /* @__PURE__ */ React135.createElement(Box, {
|
|
14055
|
-
alignItems: "center",
|
|
14056
|
-
borderRadius: "13",
|
|
14057
|
-
display: "flex",
|
|
14058
|
-
justifyContent: "center",
|
|
14059
|
-
overflow: "hidden",
|
|
14060
|
-
paddingX: isCompact ? "18" : "44",
|
|
14061
|
-
position: "relative",
|
|
14062
|
-
style: { flex: 1, isolation: "isolate" },
|
|
14063
|
-
width: "full"
|
|
14064
|
-
}, /* @__PURE__ */ React135.createElement(Box, {
|
|
14065
|
-
borderColor: "actionButtonBorder",
|
|
14066
|
-
borderRadius: "13",
|
|
14067
|
-
borderStyle: "solid",
|
|
14068
|
-
borderWidth: "1",
|
|
14069
|
-
style: {
|
|
14070
|
-
bottom: "0",
|
|
14071
|
-
left: "0",
|
|
14072
|
-
position: "absolute",
|
|
14073
|
-
right: "0",
|
|
14074
|
-
top: "0",
|
|
14075
|
-
zIndex: 1
|
|
14076
|
-
}
|
|
14077
|
-
}), isBrowserCard && /* @__PURE__ */ React135.createElement(Box, {
|
|
14078
|
-
background: "downloadTopCardBackground",
|
|
14079
|
-
height: "full",
|
|
14080
|
-
position: "absolute",
|
|
14081
|
-
style: {
|
|
14082
|
-
zIndex: 0
|
|
14083
|
-
},
|
|
14084
|
-
width: "full"
|
|
14085
|
-
}, /* @__PURE__ */ React135.createElement(Box, {
|
|
14086
|
-
display: "flex",
|
|
14087
|
-
flexDirection: "row",
|
|
14088
|
-
justifyContent: "space-between",
|
|
14089
|
-
style: {
|
|
14090
|
-
bottom: "0",
|
|
14091
|
-
filter: "blur(20px)",
|
|
14092
|
-
left: "0",
|
|
14093
|
-
position: "absolute",
|
|
14094
|
-
right: "0",
|
|
14095
|
-
top: "0",
|
|
14096
|
-
transform: "translate3d(0, 0, 0)"
|
|
14097
|
-
}
|
|
14098
|
-
}, /* @__PURE__ */ React135.createElement(Box, {
|
|
14099
|
-
style: {
|
|
14100
|
-
filter: "blur(100px)",
|
|
14101
|
-
marginLeft: -27,
|
|
14102
|
-
marginTop: -20,
|
|
14103
|
-
opacity: 0.6,
|
|
14104
|
-
transform: "translate3d(0, 0, 0)"
|
|
14105
|
-
}
|
|
14106
|
-
}, /* @__PURE__ */ React135.createElement(AsyncImage, {
|
|
14107
|
-
borderRadius: "full",
|
|
14108
|
-
height: "200",
|
|
14109
|
-
src: iconUrl,
|
|
14110
|
-
width: "200"
|
|
14111
|
-
})), /* @__PURE__ */ React135.createElement(Box, {
|
|
14112
|
-
style: {
|
|
14113
|
-
filter: "blur(100px)",
|
|
14114
|
-
marginRight: 0,
|
|
14115
|
-
marginTop: 105,
|
|
14116
|
-
opacity: 0.6,
|
|
14117
|
-
overflow: "auto",
|
|
14118
|
-
transform: "translate3d(0, 0, 0)"
|
|
14119
|
-
}
|
|
14120
|
-
}, /* @__PURE__ */ React135.createElement(AsyncImage, {
|
|
14121
|
-
borderRadius: "full",
|
|
14122
|
-
height: "200",
|
|
14123
|
-
src: iconUrl,
|
|
14124
|
-
width: "200"
|
|
14125
|
-
})))), !isBrowserCard && gradientRgbas && /* @__PURE__ */ React135.createElement(Box, {
|
|
14126
|
-
background: "downloadBottomCardBackground",
|
|
14127
|
-
style: {
|
|
14128
|
-
bottom: "0",
|
|
14129
|
-
left: "0",
|
|
14130
|
-
position: "absolute",
|
|
14131
|
-
right: "0",
|
|
14132
|
-
top: "0"
|
|
14133
|
-
}
|
|
14134
|
-
}, /* @__PURE__ */ React135.createElement(Box, {
|
|
14135
|
-
position: "absolute",
|
|
14136
|
-
style: {
|
|
14137
|
-
background: `radial-gradient(50% 50% at 50% 50%, ${gradientRgbas[0]} 0%, ${gradientRgbas[1]} 25%, rgba(0,0,0,0) 100%)`,
|
|
14138
|
-
height: 564,
|
|
14139
|
-
left: -215,
|
|
14140
|
-
top: -197,
|
|
14141
|
-
transform: "translate3d(0, 0, 0)",
|
|
14142
|
-
width: 564
|
|
14143
|
-
}
|
|
14144
|
-
}), /* @__PURE__ */ React135.createElement(Box, {
|
|
14145
|
-
position: "absolute",
|
|
14146
|
-
style: {
|
|
14147
|
-
background: `radial-gradient(50% 50% at 50% 50%, ${gradientRgbas[2]} 0%, rgba(0, 0, 0, 0) 100%)`,
|
|
14148
|
-
height: 564,
|
|
14149
|
-
left: -1,
|
|
14150
|
-
top: -76,
|
|
14151
|
-
transform: "translate3d(0, 0, 0)",
|
|
14152
|
-
width: 564
|
|
14153
|
-
}
|
|
14154
|
-
})), /* @__PURE__ */ React135.createElement(Box, {
|
|
14155
|
-
alignItems: "flex-start",
|
|
14156
|
-
display: "flex",
|
|
14157
|
-
flexDirection: "row",
|
|
14158
|
-
gap: "24",
|
|
14159
|
-
height: "max",
|
|
14160
|
-
justifyContent: "center",
|
|
14161
|
-
style: { zIndex: 1 }
|
|
14162
|
-
}, /* @__PURE__ */ React135.createElement(Box, null, /* @__PURE__ */ React135.createElement(AsyncImage, {
|
|
14163
|
-
height: "60",
|
|
14164
|
-
src: iconUrl,
|
|
14165
|
-
width: "60",
|
|
14166
|
-
...iconBackground ? {
|
|
14167
|
-
background: iconBackground,
|
|
14168
|
-
borderColor: "generalBorder",
|
|
14169
|
-
borderRadius: "10"
|
|
14170
|
-
} : null
|
|
14171
|
-
})), /* @__PURE__ */ React135.createElement(Box, {
|
|
14172
|
-
display: "flex",
|
|
14173
|
-
flexDirection: "column",
|
|
14174
|
-
gap: "4",
|
|
14175
|
-
style: { flex: 1 },
|
|
14176
|
-
width: "full"
|
|
14177
|
-
}, /* @__PURE__ */ React135.createElement(Text, {
|
|
14178
|
-
color: "modalText",
|
|
14179
|
-
size: "14",
|
|
14180
|
-
weight: "bold"
|
|
14181
|
-
}, title), /* @__PURE__ */ React135.createElement(Text, {
|
|
14182
|
-
color: "modalTextSecondary",
|
|
14183
|
-
size: "14",
|
|
14184
|
-
weight: "medium"
|
|
14185
|
-
}, description), /* @__PURE__ */ React135.createElement(Box, {
|
|
14186
|
-
marginTop: "14",
|
|
14187
|
-
width: "max"
|
|
14188
|
-
}, /* @__PURE__ */ React135.createElement(ActionButton, {
|
|
14189
|
-
href: url,
|
|
14190
|
-
label: actionLabel,
|
|
14191
|
-
onClick: onAction,
|
|
14192
|
-
size: "medium"
|
|
14193
|
-
})))));
|
|
14194
|
-
};
|
|
14195
|
-
function DownloadOptionsDetail({
|
|
14196
|
-
changeWalletStep,
|
|
14197
|
-
wallet
|
|
14198
|
-
}) {
|
|
14199
|
-
const browser = getBrowser();
|
|
14200
|
-
const platform = getPlatform();
|
|
14201
|
-
const modalSize = useContext23(ModalSizeContext);
|
|
14202
|
-
const isCompact = modalSize === "compact";
|
|
14203
|
-
const {
|
|
14204
|
-
desktop,
|
|
14205
|
-
desktopDownloadUrl,
|
|
14206
|
-
extension,
|
|
14207
|
-
extensionDownloadUrl,
|
|
14208
|
-
mobileDownloadUrl
|
|
14209
|
-
} = wallet;
|
|
14210
|
-
const { i18n: i18n2 } = useContext23(I18nContext);
|
|
14211
|
-
useEffect29(() => {
|
|
14212
|
-
preloadCreateIcon();
|
|
14213
|
-
preloadScanIcon();
|
|
14214
|
-
preloadRefreshIcon();
|
|
14215
|
-
preloadConnectIcon();
|
|
14216
|
-
}, []);
|
|
14217
|
-
return /* @__PURE__ */ React135.createElement(Box, {
|
|
14218
|
-
alignItems: "center",
|
|
14219
|
-
display: "flex",
|
|
14220
|
-
flexDirection: "column",
|
|
14221
|
-
gap: "24",
|
|
14222
|
-
height: "full",
|
|
14223
|
-
marginBottom: "8",
|
|
14224
|
-
marginTop: "4",
|
|
14225
|
-
width: "full"
|
|
14226
|
-
}, /* @__PURE__ */ React135.createElement(Box, {
|
|
13145
|
+
gap: "8"
|
|
13146
|
+
}, /* @__PURE__ */ React121.createElement(Box, {
|
|
14227
13147
|
alignItems: "center",
|
|
14228
13148
|
display: "flex",
|
|
14229
13149
|
flexDirection: "column",
|
|
14230
|
-
gap: "
|
|
14231
|
-
|
|
14232
|
-
|
|
14233
|
-
width: "full"
|
|
14234
|
-
}, extensionDownloadUrl && /* @__PURE__ */ React135.createElement(DownloadOptionsBox, {
|
|
14235
|
-
actionLabel: i18n2.t("get_options.extension.download.label", {
|
|
14236
|
-
browser
|
|
14237
|
-
}),
|
|
14238
|
-
description: i18n2.t("get_options.extension.description"),
|
|
14239
|
-
iconUrl: getBrowserSrc,
|
|
14240
|
-
isCompact,
|
|
14241
|
-
onAction: () => changeWalletStep(
|
|
14242
|
-
(extension == null ? void 0 : extension.instructions) ? "INSTRUCTIONS_EXTENSION" /* InstructionsExtension */ : "CONNECT" /* Connect */
|
|
14243
|
-
),
|
|
14244
|
-
title: i18n2.t("get_options.extension.title", {
|
|
14245
|
-
wallet: wallet.name,
|
|
14246
|
-
browser
|
|
14247
|
-
}),
|
|
14248
|
-
url: extensionDownloadUrl,
|
|
14249
|
-
variant: "browser"
|
|
14250
|
-
}), desktopDownloadUrl && /* @__PURE__ */ React135.createElement(DownloadOptionsBox, {
|
|
14251
|
-
actionLabel: i18n2.t("get_options.desktop.download.label", {
|
|
14252
|
-
platform
|
|
14253
|
-
}),
|
|
14254
|
-
description: i18n2.t("get_options.desktop.description"),
|
|
14255
|
-
iconUrl: getPlatformSrc,
|
|
14256
|
-
isCompact,
|
|
14257
|
-
onAction: () => changeWalletStep(
|
|
14258
|
-
(desktop == null ? void 0 : desktop.instructions) ? "INSTRUCTIONS_DESKTOP" /* InstructionsDesktop */ : "CONNECT" /* Connect */
|
|
14259
|
-
),
|
|
14260
|
-
title: i18n2.t("get_options.desktop.title", {
|
|
14261
|
-
wallet: wallet.name,
|
|
14262
|
-
platform
|
|
14263
|
-
}),
|
|
14264
|
-
url: desktopDownloadUrl,
|
|
14265
|
-
variant: "desktop"
|
|
14266
|
-
}), mobileDownloadUrl && /* @__PURE__ */ React135.createElement(DownloadOptionsBox, {
|
|
14267
|
-
actionLabel: i18n2.t("get_options.mobile.download.label", {
|
|
14268
|
-
wallet: wallet.name
|
|
14269
|
-
}),
|
|
14270
|
-
description: i18n2.t("get_options.mobile.description"),
|
|
14271
|
-
iconAccent: wallet.iconAccent,
|
|
14272
|
-
iconBackground: wallet.iconBackground,
|
|
14273
|
-
iconUrl: wallet.iconUrl,
|
|
14274
|
-
isCompact,
|
|
14275
|
-
onAction: () => {
|
|
14276
|
-
changeWalletStep("DOWNLOAD" /* Download */);
|
|
14277
|
-
},
|
|
14278
|
-
title: i18n2.t("get_options.mobile.title", { wallet: wallet.name }),
|
|
14279
|
-
variant: "app"
|
|
14280
|
-
})));
|
|
14281
|
-
}
|
|
14282
|
-
function DownloadDetail({
|
|
14283
|
-
changeWalletStep,
|
|
14284
|
-
wallet
|
|
14285
|
-
}) {
|
|
14286
|
-
const { downloadUrls, qrCode } = wallet;
|
|
14287
|
-
const { i18n: i18n2 } = useContext23(I18nContext);
|
|
14288
|
-
useEffect29(() => {
|
|
14289
|
-
preloadCreateIcon();
|
|
14290
|
-
preloadScanIcon();
|
|
14291
|
-
}, []);
|
|
14292
|
-
return /* @__PURE__ */ React135.createElement(Box, {
|
|
14293
|
-
alignItems: "center",
|
|
13150
|
+
gap: "4",
|
|
13151
|
+
style: { textAlign: "center" }
|
|
13152
|
+
}, ready && !hasQrCode ? /* @__PURE__ */ React121.createElement(Box, {
|
|
13153
|
+
width: "full",
|
|
14294
13154
|
display: "flex",
|
|
14295
13155
|
flexDirection: "column",
|
|
14296
|
-
gap: "24"
|
|
14297
|
-
|
|
14298
|
-
|
|
14299
|
-
}, /* @__PURE__ */ React135.createElement(Box, {
|
|
14300
|
-
style: { maxWidth: 220, textAlign: "center" }
|
|
14301
|
-
}, /* @__PURE__ */ React135.createElement(Text, {
|
|
14302
|
-
color: "modalTextSecondary",
|
|
14303
|
-
size: "14",
|
|
14304
|
-
weight: "semibold"
|
|
14305
|
-
}, i18n2.t("get_mobile.description"))), /* @__PURE__ */ React135.createElement(Box, {
|
|
14306
|
-
height: "full"
|
|
14307
|
-
}, (downloadUrls == null ? void 0 : downloadUrls.qrCode) ? /* @__PURE__ */ React135.createElement(QRCode, {
|
|
14308
|
-
logoSize: 0,
|
|
14309
|
-
size: 268,
|
|
14310
|
-
uri: downloadUrls.qrCode
|
|
14311
|
-
}) : null), /* @__PURE__ */ React135.createElement(Box, {
|
|
14312
|
-
alignItems: "center",
|
|
14313
|
-
borderRadius: "10",
|
|
13156
|
+
gap: "24"
|
|
13157
|
+
}, /* @__PURE__ */ React121.createElement(Box, {
|
|
13158
|
+
id: "link-graphics",
|
|
14314
13159
|
display: "flex",
|
|
14315
13160
|
flexDirection: "row",
|
|
14316
|
-
|
|
14317
|
-
|
|
14318
|
-
|
|
14319
|
-
|
|
14320
|
-
|
|
14321
|
-
|
|
14322
|
-
|
|
14323
|
-
|
|
14324
|
-
|
|
14325
|
-
|
|
14326
|
-
|
|
14327
|
-
}
|
|
14328
|
-
|
|
14329
|
-
|
|
14330
|
-
|
|
14331
|
-
|
|
14332
|
-
|
|
14333
|
-
|
|
14334
|
-
|
|
14335
|
-
height: "48",
|
|
14336
|
-
src: wallet.iconUrl,
|
|
14337
|
-
width: "48"
|
|
14338
|
-
}),
|
|
14339
|
-
refresh: () => /* @__PURE__ */ React135.createElement(RefreshIcon, null),
|
|
14340
|
-
scan: () => /* @__PURE__ */ React135.createElement(ScanIcon, null)
|
|
14341
|
-
};
|
|
14342
|
-
function InstructionMobileDetail({
|
|
14343
|
-
connectWallet,
|
|
14344
|
-
wallet
|
|
14345
|
-
}) {
|
|
14346
|
-
var _a, _b, _c, _d;
|
|
14347
|
-
const { i18n: i18n2 } = useContext23(I18nContext);
|
|
14348
|
-
return /* @__PURE__ */ React135.createElement(Box, {
|
|
14349
|
-
alignItems: "center",
|
|
14350
|
-
display: "flex",
|
|
14351
|
-
flexDirection: "column",
|
|
14352
|
-
height: "full",
|
|
14353
|
-
width: "full"
|
|
14354
|
-
}, /* @__PURE__ */ React135.createElement(Box, {
|
|
14355
|
-
display: "flex",
|
|
14356
|
-
flexDirection: "column",
|
|
14357
|
-
gap: "28",
|
|
14358
|
-
height: "full",
|
|
14359
|
-
justifyContent: "center",
|
|
14360
|
-
paddingY: "32",
|
|
14361
|
-
style: { maxWidth: 320 }
|
|
14362
|
-
}, (_b = (_a = wallet == null ? void 0 : wallet.qrCode) == null ? void 0 : _a.instructions) == null ? void 0 : _b.steps.map((d, idx) => {
|
|
14363
|
-
var _a2;
|
|
14364
|
-
return /* @__PURE__ */ React135.createElement(Box, {
|
|
14365
|
-
alignItems: "center",
|
|
14366
|
-
display: "flex",
|
|
14367
|
-
flexDirection: "row",
|
|
14368
|
-
gap: "16",
|
|
14369
|
-
key: idx
|
|
14370
|
-
}, /* @__PURE__ */ React135.createElement(Box, {
|
|
14371
|
-
borderRadius: "10",
|
|
14372
|
-
height: "48",
|
|
14373
|
-
minWidth: "48",
|
|
14374
|
-
overflow: "hidden",
|
|
14375
|
-
position: "relative",
|
|
14376
|
-
width: "48"
|
|
14377
|
-
}, (_a2 = stepIcons[d.step]) == null ? void 0 : _a2.call(stepIcons, wallet)), /* @__PURE__ */ React135.createElement(Box, {
|
|
14378
|
-
display: "flex",
|
|
14379
|
-
flexDirection: "column",
|
|
14380
|
-
gap: "4"
|
|
14381
|
-
}, /* @__PURE__ */ React135.createElement(Text, {
|
|
14382
|
-
color: "modalText",
|
|
14383
|
-
size: "14",
|
|
14384
|
-
weight: "bold"
|
|
14385
|
-
}, i18n2.t(d.title, void 0, {
|
|
14386
|
-
rawKeyIfTranslationMissing: true
|
|
14387
|
-
})), /* @__PURE__ */ React135.createElement(Text, {
|
|
14388
|
-
color: "modalTextSecondary",
|
|
14389
|
-
size: "14",
|
|
14390
|
-
weight: "medium"
|
|
14391
|
-
}, i18n2.t(d.description, void 0, {
|
|
14392
|
-
rawKeyIfTranslationMissing: true
|
|
14393
|
-
}))));
|
|
14394
|
-
})), /* @__PURE__ */ React135.createElement(Box, {
|
|
14395
|
-
alignItems: "center",
|
|
14396
|
-
display: "flex",
|
|
14397
|
-
flexDirection: "column",
|
|
14398
|
-
gap: "12",
|
|
14399
|
-
justifyContent: "center",
|
|
14400
|
-
marginBottom: "16"
|
|
14401
|
-
}, /* @__PURE__ */ React135.createElement(ActionButton, {
|
|
14402
|
-
label: i18n2.t("get_instructions.mobile.connect.label"),
|
|
14403
|
-
onClick: () => connectWallet(wallet)
|
|
14404
|
-
}), /* @__PURE__ */ React135.createElement(Box, {
|
|
14405
|
-
as: "a",
|
|
14406
|
-
className: touchableStyles({ active: "shrink", hover: "grow" }),
|
|
14407
|
-
display: "block",
|
|
14408
|
-
href: (_d = (_c = wallet == null ? void 0 : wallet.qrCode) == null ? void 0 : _c.instructions) == null ? void 0 : _d.learnMoreUrl,
|
|
14409
|
-
paddingX: "12",
|
|
14410
|
-
paddingY: "4",
|
|
14411
|
-
rel: "noreferrer",
|
|
14412
|
-
style: { willChange: "transform" },
|
|
14413
|
-
target: "_blank",
|
|
14414
|
-
transition: "default"
|
|
14415
|
-
}, /* @__PURE__ */ React135.createElement(Text, {
|
|
14416
|
-
color: "accentColor",
|
|
14417
|
-
size: "14",
|
|
14418
|
-
weight: "bold"
|
|
14419
|
-
}, i18n2.t("get_instructions.mobile.learn_more.label")))));
|
|
14420
|
-
}
|
|
14421
|
-
function InstructionExtensionDetail({
|
|
14422
|
-
wallet
|
|
14423
|
-
}) {
|
|
14424
|
-
var _a, _b, _c, _d;
|
|
14425
|
-
const { i18n: i18n2 } = useContext23(I18nContext);
|
|
14426
|
-
return /* @__PURE__ */ React135.createElement(Box, {
|
|
14427
|
-
alignItems: "center",
|
|
14428
|
-
display: "flex",
|
|
14429
|
-
flexDirection: "column",
|
|
14430
|
-
height: "full",
|
|
14431
|
-
width: "full"
|
|
14432
|
-
}, /* @__PURE__ */ React135.createElement(Box, {
|
|
14433
|
-
display: "flex",
|
|
14434
|
-
flexDirection: "column",
|
|
14435
|
-
gap: "28",
|
|
14436
|
-
height: "full",
|
|
14437
|
-
justifyContent: "center",
|
|
14438
|
-
paddingY: "32",
|
|
14439
|
-
style: { maxWidth: 320 }
|
|
14440
|
-
}, (_b = (_a = wallet == null ? void 0 : wallet.extension) == null ? void 0 : _a.instructions) == null ? void 0 : _b.steps.map((d, idx) => {
|
|
14441
|
-
var _a2;
|
|
14442
|
-
return /* @__PURE__ */ React135.createElement(Box, {
|
|
14443
|
-
alignItems: "center",
|
|
14444
|
-
display: "flex",
|
|
14445
|
-
flexDirection: "row",
|
|
14446
|
-
gap: "16",
|
|
14447
|
-
key: idx
|
|
14448
|
-
}, /* @__PURE__ */ React135.createElement(Box, {
|
|
14449
|
-
borderRadius: "10",
|
|
14450
|
-
height: "48",
|
|
14451
|
-
minWidth: "48",
|
|
14452
|
-
overflow: "hidden",
|
|
14453
|
-
position: "relative",
|
|
14454
|
-
width: "48"
|
|
14455
|
-
}, (_a2 = stepIcons[d.step]) == null ? void 0 : _a2.call(stepIcons, wallet)), /* @__PURE__ */ React135.createElement(Box, {
|
|
14456
|
-
display: "flex",
|
|
14457
|
-
flexDirection: "column",
|
|
14458
|
-
gap: "4"
|
|
14459
|
-
}, /* @__PURE__ */ React135.createElement(Text, {
|
|
14460
|
-
color: "modalText",
|
|
14461
|
-
size: "14",
|
|
14462
|
-
weight: "bold"
|
|
14463
|
-
}, i18n2.t(d.title, void 0, {
|
|
14464
|
-
rawKeyIfTranslationMissing: true
|
|
14465
|
-
})), /* @__PURE__ */ React135.createElement(Text, {
|
|
14466
|
-
color: "modalTextSecondary",
|
|
14467
|
-
size: "14",
|
|
14468
|
-
weight: "medium"
|
|
14469
|
-
}, i18n2.t(d.description, void 0, {
|
|
14470
|
-
rawKeyIfTranslationMissing: true
|
|
14471
|
-
}))));
|
|
14472
|
-
})), /* @__PURE__ */ React135.createElement(Box, {
|
|
14473
|
-
alignItems: "center",
|
|
14474
|
-
display: "flex",
|
|
14475
|
-
flexDirection: "column",
|
|
14476
|
-
gap: "12",
|
|
14477
|
-
justifyContent: "center",
|
|
14478
|
-
marginBottom: "16"
|
|
14479
|
-
}, /* @__PURE__ */ React135.createElement(ActionButton, {
|
|
14480
|
-
label: i18n2.t("get_instructions.extension.refresh.label"),
|
|
14481
|
-
onClick: window.location.reload.bind(window.location)
|
|
14482
|
-
}), /* @__PURE__ */ React135.createElement(Box, {
|
|
14483
|
-
as: "a",
|
|
14484
|
-
className: touchableStyles({ active: "shrink", hover: "grow" }),
|
|
14485
|
-
display: "block",
|
|
14486
|
-
href: (_d = (_c = wallet == null ? void 0 : wallet.extension) == null ? void 0 : _c.instructions) == null ? void 0 : _d.learnMoreUrl,
|
|
14487
|
-
paddingX: "12",
|
|
14488
|
-
paddingY: "4",
|
|
14489
|
-
rel: "noreferrer",
|
|
14490
|
-
style: { willChange: "transform" },
|
|
14491
|
-
target: "_blank",
|
|
14492
|
-
transition: "default"
|
|
14493
|
-
}, /* @__PURE__ */ React135.createElement(Text, {
|
|
14494
|
-
color: "accentColor",
|
|
14495
|
-
size: "14",
|
|
14496
|
-
weight: "bold"
|
|
14497
|
-
}, i18n2.t("get_instructions.extension.learn_more.label")))));
|
|
14498
|
-
}
|
|
14499
|
-
function InstructionDesktopDetail({
|
|
14500
|
-
connectWallet,
|
|
14501
|
-
wallet
|
|
14502
|
-
}) {
|
|
14503
|
-
var _a, _b, _c, _d;
|
|
14504
|
-
const { i18n: i18n2 } = useContext23(I18nContext);
|
|
14505
|
-
return /* @__PURE__ */ React135.createElement(Box, {
|
|
14506
|
-
alignItems: "center",
|
|
14507
|
-
display: "flex",
|
|
14508
|
-
flexDirection: "column",
|
|
14509
|
-
height: "full",
|
|
14510
|
-
width: "full"
|
|
14511
|
-
}, /* @__PURE__ */ React135.createElement(Box, {
|
|
14512
|
-
display: "flex",
|
|
14513
|
-
flexDirection: "column",
|
|
14514
|
-
gap: "28",
|
|
14515
|
-
height: "full",
|
|
14516
|
-
justifyContent: "center",
|
|
14517
|
-
paddingY: "32",
|
|
14518
|
-
style: { maxWidth: 320 }
|
|
14519
|
-
}, (_b = (_a = wallet == null ? void 0 : wallet.desktop) == null ? void 0 : _a.instructions) == null ? void 0 : _b.steps.map((d, idx) => {
|
|
14520
|
-
var _a2;
|
|
14521
|
-
return /* @__PURE__ */ React135.createElement(Box, {
|
|
14522
|
-
alignItems: "center",
|
|
14523
|
-
display: "flex",
|
|
14524
|
-
flexDirection: "row",
|
|
14525
|
-
gap: "16",
|
|
14526
|
-
key: idx
|
|
14527
|
-
}, /* @__PURE__ */ React135.createElement(Box, {
|
|
14528
|
-
borderRadius: "10",
|
|
14529
|
-
height: "48",
|
|
14530
|
-
minWidth: "48",
|
|
14531
|
-
overflow: "hidden",
|
|
14532
|
-
position: "relative",
|
|
14533
|
-
width: "48"
|
|
14534
|
-
}, (_a2 = stepIcons[d.step]) == null ? void 0 : _a2.call(stepIcons, wallet)), /* @__PURE__ */ React135.createElement(Box, {
|
|
14535
|
-
display: "flex",
|
|
14536
|
-
flexDirection: "column",
|
|
14537
|
-
gap: "4"
|
|
14538
|
-
}, /* @__PURE__ */ React135.createElement(Text, {
|
|
14539
|
-
color: "modalText",
|
|
14540
|
-
size: "14",
|
|
14541
|
-
weight: "bold"
|
|
14542
|
-
}, i18n2.t(d.title, void 0, {
|
|
14543
|
-
rawKeyIfTranslationMissing: true
|
|
14544
|
-
})), /* @__PURE__ */ React135.createElement(Text, {
|
|
14545
|
-
color: "modalTextSecondary",
|
|
14546
|
-
size: "14",
|
|
14547
|
-
weight: "medium"
|
|
14548
|
-
}, i18n2.t(d.description, void 0, {
|
|
14549
|
-
rawKeyIfTranslationMissing: true
|
|
14550
|
-
}))));
|
|
14551
|
-
})), /* @__PURE__ */ React135.createElement(Box, {
|
|
14552
|
-
alignItems: "center",
|
|
13161
|
+
justifyContent: "space-between"
|
|
13162
|
+
}, /* @__PURE__ */ React121.createElement(Box, {
|
|
13163
|
+
style: { width: 80, height: 80 }
|
|
13164
|
+
}, /* @__PURE__ */ React121.createElement(AsyncImage, {
|
|
13165
|
+
background: appConfig.logoBackground,
|
|
13166
|
+
borderRadius: "menuButton",
|
|
13167
|
+
src: appConfig.logoSrc,
|
|
13168
|
+
width: 80,
|
|
13169
|
+
height: 80
|
|
13170
|
+
})), /* @__PURE__ */ React121.createElement(LinkItem, null), /* @__PURE__ */ React121.createElement(Box, {
|
|
13171
|
+
style: { width: 80, height: 80 }
|
|
13172
|
+
}, /* @__PURE__ */ React121.createElement(AsyncImage, {
|
|
13173
|
+
background: iconBackground,
|
|
13174
|
+
borderRadius: "menuButton",
|
|
13175
|
+
src: iconUrl,
|
|
13176
|
+
width: 80,
|
|
13177
|
+
height: 80
|
|
13178
|
+
}))), /* @__PURE__ */ React121.createElement(Box, {
|
|
13179
|
+
id: "link-text",
|
|
14553
13180
|
display: "flex",
|
|
14554
13181
|
flexDirection: "column",
|
|
14555
|
-
gap: "
|
|
14556
|
-
|
|
14557
|
-
marginBottom: "16"
|
|
14558
|
-
}, /* @__PURE__ */ React135.createElement(ActionButton, {
|
|
14559
|
-
label: i18n2.t("get_instructions.desktop.connect.label"),
|
|
14560
|
-
onClick: () => connectWallet(wallet)
|
|
14561
|
-
}), /* @__PURE__ */ React135.createElement(Box, {
|
|
14562
|
-
as: "a",
|
|
14563
|
-
className: touchableStyles({ active: "shrink", hover: "grow" }),
|
|
14564
|
-
display: "block",
|
|
14565
|
-
href: (_d = (_c = wallet == null ? void 0 : wallet.desktop) == null ? void 0 : _c.instructions) == null ? void 0 : _d.learnMoreUrl,
|
|
14566
|
-
paddingX: "12",
|
|
14567
|
-
paddingY: "4",
|
|
14568
|
-
rel: "noreferrer",
|
|
14569
|
-
style: { willChange: "transform" },
|
|
14570
|
-
target: "_blank",
|
|
14571
|
-
transition: "default"
|
|
14572
|
-
}, /* @__PURE__ */ React135.createElement(Text, {
|
|
13182
|
+
gap: "10"
|
|
13183
|
+
}, /* @__PURE__ */ React121.createElement(Text, {
|
|
14573
13184
|
color: "accentColor",
|
|
14574
|
-
|
|
14575
|
-
|
|
14576
|
-
},
|
|
13185
|
+
weight: "semibold",
|
|
13186
|
+
size: "18"
|
|
13187
|
+
}, "Connecting to ", name, "..."), /* @__PURE__ */ React121.createElement(Text, {
|
|
13188
|
+
color: "modalTextSecondary",
|
|
13189
|
+
weight: "medium",
|
|
13190
|
+
size: "14"
|
|
13191
|
+
}, "Approve the ", appConfig.name, " application to execute transactions seamlessly."))) : null))));
|
|
14577
13192
|
}
|
|
14578
13193
|
|
|
14579
13194
|
// src/components/FunConnectOptions/FunWeb3ConnectingStep.tsx
|
|
@@ -14583,8 +13198,8 @@ function FunWeb3ConnectingStep({
|
|
|
14583
13198
|
selectedWallet,
|
|
14584
13199
|
qrCodeUri
|
|
14585
13200
|
}) {
|
|
14586
|
-
const [animateOut, setAnimateOut] =
|
|
14587
|
-
return /* @__PURE__ */
|
|
13201
|
+
const [animateOut, setAnimateOut] = React122.useState(false);
|
|
13202
|
+
return /* @__PURE__ */ React122.createElement(Box, null, /* @__PURE__ */ React122.createElement(FunModalTitleSection, {
|
|
14588
13203
|
title: "Connect Wallet",
|
|
14589
13204
|
hasBackButton: true,
|
|
14590
13205
|
onBack: () => {
|
|
@@ -14596,27 +13211,23 @@ function FunWeb3ConnectingStep({
|
|
|
14596
13211
|
backAnimation: animateOut,
|
|
14597
13212
|
hasCloseButton: true,
|
|
14598
13213
|
onClose
|
|
14599
|
-
}), selectedWallet ? /* @__PURE__ */
|
|
13214
|
+
}), selectedWallet ? /* @__PURE__ */ React122.createElement(Box, {
|
|
14600
13215
|
display: "flex",
|
|
14601
13216
|
flexDirection: "column",
|
|
14602
13217
|
paddingY: "20",
|
|
14603
13218
|
gap: "24",
|
|
14604
13219
|
className: animateOut ? animateContentOutClass : animateContentInClass
|
|
14605
|
-
}, /* @__PURE__ */
|
|
14606
|
-
changeWalletStep: () => void 0,
|
|
13220
|
+
}, /* @__PURE__ */ React122.createElement(ConnectDetail, {
|
|
14607
13221
|
compactModeEnabled: true,
|
|
14608
13222
|
qrCodeUri,
|
|
14609
|
-
|
|
14610
|
-
|
|
14611
|
-
connectionError: false,
|
|
14612
|
-
reconnect: () => void 0
|
|
14613
|
-
}), /* @__PURE__ */ React136.createElement(FunButton, {
|
|
13223
|
+
wallet: selectedWallet
|
|
13224
|
+
}), /* @__PURE__ */ React122.createElement(FunButton, {
|
|
14614
13225
|
isDisabled: true,
|
|
14615
|
-
titleSuffix: /* @__PURE__ */
|
|
13226
|
+
titleSuffix: /* @__PURE__ */ React122.createElement(Box, {
|
|
14616
13227
|
display: "flex",
|
|
14617
13228
|
alignItems: "center",
|
|
14618
13229
|
color: "modalText"
|
|
14619
|
-
}, /* @__PURE__ */
|
|
13230
|
+
}, /* @__PURE__ */ React122.createElement(SpinnerIcon, {
|
|
14620
13231
|
height: 21,
|
|
14621
13232
|
width: 21
|
|
14622
13233
|
})),
|
|
@@ -14626,13 +13237,13 @@ function FunWeb3ConnectingStep({
|
|
|
14626
13237
|
|
|
14627
13238
|
// src/components/FunConnectOptions/FunConnectOptions.tsx
|
|
14628
13239
|
function FunConnectOptions({ onClose }) {
|
|
14629
|
-
const [step, setStep] =
|
|
14630
|
-
const [selectedWallet, setSelectedWallet] =
|
|
14631
|
-
const [qrCodeUri, setQrCodeUri] =
|
|
14632
|
-
const [emailInput, setEmailInput] =
|
|
14633
|
-
const [otpInput, setOtpInput] =
|
|
14634
|
-
const [farcasterUri, setFarcasterUri] =
|
|
14635
|
-
const [farcasterToken, setFarcasterToken] =
|
|
13240
|
+
const [step, setStep] = useState37(0 /* SIGNIN */);
|
|
13241
|
+
const [selectedWallet, setSelectedWallet] = useState37();
|
|
13242
|
+
const [qrCodeUri, setQrCodeUri] = useState37("");
|
|
13243
|
+
const [emailInput, setEmailInput] = useState37("");
|
|
13244
|
+
const [otpInput, setOtpInput] = useState37("");
|
|
13245
|
+
const [farcasterUri, setFarcasterUri] = useState37("");
|
|
13246
|
+
const [farcasterToken, setFarcasterToken] = useState37("");
|
|
14636
13247
|
const changeStep = (newStep) => {
|
|
14637
13248
|
setStep(newStep);
|
|
14638
13249
|
if (newStep === 0 /* SIGNIN */) {
|
|
@@ -14650,17 +13261,17 @@ function FunConnectOptions({ onClose }) {
|
|
|
14650
13261
|
});
|
|
14651
13262
|
}
|
|
14652
13263
|
}, []);
|
|
14653
|
-
return /* @__PURE__ */
|
|
13264
|
+
return /* @__PURE__ */ React123.createElement(Box, {
|
|
14654
13265
|
display: "flex",
|
|
14655
13266
|
flexDirection: "row"
|
|
14656
|
-
}, /* @__PURE__ */
|
|
14657
|
-
className: sidebarCompactMode,
|
|
13267
|
+
}, /* @__PURE__ */ React123.createElement(Box, {
|
|
14658
13268
|
display: "flex",
|
|
14659
13269
|
flexDirection: "column",
|
|
14660
13270
|
marginTop: "16",
|
|
14661
13271
|
paddingX: "20",
|
|
13272
|
+
minWidth: "full",
|
|
14662
13273
|
width: "full"
|
|
14663
|
-
}, step === 0 /* SIGNIN */ ? /* @__PURE__ */
|
|
13274
|
+
}, step === 0 /* SIGNIN */ ? /* @__PURE__ */ React123.createElement(FunSignInStep, {
|
|
14664
13275
|
emailInput,
|
|
14665
13276
|
setEmailInput,
|
|
14666
13277
|
onClose,
|
|
@@ -14673,24 +13284,24 @@ function FunConnectOptions({ onClose }) {
|
|
|
14673
13284
|
setFarcasterUri(connectUri);
|
|
14674
13285
|
changeStep(3 /* PENDING_FARCASTER */);
|
|
14675
13286
|
}
|
|
14676
|
-
}) : step === 2 /* PENDING_WALLET */ ? /* @__PURE__ */
|
|
13287
|
+
}) : step === 2 /* PENDING_WALLET */ ? /* @__PURE__ */ React123.createElement(FunWeb3ConnectingStep, {
|
|
14677
13288
|
onClose,
|
|
14678
13289
|
changeStep,
|
|
14679
13290
|
selectedWallet,
|
|
14680
13291
|
qrCodeUri
|
|
14681
|
-
}) : step === 1 /* PENDING_EMAIL */ ? /* @__PURE__ */
|
|
13292
|
+
}) : step === 1 /* PENDING_EMAIL */ ? /* @__PURE__ */ React123.createElement(FunWeb2ConnectingStep, {
|
|
14682
13293
|
emailInput,
|
|
14683
13294
|
otpInput,
|
|
14684
13295
|
setOtpInput,
|
|
14685
13296
|
onClose,
|
|
14686
13297
|
onBack: () => changeStep(0 /* SIGNIN */),
|
|
14687
13298
|
setSelectedWallet
|
|
14688
|
-
}) : step === 3 /* PENDING_FARCASTER */ ? /* @__PURE__ */
|
|
13299
|
+
}) : step === 3 /* PENDING_FARCASTER */ ? /* @__PURE__ */ React123.createElement(FunFarcasterConnectingStep, {
|
|
14689
13300
|
farcasterUri,
|
|
14690
13301
|
farcasterToken,
|
|
14691
13302
|
changeStep,
|
|
14692
13303
|
onClose
|
|
14693
|
-
}) : step === 4 /* ERROR */ ? /* @__PURE__ */
|
|
13304
|
+
}) : step === 4 /* ERROR */ ? /* @__PURE__ */ React123.createElement(FunConnectErrorStep, {
|
|
14694
13305
|
title: "Connection Failed",
|
|
14695
13306
|
onBack: () => changeStep(0 /* SIGNIN */),
|
|
14696
13307
|
onClose,
|
|
@@ -14710,16 +13321,81 @@ function FunConnectOptions({ onClose }) {
|
|
|
14710
13321
|
}
|
|
14711
13322
|
|
|
14712
13323
|
// src/components/SignIn/SignIn.tsx
|
|
14713
|
-
import
|
|
13324
|
+
import React125, { useCallback as useCallback29, useContext as useContext21, useRef as useRef10 } from "react";
|
|
14714
13325
|
import { UserRejectedRequestError } from "viem";
|
|
14715
13326
|
import { useAccount as useAccount9, useSignMessage } from "wagmi";
|
|
13327
|
+
|
|
13328
|
+
// src/components/Button/ActionButton.tsx
|
|
13329
|
+
import React124 from "react";
|
|
13330
|
+
var sizeVariants = {
|
|
13331
|
+
large: {
|
|
13332
|
+
fontSize: "16",
|
|
13333
|
+
paddingX: "24",
|
|
13334
|
+
paddingY: "10"
|
|
13335
|
+
},
|
|
13336
|
+
medium: {
|
|
13337
|
+
fontSize: "14",
|
|
13338
|
+
height: "28",
|
|
13339
|
+
paddingX: "12",
|
|
13340
|
+
paddingY: "4"
|
|
13341
|
+
},
|
|
13342
|
+
small: {
|
|
13343
|
+
fontSize: "14",
|
|
13344
|
+
paddingX: "10",
|
|
13345
|
+
paddingY: "5"
|
|
13346
|
+
}
|
|
13347
|
+
};
|
|
13348
|
+
function ActionButton({
|
|
13349
|
+
disabled = false,
|
|
13350
|
+
href,
|
|
13351
|
+
label,
|
|
13352
|
+
onClick,
|
|
13353
|
+
rel = "noreferrer noopener",
|
|
13354
|
+
size = "medium",
|
|
13355
|
+
target = "_blank",
|
|
13356
|
+
testId,
|
|
13357
|
+
type = "primary"
|
|
13358
|
+
}) {
|
|
13359
|
+
const isPrimary = type === "primary";
|
|
13360
|
+
const isNotLarge = size !== "large";
|
|
13361
|
+
const mobile = isMobile();
|
|
13362
|
+
const background = !disabled ? isPrimary ? "accentColor" : isNotLarge ? "actionButtonSecondaryBackground" : null : "actionButtonSecondaryBackground";
|
|
13363
|
+
const { fontSize, height, paddingX, paddingY } = sizeVariants[size];
|
|
13364
|
+
const hasBorder = !mobile || !isNotLarge;
|
|
13365
|
+
return /* @__PURE__ */ React124.createElement(Box, {
|
|
13366
|
+
...href ? !disabled ? { as: "a", href, rel, target } : {} : { as: "button", type: "button" },
|
|
13367
|
+
onClick: !disabled ? onClick : void 0,
|
|
13368
|
+
...hasBorder ? {
|
|
13369
|
+
borderColor: mobile && !isNotLarge && !isPrimary ? "actionButtonBorderMobile" : "actionButtonBorder",
|
|
13370
|
+
borderStyle: "solid",
|
|
13371
|
+
borderWidth: "1"
|
|
13372
|
+
} : {},
|
|
13373
|
+
borderRadius: "actionButton",
|
|
13374
|
+
className: !disabled && touchableStyles({ active: "shrinkSm", hover: "grow" }),
|
|
13375
|
+
display: "block",
|
|
13376
|
+
paddingX,
|
|
13377
|
+
paddingY,
|
|
13378
|
+
style: { willChange: "transform" },
|
|
13379
|
+
testId,
|
|
13380
|
+
textAlign: "center",
|
|
13381
|
+
transition: "transform",
|
|
13382
|
+
...background ? { background } : {},
|
|
13383
|
+
...height ? { height } : {}
|
|
13384
|
+
}, /* @__PURE__ */ React124.createElement(Text, {
|
|
13385
|
+
color: !disabled ? isPrimary ? "accentColorForeground" : "accentColor" : "modalTextSecondary",
|
|
13386
|
+
size: fontSize,
|
|
13387
|
+
weight: "bold"
|
|
13388
|
+
}, label));
|
|
13389
|
+
}
|
|
13390
|
+
|
|
13391
|
+
// src/components/SignIn/SignIn.tsx
|
|
14716
13392
|
var signInIcon = async () => (await import("./sign-FZVB2CS6.js")).default;
|
|
14717
13393
|
function SignIn({
|
|
14718
13394
|
onClose,
|
|
14719
13395
|
onCloseModal
|
|
14720
13396
|
}) {
|
|
14721
|
-
const { i18n: i18n2 } =
|
|
14722
|
-
const [{ status, ...state }, setState] =
|
|
13397
|
+
const { i18n: i18n2 } = useContext21(I18nContext);
|
|
13398
|
+
const [{ status, ...state }, setState] = React125.useState({ status: "idle" });
|
|
14723
13399
|
const authAdapter = useAuthenticationAdapter();
|
|
14724
13400
|
const getNonce = useCallback29(async () => {
|
|
14725
13401
|
try {
|
|
@@ -14733,8 +13409,8 @@ function SignIn({
|
|
|
14733
13409
|
}));
|
|
14734
13410
|
}
|
|
14735
13411
|
}, [authAdapter, i18n2]);
|
|
14736
|
-
const onceRef =
|
|
14737
|
-
|
|
13412
|
+
const onceRef = useRef10(false);
|
|
13413
|
+
React125.useEffect(() => {
|
|
14738
13414
|
if (onceRef.current)
|
|
14739
13415
|
return;
|
|
14740
13416
|
onceRef.current = true;
|
|
@@ -14796,17 +13472,17 @@ function SignIn({
|
|
|
14796
13472
|
});
|
|
14797
13473
|
}
|
|
14798
13474
|
};
|
|
14799
|
-
return /* @__PURE__ */
|
|
13475
|
+
return /* @__PURE__ */ React125.createElement(Box, {
|
|
14800
13476
|
position: "relative"
|
|
14801
|
-
}, /* @__PURE__ */
|
|
13477
|
+
}, /* @__PURE__ */ React125.createElement(Box, {
|
|
14802
13478
|
display: "flex",
|
|
14803
13479
|
paddingRight: "16",
|
|
14804
13480
|
paddingTop: "16",
|
|
14805
13481
|
position: "absolute",
|
|
14806
13482
|
right: "0"
|
|
14807
|
-
}, /* @__PURE__ */
|
|
13483
|
+
}, /* @__PURE__ */ React125.createElement(CloseButton, {
|
|
14808
13484
|
onClose
|
|
14809
|
-
})), /* @__PURE__ */
|
|
13485
|
+
})), /* @__PURE__ */ React125.createElement(Box, {
|
|
14810
13486
|
alignItems: "center",
|
|
14811
13487
|
display: "flex",
|
|
14812
13488
|
flexDirection: "column",
|
|
@@ -14814,58 +13490,58 @@ function SignIn({
|
|
|
14814
13490
|
padding: "24",
|
|
14815
13491
|
paddingX: "18",
|
|
14816
13492
|
style: { paddingTop: mobile ? "60px" : "36px" }
|
|
14817
|
-
}, /* @__PURE__ */
|
|
13493
|
+
}, /* @__PURE__ */ React125.createElement(Box, {
|
|
14818
13494
|
alignItems: "center",
|
|
14819
13495
|
display: "flex",
|
|
14820
13496
|
flexDirection: "column",
|
|
14821
13497
|
gap: mobile ? "6" : "4",
|
|
14822
13498
|
style: { maxWidth: mobile ? 320 : 280 }
|
|
14823
|
-
}, /* @__PURE__ */
|
|
13499
|
+
}, /* @__PURE__ */ React125.createElement(Box, {
|
|
14824
13500
|
alignItems: "center",
|
|
14825
13501
|
display: "flex",
|
|
14826
13502
|
flexDirection: "column",
|
|
14827
13503
|
gap: mobile ? "32" : "16"
|
|
14828
|
-
}, /* @__PURE__ */
|
|
13504
|
+
}, /* @__PURE__ */ React125.createElement(AsyncImage, {
|
|
14829
13505
|
height: 40,
|
|
14830
13506
|
src: signInIcon,
|
|
14831
13507
|
width: 40
|
|
14832
|
-
}), /* @__PURE__ */
|
|
13508
|
+
}), /* @__PURE__ */ React125.createElement(Text, {
|
|
14833
13509
|
color: "modalText",
|
|
14834
13510
|
size: mobile ? "20" : "18",
|
|
14835
13511
|
textAlign: "center",
|
|
14836
13512
|
weight: "heavy"
|
|
14837
|
-
}, i18n2.t("sign_in.label"))), /* @__PURE__ */
|
|
13513
|
+
}, i18n2.t("sign_in.label"))), /* @__PURE__ */ React125.createElement(Box, {
|
|
14838
13514
|
alignItems: "center",
|
|
14839
13515
|
display: "flex",
|
|
14840
13516
|
flexDirection: "column",
|
|
14841
13517
|
gap: mobile ? "16" : "12"
|
|
14842
|
-
}, /* @__PURE__ */
|
|
13518
|
+
}, /* @__PURE__ */ React125.createElement(Text, {
|
|
14843
13519
|
color: "modalTextSecondary",
|
|
14844
13520
|
size: mobile ? "16" : "14",
|
|
14845
13521
|
textAlign: "center"
|
|
14846
|
-
}, i18n2.t("sign_in.description")), status === "idle" && state.errorMessage ? /* @__PURE__ */
|
|
13522
|
+
}, i18n2.t("sign_in.description")), status === "idle" && state.errorMessage ? /* @__PURE__ */ React125.createElement(Text, {
|
|
14847
13523
|
color: "error",
|
|
14848
13524
|
size: mobile ? "16" : "14",
|
|
14849
13525
|
textAlign: "center",
|
|
14850
13526
|
weight: "bold"
|
|
14851
|
-
}, state.errorMessage) : null)), /* @__PURE__ */
|
|
13527
|
+
}, state.errorMessage) : null)), /* @__PURE__ */ React125.createElement(Box, {
|
|
14852
13528
|
alignItems: !mobile ? "center" : void 0,
|
|
14853
13529
|
display: "flex",
|
|
14854
13530
|
flexDirection: "column",
|
|
14855
13531
|
gap: "8",
|
|
14856
13532
|
width: "full"
|
|
14857
|
-
}, /* @__PURE__ */
|
|
13533
|
+
}, /* @__PURE__ */ React125.createElement(ActionButton, {
|
|
14858
13534
|
disabled: !state.nonce || status === "signing" || status === "verifying",
|
|
14859
13535
|
label: !state.nonce ? i18n2.t("sign_in.message.preparing") : status === "signing" ? i18n2.t("sign_in.signature.waiting") : status === "verifying" ? i18n2.t("sign_in.signature.verifying") : i18n2.t("sign_in.message.send"),
|
|
14860
13536
|
onClick: signIn,
|
|
14861
13537
|
size: mobile ? "large" : "medium",
|
|
14862
13538
|
testId: "auth-message-button"
|
|
14863
|
-
}), mobile ? /* @__PURE__ */
|
|
13539
|
+
}), mobile ? /* @__PURE__ */ React125.createElement(ActionButton, {
|
|
14864
13540
|
label: "Cancel",
|
|
14865
13541
|
onClick: onClose,
|
|
14866
13542
|
size: "large",
|
|
14867
13543
|
type: "secondary"
|
|
14868
|
-
}) : /* @__PURE__ */
|
|
13544
|
+
}) : /* @__PURE__ */ React125.createElement(Box, {
|
|
14869
13545
|
as: "button",
|
|
14870
13546
|
borderRadius: "full",
|
|
14871
13547
|
className: touchableStyles({ active: "shrink", hover: "grow" }),
|
|
@@ -14877,7 +13553,7 @@ function SignIn({
|
|
|
14877
13553
|
style: { willChange: "transform" },
|
|
14878
13554
|
target: "_blank",
|
|
14879
13555
|
transition: "default"
|
|
14880
|
-
}, /* @__PURE__ */
|
|
13556
|
+
}, /* @__PURE__ */ React125.createElement(Text, {
|
|
14881
13557
|
color: "closeButton",
|
|
14882
13558
|
size: mobile ? "16" : "14",
|
|
14883
13559
|
weight: "bold"
|
|
@@ -14890,38 +13566,38 @@ function ConnectModal({ onClose, open }) {
|
|
|
14890
13566
|
const connectionStatus = useConnectionStatus();
|
|
14891
13567
|
const { disconnect } = useDisconnect2();
|
|
14892
13568
|
const { isConnecting } = useAccount10();
|
|
14893
|
-
const onAuthCancel =
|
|
13569
|
+
const onAuthCancel = React126.useCallback(() => {
|
|
14894
13570
|
onClose();
|
|
14895
13571
|
disconnect();
|
|
14896
13572
|
}, [onClose, disconnect]);
|
|
14897
|
-
const onConnectModalCancel =
|
|
13573
|
+
const onConnectModalCancel = React126.useCallback(() => {
|
|
14898
13574
|
if (isConnecting)
|
|
14899
13575
|
disconnect();
|
|
14900
13576
|
onClose();
|
|
14901
13577
|
}, [onClose, disconnect, isConnecting]);
|
|
14902
13578
|
if (connectionStatus === "disconnected" || connectionStatus === "loading") {
|
|
14903
|
-
return /* @__PURE__ */
|
|
13579
|
+
return /* @__PURE__ */ React126.createElement(Dialog, {
|
|
14904
13580
|
onClose: onConnectModalCancel,
|
|
14905
13581
|
open,
|
|
14906
13582
|
titleId,
|
|
14907
13583
|
isSmartCloseable: true
|
|
14908
|
-
}, /* @__PURE__ */
|
|
13584
|
+
}, /* @__PURE__ */ React126.createElement(DialogContent, {
|
|
14909
13585
|
bottomSheetOnMobile: true,
|
|
14910
13586
|
padding: "0"
|
|
14911
|
-
}, /* @__PURE__ */
|
|
13587
|
+
}, /* @__PURE__ */ React126.createElement(FunConnectOptions, {
|
|
14912
13588
|
onClose: onConnectModalCancel
|
|
14913
13589
|
})));
|
|
14914
13590
|
}
|
|
14915
13591
|
if (connectionStatus === "unauthenticated") {
|
|
14916
|
-
return /* @__PURE__ */
|
|
13592
|
+
return /* @__PURE__ */ React126.createElement(Dialog, {
|
|
14917
13593
|
onClose: onAuthCancel,
|
|
14918
13594
|
open,
|
|
14919
13595
|
titleId,
|
|
14920
13596
|
isSmartCloseable: true
|
|
14921
|
-
}, /* @__PURE__ */
|
|
13597
|
+
}, /* @__PURE__ */ React126.createElement(DialogContent, {
|
|
14922
13598
|
bottomSheetOnMobile: true,
|
|
14923
13599
|
padding: "0"
|
|
14924
|
-
}, /* @__PURE__ */
|
|
13600
|
+
}, /* @__PURE__ */ React126.createElement(SignIn, {
|
|
14925
13601
|
onClose: onAuthCancel,
|
|
14926
13602
|
onCloseModal: onClose
|
|
14927
13603
|
})));
|
|
@@ -14930,7 +13606,7 @@ function ConnectModal({ onClose, open }) {
|
|
|
14930
13606
|
}
|
|
14931
13607
|
|
|
14932
13608
|
// src/components/FunCheckoutHistoryModal/FunCheckoutHistoryModal.tsx
|
|
14933
|
-
import
|
|
13609
|
+
import React127 from "react";
|
|
14934
13610
|
function FunCheckoutHistoryModal({
|
|
14935
13611
|
onClose,
|
|
14936
13612
|
open,
|
|
@@ -14942,17 +13618,17 @@ function FunCheckoutHistoryModal({
|
|
|
14942
13618
|
"Unable to open checkout history modal without a depositAddress"
|
|
14943
13619
|
);
|
|
14944
13620
|
}
|
|
14945
|
-
return /* @__PURE__ */
|
|
13621
|
+
return /* @__PURE__ */ React127.createElement(Dialog, {
|
|
14946
13622
|
open,
|
|
14947
13623
|
onClose,
|
|
14948
13624
|
titleId: "fun-checkout-history-modal"
|
|
14949
|
-
}, /* @__PURE__ */
|
|
13625
|
+
}, /* @__PURE__ */ React127.createElement(DialogContent, {
|
|
14950
13626
|
bottomSheetOnMobile: true,
|
|
14951
13627
|
padding: "0"
|
|
14952
|
-
}, /* @__PURE__ */
|
|
13628
|
+
}, /* @__PURE__ */ React127.createElement(Box, {
|
|
14953
13629
|
paddingTop: "20",
|
|
14954
13630
|
paddingX: "20"
|
|
14955
|
-
}, /* @__PURE__ */
|
|
13631
|
+
}, /* @__PURE__ */ React127.createElement(FunCheckoutHistoryContent, {
|
|
14956
13632
|
depositAddress,
|
|
14957
13633
|
initialPage,
|
|
14958
13634
|
onClose,
|
|
@@ -14961,20 +13637,20 @@ function FunCheckoutHistoryModal({
|
|
|
14961
13637
|
}
|
|
14962
13638
|
|
|
14963
13639
|
// src/components/FunDevTestModal/FunDevTestModal.tsx
|
|
14964
|
-
import
|
|
13640
|
+
import React128 from "react";
|
|
14965
13641
|
function FunDevTestModal({ onClose, open }) {
|
|
14966
|
-
return /* @__PURE__ */
|
|
13642
|
+
return /* @__PURE__ */ React128.createElement(Dialog, {
|
|
14967
13643
|
onClose,
|
|
14968
13644
|
open,
|
|
14969
13645
|
titleId: "dev/test modal"
|
|
14970
|
-
}, /* @__PURE__ */
|
|
13646
|
+
}, /* @__PURE__ */ React128.createElement(DialogContent, {
|
|
14971
13647
|
bottomSheetOnMobile: true
|
|
14972
|
-
}, /* @__PURE__ */
|
|
13648
|
+
}, /* @__PURE__ */ React128.createElement(Box, null)));
|
|
14973
13649
|
}
|
|
14974
13650
|
|
|
14975
13651
|
// src/components/FunkitProvider/ModalContext.tsx
|
|
14976
13652
|
function useModalStateValue() {
|
|
14977
|
-
const [isModalOpen, setModalOpen] =
|
|
13653
|
+
const [isModalOpen, setModalOpen] = useState38(false);
|
|
14978
13654
|
return {
|
|
14979
13655
|
closeModal: useCallback30(() => setModalOpen(false), []),
|
|
14980
13656
|
isModalOpen,
|
|
@@ -14982,8 +13658,8 @@ function useModalStateValue() {
|
|
|
14982
13658
|
};
|
|
14983
13659
|
}
|
|
14984
13660
|
function useModalStateValueWithId() {
|
|
14985
|
-
const [isModalOpen, setModalOpen] =
|
|
14986
|
-
const [modalId, setModalId] =
|
|
13661
|
+
const [isModalOpen, setModalOpen] = useState38(false);
|
|
13662
|
+
const [modalId, setModalId] = useState38(null);
|
|
14987
13663
|
return {
|
|
14988
13664
|
closeModal: useCallback30(() => {
|
|
14989
13665
|
setModalId(null);
|
|
@@ -14997,7 +13673,7 @@ function useModalStateValueWithId() {
|
|
|
14997
13673
|
}, [])
|
|
14998
13674
|
};
|
|
14999
13675
|
}
|
|
15000
|
-
var ModalContext =
|
|
13676
|
+
var ModalContext = createContext17({
|
|
15001
13677
|
accountModalOpen: false,
|
|
15002
13678
|
chainModalOpen: false,
|
|
15003
13679
|
connectModalOpen: false,
|
|
@@ -15024,7 +13700,7 @@ function ModalProvider({ children }) {
|
|
|
15024
13700
|
isModalOpen: chainModalOpen,
|
|
15025
13701
|
openModal: openChainModal
|
|
15026
13702
|
} = useModalStateValue();
|
|
15027
|
-
const [isWalletConnectModalOpen, setIsWalletConnectModalOpen] =
|
|
13703
|
+
const [isWalletConnectModalOpen, setIsWalletConnectModalOpen] = useState38(false);
|
|
15028
13704
|
const {
|
|
15029
13705
|
closeModal: closeFunCheckoutModal,
|
|
15030
13706
|
isModalOpen: funCheckoutModalOpen,
|
|
@@ -15062,11 +13738,11 @@ function ModalProvider({ children }) {
|
|
|
15062
13738
|
onConnect: () => closeModals({ keepConnectModalOpen: isUnauthenticated }),
|
|
15063
13739
|
onDisconnect: () => closeModals()
|
|
15064
13740
|
});
|
|
15065
|
-
|
|
13741
|
+
useEffect29(() => {
|
|
15066
13742
|
if (isUnauthenticated)
|
|
15067
13743
|
closeModals();
|
|
15068
13744
|
}, [isUnauthenticated]);
|
|
15069
|
-
return /* @__PURE__ */
|
|
13745
|
+
return /* @__PURE__ */ React129.createElement(ModalContext.Provider, {
|
|
15070
13746
|
value: useMemo34(
|
|
15071
13747
|
() => ({
|
|
15072
13748
|
accountModalOpen,
|
|
@@ -15106,21 +13782,21 @@ function ModalProvider({ children }) {
|
|
|
15106
13782
|
openFunDevTestModal
|
|
15107
13783
|
]
|
|
15108
13784
|
)
|
|
15109
|
-
}, children, /* @__PURE__ */
|
|
13785
|
+
}, children, /* @__PURE__ */ React129.createElement(ConnectModal, {
|
|
15110
13786
|
onClose: closeConnectModal,
|
|
15111
13787
|
open: connectModalOpen
|
|
15112
|
-
}), /* @__PURE__ */
|
|
13788
|
+
}), /* @__PURE__ */ React129.createElement(AccountModal, {
|
|
15113
13789
|
onClose: closeAccountModal,
|
|
15114
13790
|
open: accountModalOpen
|
|
15115
|
-
}), /* @__PURE__ */
|
|
13791
|
+
}), /* @__PURE__ */ React129.createElement(ChainModal, {
|
|
15116
13792
|
onClose: closeChainModal,
|
|
15117
13793
|
open: chainModalOpen
|
|
15118
|
-
}), /* @__PURE__ */
|
|
13794
|
+
}), /* @__PURE__ */ React129.createElement(FunCheckoutModal, {
|
|
15119
13795
|
onClose: closeFunCheckoutModal,
|
|
15120
13796
|
open: funCheckoutModalOpen,
|
|
15121
13797
|
checkoutId: funCheckoutModalId,
|
|
15122
13798
|
key: funCheckoutModalId
|
|
15123
|
-
}), depositAddressInitialPageCombined ? /* @__PURE__ */
|
|
13799
|
+
}), depositAddressInitialPageCombined ? /* @__PURE__ */ React129.createElement(FunCheckoutHistoryModal, {
|
|
15124
13800
|
onClose: closeFunCheckoutHistoryModal,
|
|
15125
13801
|
open: funCheckoutHistoryModalOpen,
|
|
15126
13802
|
depositAddress: deconstructDepositAddressAndInitialPage(
|
|
@@ -15129,13 +13805,13 @@ function ModalProvider({ children }) {
|
|
|
15129
13805
|
initialPage: deconstructDepositAddressAndInitialPage(
|
|
15130
13806
|
depositAddressInitialPageCombined
|
|
15131
13807
|
).initialPage
|
|
15132
|
-
}) : null, /* @__PURE__ */
|
|
13808
|
+
}) : null, /* @__PURE__ */ React129.createElement(FunDevTestModal, {
|
|
15133
13809
|
onClose: closeFunDevTestModal,
|
|
15134
13810
|
open: funDevTestModalOpen
|
|
15135
13811
|
}));
|
|
15136
13812
|
}
|
|
15137
13813
|
function useModalState() {
|
|
15138
|
-
const { accountModalOpen, chainModalOpen, connectModalOpen } =
|
|
13814
|
+
const { accountModalOpen, chainModalOpen, connectModalOpen } = useContext22(ModalContext);
|
|
15139
13815
|
return {
|
|
15140
13816
|
accountModalOpen,
|
|
15141
13817
|
chainModalOpen,
|
|
@@ -15143,19 +13819,19 @@ function useModalState() {
|
|
|
15143
13819
|
};
|
|
15144
13820
|
}
|
|
15145
13821
|
function useAccountModal() {
|
|
15146
|
-
const { accountModalOpen, openAccountModal } =
|
|
13822
|
+
const { accountModalOpen, openAccountModal } = useContext22(ModalContext);
|
|
15147
13823
|
return { accountModalOpen, openAccountModal };
|
|
15148
13824
|
}
|
|
15149
13825
|
function useChainModal() {
|
|
15150
|
-
const { chainModalOpen, openChainModal } =
|
|
13826
|
+
const { chainModalOpen, openChainModal } = useContext22(ModalContext);
|
|
15151
13827
|
return { chainModalOpen, openChainModal };
|
|
15152
13828
|
}
|
|
15153
13829
|
function useWalletConnectOpenState() {
|
|
15154
|
-
const { isWalletConnectModalOpen, setIsWalletConnectModalOpen } =
|
|
13830
|
+
const { isWalletConnectModalOpen, setIsWalletConnectModalOpen } = useContext22(ModalContext);
|
|
15155
13831
|
return { isWalletConnectModalOpen, setIsWalletConnectModalOpen };
|
|
15156
13832
|
}
|
|
15157
13833
|
function useConnectModal() {
|
|
15158
|
-
const { connectModalOpen, openConnectModal } =
|
|
13834
|
+
const { connectModalOpen, openConnectModal } = useContext22(ModalContext);
|
|
15159
13835
|
const { isWalletConnectModalOpen } = useWalletConnectOpenState();
|
|
15160
13836
|
return {
|
|
15161
13837
|
connectModalOpen: connectModalOpen || isWalletConnectModalOpen,
|
|
@@ -15163,11 +13839,11 @@ function useConnectModal() {
|
|
|
15163
13839
|
};
|
|
15164
13840
|
}
|
|
15165
13841
|
function useFunCheckoutModal() {
|
|
15166
|
-
const { funCheckoutModalOpen, openFunCheckoutModal } =
|
|
13842
|
+
const { funCheckoutModalOpen, openFunCheckoutModal } = useContext22(ModalContext);
|
|
15167
13843
|
return { funCheckoutModalOpen, openFunCheckoutModal };
|
|
15168
13844
|
}
|
|
15169
13845
|
function useFunCheckoutHistoryModal() {
|
|
15170
|
-
const { funCheckoutHistoryModalOpen, openFunCheckoutHistoryModal } =
|
|
13846
|
+
const { funCheckoutHistoryModalOpen, openFunCheckoutHistoryModal } = useContext22(ModalContext);
|
|
15171
13847
|
return { funCheckoutHistoryModalOpen, openFunCheckoutHistoryModal };
|
|
15172
13848
|
}
|
|
15173
13849
|
|
|
@@ -15211,7 +13887,7 @@ var isFunkitSdkConnector = (wallet) => {
|
|
|
15211
13887
|
};
|
|
15212
13888
|
var isEIP6963Connector = (wallet) => {
|
|
15213
13889
|
var _a;
|
|
15214
|
-
return !!(!wallet.isFunkitSdkConnector && ((_a = wallet.icon) == null ? void 0 : _a.startsWith("data:image")) && wallet.uid && wallet.name);
|
|
13890
|
+
return !!(!wallet.isFunkitSdkConnector && ((_a = wallet.icon) == null ? void 0 : _a.replace(/\n/g, "").startsWith("data:image")) && wallet.uid && wallet.name);
|
|
15215
13891
|
};
|
|
15216
13892
|
var rainbowKitConnectorWithWalletConnect = (wallet, walletConnectModalConnector) => {
|
|
15217
13893
|
const shouldUseWalletConnectModal = wallet.id === "walletConnect" && walletConnectModalConnector;
|
|
@@ -15395,7 +14071,7 @@ var ERROR_MESSAGES = {
|
|
|
15395
14071
|
PRIVY_USER_NOT_INITIALIZED: "Privy user not initialized",
|
|
15396
14072
|
FARCASTER_NOT_INITIALIZED: "Unable to initialize Farcaster login"
|
|
15397
14073
|
};
|
|
15398
|
-
var FunkitWeb2Context =
|
|
14074
|
+
var FunkitWeb2Context = createContext18({
|
|
15399
14075
|
isSendingOtpEmail: false,
|
|
15400
14076
|
isGeneratingFcUri: false,
|
|
15401
14077
|
handleSendOtpEmail: () => Promise.resolve({ success: false, error: "" }),
|
|
@@ -15434,15 +14110,15 @@ var FunkitWeb2Provider = ({
|
|
|
15434
14110
|
const { connectAsync } = useConnect2();
|
|
15435
14111
|
const { chains } = useConfig5();
|
|
15436
14112
|
const { connectors, disconnectAsync } = useDisconnect3();
|
|
15437
|
-
const [privy, setPrivy] =
|
|
15438
|
-
const [privyIframeUrl, setPrivyIframeUrl] =
|
|
15439
|
-
const [loginMethod, setLoginMethod] =
|
|
14113
|
+
const [privy, setPrivy] = useState39(null);
|
|
14114
|
+
const [privyIframeUrl, setPrivyIframeUrl] = useState39();
|
|
14115
|
+
const [loginMethod, setLoginMethod] = useState39(
|
|
15440
14116
|
getLoginMethodFromCache() || null
|
|
15441
14117
|
);
|
|
15442
14118
|
const wallets = useWalletConnectors();
|
|
15443
|
-
const [isLoggingIn, setIsLoggingIn] =
|
|
15444
|
-
const [loginErrorMessage, setLoginErrorMessage] =
|
|
15445
|
-
const [loggedInUser, setLoggedInUser] =
|
|
14119
|
+
const [isLoggingIn, setIsLoggingIn] = useState39(false);
|
|
14120
|
+
const [loginErrorMessage, setLoginErrorMessage] = useState39("");
|
|
14121
|
+
const [loggedInUser, setLoggedInUser] = useState39(null);
|
|
15446
14122
|
const setLoginMethodAndCache = useCallback31(
|
|
15447
14123
|
(method) => {
|
|
15448
14124
|
try {
|
|
@@ -15458,7 +14134,7 @@ var FunkitWeb2Provider = ({
|
|
|
15458
14134
|
},
|
|
15459
14135
|
[]
|
|
15460
14136
|
);
|
|
15461
|
-
|
|
14137
|
+
useEffect30(() => {
|
|
15462
14138
|
const newPrivy = new PrivyJS({
|
|
15463
14139
|
appId: funkitConfig.privyAppId,
|
|
15464
14140
|
storage: new LocalStorage(),
|
|
@@ -15660,7 +14336,7 @@ var FunkitWeb2Provider = ({
|
|
|
15660
14336
|
}
|
|
15661
14337
|
}
|
|
15662
14338
|
}, [handleFunkitWeb2Login, initChainId, loginMethod]);
|
|
15663
|
-
|
|
14339
|
+
useEffect30(() => {
|
|
15664
14340
|
if (privy && privyIframeUrl && isNotNullish(initChainId)) {
|
|
15665
14341
|
const iframe = document.getElementById(
|
|
15666
14342
|
PRIVY_IFRAME_ID
|
|
@@ -15702,7 +14378,7 @@ var FunkitWeb2Provider = ({
|
|
|
15702
14378
|
},
|
|
15703
14379
|
[privy, setLoginMethodAndCache]
|
|
15704
14380
|
);
|
|
15705
|
-
const [isSendingOtpEmail, setIsSendingOtpEmail] =
|
|
14381
|
+
const [isSendingOtpEmail, setIsSendingOtpEmail] = useState39(false);
|
|
15706
14382
|
const handleSendOtpEmail = useCallback31(
|
|
15707
14383
|
async (emailAddress) => {
|
|
15708
14384
|
try {
|
|
@@ -15730,7 +14406,7 @@ var FunkitWeb2Provider = ({
|
|
|
15730
14406
|
},
|
|
15731
14407
|
[privy, setLoginMethodAndCache]
|
|
15732
14408
|
);
|
|
15733
|
-
const [isGeneratingFcUri, setIsGeneratingFcUri] =
|
|
14409
|
+
const [isGeneratingFcUri, setIsGeneratingFcUri] = useState39(false);
|
|
15734
14410
|
const handleGenerateFcUri = useCallback31(async () => {
|
|
15735
14411
|
try {
|
|
15736
14412
|
if (!privy)
|
|
@@ -15847,15 +14523,15 @@ var FunkitWeb2Provider = ({
|
|
|
15847
14523
|
handleFunkitWeb2Logout,
|
|
15848
14524
|
web2UserInfo
|
|
15849
14525
|
};
|
|
15850
|
-
return /* @__PURE__ */
|
|
14526
|
+
return /* @__PURE__ */ React130.createElement(FunkitWeb2Context.Provider, {
|
|
15851
14527
|
value: contextValue
|
|
15852
|
-
}, privyIframeUrl ? /* @__PURE__ */
|
|
14528
|
+
}, privyIframeUrl ? /* @__PURE__ */ React130.createElement("iframe", {
|
|
15853
14529
|
id: PRIVY_IFRAME_ID,
|
|
15854
14530
|
src: privyIframeUrl,
|
|
15855
14531
|
style: { display: "none" }
|
|
15856
14532
|
}) : null, children);
|
|
15857
14533
|
};
|
|
15858
|
-
var useFunkitWeb2Login = () =>
|
|
14534
|
+
var useFunkitWeb2Login = () => useContext23(FunkitWeb2Context);
|
|
15859
14535
|
|
|
15860
14536
|
// src/hooks/useConnectionStatus.ts
|
|
15861
14537
|
function useConnectionStatus() {
|
|
@@ -15878,27 +14554,27 @@ function useConnectionStatus() {
|
|
|
15878
14554
|
}
|
|
15879
14555
|
|
|
15880
14556
|
// src/components/FunkitProvider/ShowBalanceContext.tsx
|
|
15881
|
-
import
|
|
15882
|
-
var ShowBalanceContext =
|
|
14557
|
+
import React131, { createContext as createContext19, useContext as useContext24, useState as useState40 } from "react";
|
|
14558
|
+
var ShowBalanceContext = createContext19({
|
|
15883
14559
|
showBalance: void 0,
|
|
15884
14560
|
setShowBalance: () => void 0
|
|
15885
14561
|
});
|
|
15886
14562
|
function ShowBalanceProvider({ children }) {
|
|
15887
|
-
const [showBalance, setShowBalance] =
|
|
15888
|
-
return /* @__PURE__ */
|
|
14563
|
+
const [showBalance, setShowBalance] = useState40();
|
|
14564
|
+
return /* @__PURE__ */ React131.createElement(ShowBalanceContext.Provider, {
|
|
15889
14565
|
value: { showBalance, setShowBalance }
|
|
15890
14566
|
}, children);
|
|
15891
14567
|
}
|
|
15892
|
-
var useShowBalance = () =>
|
|
14568
|
+
var useShowBalance = () => useContext24(ShowBalanceContext);
|
|
15893
14569
|
|
|
15894
14570
|
// src/components/Icons/Dropdown.tsx
|
|
15895
|
-
import
|
|
15896
|
-
var DropdownIcon = () => /* @__PURE__ */
|
|
14571
|
+
import React132 from "react";
|
|
14572
|
+
var DropdownIcon = () => /* @__PURE__ */ React132.createElement("svg", {
|
|
15897
14573
|
fill: "none",
|
|
15898
14574
|
height: "7",
|
|
15899
14575
|
width: "14",
|
|
15900
14576
|
xmlns: "http://www.w3.org/2000/svg"
|
|
15901
|
-
}, /* @__PURE__ */
|
|
14577
|
+
}, /* @__PURE__ */ React132.createElement("path", {
|
|
15902
14578
|
d: "M12.75 1.54001L8.51647 5.0038C7.77974 5.60658 6.72026 5.60658 5.98352 5.0038L1.75 1.54001",
|
|
15903
14579
|
stroke: "currentColor",
|
|
15904
14580
|
strokeLinecap: "round",
|
|
@@ -15908,14 +14584,14 @@ var DropdownIcon = () => /* @__PURE__ */ React145.createElement("svg", {
|
|
|
15908
14584
|
}));
|
|
15909
14585
|
|
|
15910
14586
|
// src/components/ConnectButton/ConnectButtonRenderer.tsx
|
|
15911
|
-
import
|
|
14587
|
+
import React134, { useContext as useContext26 } from "react";
|
|
15912
14588
|
import { useAccount as useAccount16, useBalance, useConfig as useConfig6 } from "wagmi";
|
|
15913
14589
|
|
|
15914
14590
|
// src/hooks/useIsMounted.ts
|
|
15915
|
-
import { useCallback as useCallback32, useEffect as
|
|
14591
|
+
import { useCallback as useCallback32, useEffect as useEffect31, useState as useState41 } from "react";
|
|
15916
14592
|
function useIsMounted() {
|
|
15917
|
-
const [isMounted, setIsMounted] =
|
|
15918
|
-
|
|
14593
|
+
const [isMounted, setIsMounted] = useState41(false);
|
|
14594
|
+
useEffect31(() => {
|
|
15919
14595
|
setIsMounted(true);
|
|
15920
14596
|
return () => {
|
|
15921
14597
|
setIsMounted(false);
|
|
@@ -15941,7 +14617,7 @@ function useMainnetEnsAvatar(name) {
|
|
|
15941
14617
|
}
|
|
15942
14618
|
|
|
15943
14619
|
// src/transactions/useRecentTransactions.ts
|
|
15944
|
-
import { useEffect as
|
|
14620
|
+
import { useEffect as useEffect33, useState as useState43 } from "react";
|
|
15945
14621
|
import { useAccount as useAccount15 } from "wagmi";
|
|
15946
14622
|
|
|
15947
14623
|
// src/hooks/useChainId.ts
|
|
@@ -15953,7 +14629,7 @@ function useChainId() {
|
|
|
15953
14629
|
}
|
|
15954
14630
|
|
|
15955
14631
|
// src/transactions/TransactionStoreContext.tsx
|
|
15956
|
-
import
|
|
14632
|
+
import React133, { createContext as createContext20, useContext as useContext25, useEffect as useEffect32, useState as useState42 } from "react";
|
|
15957
14633
|
import { useAccount as useAccount14, usePublicClient } from "wagmi";
|
|
15958
14634
|
|
|
15959
14635
|
// src/transactions/transactionStore.ts
|
|
@@ -16096,30 +14772,30 @@ function createTransactionStore({
|
|
|
16096
14772
|
|
|
16097
14773
|
// src/transactions/TransactionStoreContext.tsx
|
|
16098
14774
|
var storeSingleton;
|
|
16099
|
-
var TransactionStoreContext =
|
|
14775
|
+
var TransactionStoreContext = createContext20(null);
|
|
16100
14776
|
function TransactionStoreProvider({
|
|
16101
14777
|
children
|
|
16102
14778
|
}) {
|
|
16103
14779
|
const provider = usePublicClient();
|
|
16104
14780
|
const { address } = useAccount14();
|
|
16105
14781
|
const chainId = useChainId();
|
|
16106
|
-
const [store] =
|
|
14782
|
+
const [store] = useState42(
|
|
16107
14783
|
() => storeSingleton != null ? storeSingleton : storeSingleton = createTransactionStore({ provider })
|
|
16108
14784
|
);
|
|
16109
|
-
|
|
14785
|
+
useEffect32(() => {
|
|
16110
14786
|
store.setProvider(provider);
|
|
16111
14787
|
}, [store, provider]);
|
|
16112
|
-
|
|
14788
|
+
useEffect32(() => {
|
|
16113
14789
|
if (address && chainId) {
|
|
16114
14790
|
store.waitForPendingTransactions(address, chainId);
|
|
16115
14791
|
}
|
|
16116
14792
|
}, [store, address, chainId]);
|
|
16117
|
-
return /* @__PURE__ */
|
|
14793
|
+
return /* @__PURE__ */ React133.createElement(TransactionStoreContext.Provider, {
|
|
16118
14794
|
value: store
|
|
16119
14795
|
}, children);
|
|
16120
14796
|
}
|
|
16121
14797
|
function useTransactionStore() {
|
|
16122
|
-
const store =
|
|
14798
|
+
const store = useContext25(TransactionStoreContext);
|
|
16123
14799
|
if (!store) {
|
|
16124
14800
|
throw new Error("Transaction hooks must be used within FunkitProvider");
|
|
16125
14801
|
}
|
|
@@ -16131,10 +14807,10 @@ function useRecentTransactions() {
|
|
|
16131
14807
|
const store = useTransactionStore();
|
|
16132
14808
|
const { address } = useAccount15();
|
|
16133
14809
|
const chainId = useChainId();
|
|
16134
|
-
const [transactions, setTransactions] =
|
|
14810
|
+
const [transactions, setTransactions] = useState43(
|
|
16135
14811
|
() => store && address && chainId ? store.getTransactions(address, chainId) : []
|
|
16136
14812
|
);
|
|
16137
|
-
|
|
14813
|
+
useEffect33(() => {
|
|
16138
14814
|
if (store && address && chainId) {
|
|
16139
14815
|
setTransactions(store.getTransactions(address, chainId));
|
|
16140
14816
|
return store.onChange(() => {
|
|
@@ -16146,8 +14822,8 @@ function useRecentTransactions() {
|
|
|
16146
14822
|
}
|
|
16147
14823
|
|
|
16148
14824
|
// src/components/FunkitProvider/ShowRecentTransactionsContext.ts
|
|
16149
|
-
import { createContext as
|
|
16150
|
-
var ShowRecentTransactionsContext =
|
|
14825
|
+
import { createContext as createContext21 } from "react";
|
|
14826
|
+
var ShowRecentTransactionsContext = createContext21(false);
|
|
16151
14827
|
|
|
16152
14828
|
// src/components/ConnectButton/abbreviateETHBalance.ts
|
|
16153
14829
|
var units = ["k", "m", "b", "t"];
|
|
@@ -16197,7 +14873,7 @@ function ConnectButtonRenderer({
|
|
|
16197
14873
|
const chainIconUrl = (_c = funkitConnectChain == null ? void 0 : funkitConnectChain.iconUrl) != null ? _c : void 0;
|
|
16198
14874
|
const chainIconBackground = (_d = funkitConnectChain == null ? void 0 : funkitConnectChain.iconBackground) != null ? _d : void 0;
|
|
16199
14875
|
const resolvedChainIconUrl = useAsyncImage(chainIconUrl);
|
|
16200
|
-
const showRecentTransactions =
|
|
14876
|
+
const showRecentTransactions = useContext26(ShowRecentTransactionsContext);
|
|
16201
14877
|
const hasPendingTransactions = useRecentTransactions().some(({ status }) => status === "pending") && showRecentTransactions;
|
|
16202
14878
|
const { showBalance } = useShowBalance();
|
|
16203
14879
|
const computeShouldShowBalance = () => {
|
|
@@ -16218,7 +14894,7 @@ function ConnectButtonRenderer({
|
|
|
16218
14894
|
const { openChainModal } = useChainModal();
|
|
16219
14895
|
const { openAccountModal } = useAccountModal();
|
|
16220
14896
|
const { accountModalOpen, chainModalOpen, connectModalOpen } = useModalState();
|
|
16221
|
-
return /* @__PURE__ */
|
|
14897
|
+
return /* @__PURE__ */ React134.createElement(React134.Fragment, null, children({
|
|
16222
14898
|
account: address ? {
|
|
16223
14899
|
address,
|
|
16224
14900
|
balanceDecimals: balanceData == null ? void 0 : balanceData.decimals,
|
|
@@ -16266,8 +14942,8 @@ function ChainSelectorButton({
|
|
|
16266
14942
|
chain
|
|
16267
14943
|
}) {
|
|
16268
14944
|
var _a, _b;
|
|
16269
|
-
const { i18n: i18n2 } =
|
|
16270
|
-
return /* @__PURE__ */
|
|
14945
|
+
const { i18n: i18n2 } = useContext27(I18nContext);
|
|
14946
|
+
return /* @__PURE__ */ React135.createElement(Box, {
|
|
16271
14947
|
alignItems: "center",
|
|
16272
14948
|
"aria-label": "Chain Selector",
|
|
16273
14949
|
as: "button",
|
|
@@ -16293,37 +14969,37 @@ function ChainSelectorButton({
|
|
|
16293
14969
|
testId: unsupportedChain ? "wrong-network-button" : "chain-button",
|
|
16294
14970
|
transition: "default",
|
|
16295
14971
|
type: "button"
|
|
16296
|
-
}, unsupportedChain ? /* @__PURE__ */
|
|
14972
|
+
}, unsupportedChain ? /* @__PURE__ */ React135.createElement(Box, {
|
|
16297
14973
|
alignItems: "center",
|
|
16298
14974
|
display: "flex",
|
|
16299
14975
|
height: "24",
|
|
16300
14976
|
paddingX: "4"
|
|
16301
|
-
}, i18n2.t("connect_wallet.wrong_network.label")) : /* @__PURE__ */
|
|
14977
|
+
}, i18n2.t("connect_wallet.wrong_network.label")) : /* @__PURE__ */ React135.createElement(Box, {
|
|
16302
14978
|
alignItems: "center",
|
|
16303
14979
|
display: "flex",
|
|
16304
14980
|
gap: "6"
|
|
16305
|
-
}, chain.hasIcon ? /* @__PURE__ */
|
|
14981
|
+
}, chain.hasIcon ? /* @__PURE__ */ React135.createElement(Box, {
|
|
16306
14982
|
display: mapResponsiveValue(
|
|
16307
14983
|
chainStatus,
|
|
16308
14984
|
(value) => value === "full" || value === "icon" ? "block" : "none"
|
|
16309
14985
|
),
|
|
16310
14986
|
height: "24",
|
|
16311
14987
|
width: "24"
|
|
16312
|
-
}, /* @__PURE__ */
|
|
14988
|
+
}, /* @__PURE__ */ React135.createElement(AsyncImage, {
|
|
16313
14989
|
alt: (_a = chain.name) != null ? _a : "Chain icon",
|
|
16314
14990
|
background: chain.iconBackground,
|
|
16315
14991
|
borderRadius: "full",
|
|
16316
14992
|
height: "24",
|
|
16317
14993
|
src: chain.iconUrl,
|
|
16318
14994
|
width: "24"
|
|
16319
|
-
})) : null, /* @__PURE__ */
|
|
14995
|
+
})) : null, /* @__PURE__ */ React135.createElement(Box, {
|
|
16320
14996
|
display: mapResponsiveValue(chainStatus, (value) => {
|
|
16321
14997
|
if (value === "icon" && !chain.iconUrl) {
|
|
16322
14998
|
return "block";
|
|
16323
14999
|
}
|
|
16324
15000
|
return value === "full" || value === "name" ? "block" : "none";
|
|
16325
15001
|
})
|
|
16326
|
-
}, (_b = chain.name) != null ? _b : chain.id)), /* @__PURE__ */
|
|
15002
|
+
}, (_b = chain.name) != null ? _b : chain.id)), /* @__PURE__ */ React135.createElement(DropdownIcon, null));
|
|
16327
15003
|
}
|
|
16328
15004
|
function AccountButton({
|
|
16329
15005
|
openAccountModal,
|
|
@@ -16332,7 +15008,7 @@ function AccountButton({
|
|
|
16332
15008
|
accountStatus
|
|
16333
15009
|
}) {
|
|
16334
15010
|
const { userInfo } = useGeneralWallet();
|
|
16335
|
-
return /* @__PURE__ */
|
|
15011
|
+
return /* @__PURE__ */ React135.createElement(Box, {
|
|
16336
15012
|
alignItems: "center",
|
|
16337
15013
|
as: "button",
|
|
16338
15014
|
background: "accentColor",
|
|
@@ -16350,14 +15026,14 @@ function AccountButton({
|
|
|
16350
15026
|
testId: "account-button",
|
|
16351
15027
|
transition: "default",
|
|
16352
15028
|
type: "button"
|
|
16353
|
-
}, account.displayBalance && /* @__PURE__ */
|
|
15029
|
+
}, account.displayBalance && /* @__PURE__ */ React135.createElement(Box, {
|
|
16354
15030
|
display: mapResponsiveValue(
|
|
16355
15031
|
showBalance,
|
|
16356
15032
|
(value) => value ? "block" : "none"
|
|
16357
15033
|
),
|
|
16358
15034
|
padding: "8",
|
|
16359
15035
|
paddingLeft: "12"
|
|
16360
|
-
}, account.displayBalance), /* @__PURE__ */
|
|
15036
|
+
}, account.displayBalance), /* @__PURE__ */ React135.createElement(Box, {
|
|
16361
15037
|
background: "connectButtonInnerBackground",
|
|
16362
15038
|
borderColor: "accentColor",
|
|
16363
15039
|
borderRadius: "connectButton",
|
|
@@ -16369,32 +15045,32 @@ function AccountButton({
|
|
|
16369
15045
|
paddingX: "8",
|
|
16370
15046
|
paddingY: "6",
|
|
16371
15047
|
transition: "default"
|
|
16372
|
-
}, /* @__PURE__ */
|
|
15048
|
+
}, /* @__PURE__ */ React135.createElement(Box, {
|
|
16373
15049
|
alignItems: "center",
|
|
16374
15050
|
display: "flex",
|
|
16375
15051
|
gap: "6",
|
|
16376
15052
|
height: "24"
|
|
16377
|
-
}, /* @__PURE__ */
|
|
15053
|
+
}, /* @__PURE__ */ React135.createElement(Box, {
|
|
16378
15054
|
display: mapResponsiveValue(
|
|
16379
15055
|
accountStatus,
|
|
16380
15056
|
(value) => value === "full" || value === "avatar" ? "block" : "none"
|
|
16381
15057
|
)
|
|
16382
|
-
}, /* @__PURE__ */
|
|
15058
|
+
}, /* @__PURE__ */ React135.createElement(Avatar, {
|
|
16383
15059
|
address: account.address,
|
|
16384
15060
|
imageUrl: account.ensAvatar || userInfo.iconSrc,
|
|
16385
15061
|
loading: account.hasPendingTransactions,
|
|
16386
15062
|
size: 24
|
|
16387
|
-
})), /* @__PURE__ */
|
|
15063
|
+
})), /* @__PURE__ */ React135.createElement(Box, {
|
|
16388
15064
|
alignItems: "center",
|
|
16389
15065
|
display: "flex",
|
|
16390
15066
|
gap: "6"
|
|
16391
|
-
}, /* @__PURE__ */
|
|
15067
|
+
}, /* @__PURE__ */ React135.createElement(Box, {
|
|
16392
15068
|
display: mapResponsiveValue(
|
|
16393
15069
|
accountStatus,
|
|
16394
15070
|
(value) => value === "full" || value === "address" ? "block" : "none"
|
|
16395
15071
|
),
|
|
16396
15072
|
style: { textWrap: "nowrap" }
|
|
16397
|
-
}, userInfo.nameTruncated), /* @__PURE__ */
|
|
15073
|
+
}, userInfo.nameTruncated), /* @__PURE__ */ React135.createElement(DropdownIcon, null)))));
|
|
16398
15074
|
}
|
|
16399
15075
|
function ConnectButton({
|
|
16400
15076
|
accountStatus = defaultProps.accountStatus,
|
|
@@ -16407,14 +15083,14 @@ function ConnectButton({
|
|
|
16407
15083
|
const chains = useFunkitConnectChains();
|
|
16408
15084
|
const connectionStatus = useConnectionStatus();
|
|
16409
15085
|
const { setShowBalance } = useShowBalance();
|
|
16410
|
-
const [ready, setReady] =
|
|
16411
|
-
const { i18n: i18n2 } =
|
|
16412
|
-
|
|
15086
|
+
const [ready, setReady] = useState44(false);
|
|
15087
|
+
const { i18n: i18n2 } = useContext27(I18nContext);
|
|
15088
|
+
useEffect34(() => {
|
|
16413
15089
|
setShowBalance(showBalance);
|
|
16414
15090
|
if (!ready)
|
|
16415
15091
|
setReady(true);
|
|
16416
15092
|
}, [showBalance, setShowBalance, ready]);
|
|
16417
|
-
return ready ? /* @__PURE__ */
|
|
15093
|
+
return ready ? /* @__PURE__ */ React135.createElement(ConnectButtonRenderer, null, ({
|
|
16418
15094
|
account,
|
|
16419
15095
|
chain,
|
|
16420
15096
|
mounted,
|
|
@@ -16425,7 +15101,7 @@ function ConnectButton({
|
|
|
16425
15101
|
var _a;
|
|
16426
15102
|
const ready2 = mounted && connectionStatus !== "loading";
|
|
16427
15103
|
const unsupportedChain = (_a = chain == null ? void 0 : chain.unsupported) != null ? _a : false;
|
|
16428
|
-
return /* @__PURE__ */
|
|
15104
|
+
return /* @__PURE__ */ React135.createElement(Box, {
|
|
16429
15105
|
display: "flex",
|
|
16430
15106
|
gap: "12",
|
|
16431
15107
|
...!ready2 && {
|
|
@@ -16436,17 +15112,17 @@ function ConnectButton({
|
|
|
16436
15112
|
userSelect: "none"
|
|
16437
15113
|
}
|
|
16438
15114
|
}
|
|
16439
|
-
}, ready2 && account && connectionStatus === "connected" ? /* @__PURE__ */
|
|
15115
|
+
}, ready2 && account && connectionStatus === "connected" ? /* @__PURE__ */ React135.createElement(React135.Fragment, null, showChainSelector && chain && (chains.length > 1 || unsupportedChain) && /* @__PURE__ */ React135.createElement(ChainSelectorButton, {
|
|
16440
15116
|
unsupportedChain,
|
|
16441
15117
|
chainStatus,
|
|
16442
15118
|
openChainModal,
|
|
16443
15119
|
chain
|
|
16444
|
-
}), !unsupportedChain && /* @__PURE__ */
|
|
15120
|
+
}), !unsupportedChain && /* @__PURE__ */ React135.createElement(AccountButton, {
|
|
16445
15121
|
openAccountModal,
|
|
16446
15122
|
account,
|
|
16447
15123
|
showBalance,
|
|
16448
15124
|
accountStatus
|
|
16449
|
-
})) : /* @__PURE__ */
|
|
15125
|
+
})) : /* @__PURE__ */ React135.createElement(Box, {
|
|
16450
15126
|
as: "button",
|
|
16451
15127
|
background: "accentColor",
|
|
16452
15128
|
borderRadius: "connectButton",
|
|
@@ -16465,19 +15141,19 @@ function ConnectButton({
|
|
|
16465
15141
|
testId: "connect-button",
|
|
16466
15142
|
transition: "default",
|
|
16467
15143
|
type: "button"
|
|
16468
|
-
}, /* @__PURE__ */
|
|
15144
|
+
}, /* @__PURE__ */ React135.createElement(Box, {
|
|
16469
15145
|
display: "flex",
|
|
16470
15146
|
gap: "8",
|
|
16471
15147
|
alignItems: "center"
|
|
16472
15148
|
}, mounted && label === "Connect Wallet" ? i18n2.t("connect_wallet.label") : label, suffixIcon)));
|
|
16473
|
-
}) : /* @__PURE__ */
|
|
15149
|
+
}) : /* @__PURE__ */ React135.createElement(React135.Fragment, null);
|
|
16474
15150
|
}
|
|
16475
15151
|
ConnectButton.__defaultProps = defaultProps;
|
|
16476
15152
|
ConnectButton.Custom = ConnectButtonRenderer;
|
|
16477
15153
|
|
|
16478
15154
|
// src/components/FunkitProvider/FunkitProvider.tsx
|
|
16479
15155
|
import { QueryClientProvider } from "@tanstack/react-query";
|
|
16480
|
-
import
|
|
15156
|
+
import React139, { createContext as createContext23, useContext as useContext28 } from "react";
|
|
16481
15157
|
import { useAccountEffect as useAccountEffect3, WagmiProvider } from "wagmi";
|
|
16482
15158
|
|
|
16483
15159
|
// src/config/getDefaultConfig.ts
|
|
@@ -16500,6 +15176,11 @@ var computeWalletConnectMetaData = ({
|
|
|
16500
15176
|
};
|
|
16501
15177
|
};
|
|
16502
15178
|
|
|
15179
|
+
// src/utils/colors.ts
|
|
15180
|
+
var isHexString = (color) => {
|
|
15181
|
+
return /^#([0-9a-f]{3}){1,2}$/i.test(color);
|
|
15182
|
+
};
|
|
15183
|
+
|
|
16503
15184
|
// src/utils/omitUndefinedValues.ts
|
|
16504
15185
|
function omitUndefinedValues(obj) {
|
|
16505
15186
|
return Object.fromEntries(
|
|
@@ -17287,26 +15968,47 @@ function validateFunkitProviderProps(props) {
|
|
|
17287
15968
|
validateTheme(props);
|
|
17288
15969
|
}
|
|
17289
15970
|
|
|
15971
|
+
// src/components/FunkitProvider/AppContext.ts
|
|
15972
|
+
import { createContext as createContext22 } from "react";
|
|
15973
|
+
var defaultAppInfo = {
|
|
15974
|
+
appName: void 0,
|
|
15975
|
+
disclaimer: void 0,
|
|
15976
|
+
learnMoreUrl: "https://learn.rainbow.me/understanding-web3?utm_source=rainbowkit&utm_campaign=learnmore"
|
|
15977
|
+
};
|
|
15978
|
+
var AppContext = createContext22(defaultAppInfo);
|
|
15979
|
+
|
|
17290
15980
|
// src/components/FunkitProvider/useFingerprint.ts
|
|
17291
|
-
import { useCallback as useCallback33, useEffect as
|
|
15981
|
+
import { useCallback as useCallback33, useEffect as useEffect35 } from "react";
|
|
17292
15982
|
var storageKey6 = "funkit-connect-version";
|
|
17293
15983
|
function setFunkitConnectVersion({ version }) {
|
|
17294
15984
|
localStorage.setItem(storageKey6, version);
|
|
17295
15985
|
}
|
|
17296
15986
|
function getCurrentSdkVersion() {
|
|
17297
|
-
return "1.4.
|
|
15987
|
+
return "1.4.2";
|
|
17298
15988
|
}
|
|
17299
15989
|
function useFingerprint() {
|
|
17300
15990
|
const fingerprint = useCallback33(() => {
|
|
17301
15991
|
setFunkitConnectVersion({ version: getCurrentSdkVersion() });
|
|
17302
15992
|
}, []);
|
|
17303
|
-
|
|
15993
|
+
useEffect35(() => {
|
|
17304
15994
|
fingerprint();
|
|
17305
15995
|
}, [fingerprint]);
|
|
17306
15996
|
}
|
|
17307
15997
|
|
|
17308
15998
|
// src/components/FunkitProvider/usePreloadImages.ts
|
|
17309
|
-
import { useCallback as useCallback34, useEffect as
|
|
15999
|
+
import { useCallback as useCallback34, useEffect as useEffect36 } from "react";
|
|
16000
|
+
|
|
16001
|
+
// src/components/Icons/Assets.tsx
|
|
16002
|
+
import React137 from "react";
|
|
16003
|
+
var src = async () => (await import("./assets-26YY4GVD.js")).default;
|
|
16004
|
+
var preloadAssetsIcon = () => loadImages(src);
|
|
16005
|
+
|
|
16006
|
+
// src/components/Icons/Login.tsx
|
|
16007
|
+
import React138 from "react";
|
|
16008
|
+
var src2 = async () => (await import("./login-ZSMM5UYL.js")).default;
|
|
16009
|
+
var preloadLoginIcon = () => loadImages(src2);
|
|
16010
|
+
|
|
16011
|
+
// src/components/FunkitProvider/usePreloadImages.ts
|
|
17310
16012
|
function usePreloadImages() {
|
|
17311
16013
|
const funkitConnectChains = useFunkitConnectChains();
|
|
17312
16014
|
const walletConnectors = useWalletConnectors();
|
|
@@ -17324,7 +16026,7 @@ function usePreloadImages() {
|
|
|
17324
16026
|
loadImages(signInIcon);
|
|
17325
16027
|
}
|
|
17326
16028
|
}, [walletConnectors, funkitConnectChains, isUnauthenticated]);
|
|
17327
|
-
|
|
16029
|
+
useEffect36(() => {
|
|
17328
16030
|
preloadImages();
|
|
17329
16031
|
}, [preloadImages]);
|
|
17330
16032
|
}
|
|
@@ -17358,9 +16060,9 @@ function FunkitProvider(props) {
|
|
|
17358
16060
|
!!props.debug,
|
|
17359
16061
|
getCurrentSdkVersion()
|
|
17360
16062
|
);
|
|
17361
|
-
const MainChild = /* @__PURE__ */
|
|
16063
|
+
const MainChild = /* @__PURE__ */ React139.createElement(FunkitThemeProvider, {
|
|
17362
16064
|
theme: props.theme
|
|
17363
|
-
}, /* @__PURE__ */
|
|
16065
|
+
}, /* @__PURE__ */ React139.createElement(FunkitProviderInner, {
|
|
17364
16066
|
appInfo: props.appInfo,
|
|
17365
16067
|
avatar: props.avatar,
|
|
17366
16068
|
id: props.id,
|
|
@@ -17371,9 +16073,9 @@ function FunkitProvider(props) {
|
|
|
17371
16073
|
sandbox: props.sandbox,
|
|
17372
16074
|
modalSize: props.modalSize
|
|
17373
16075
|
}, props.children));
|
|
17374
|
-
return finalWagmiConfig && finalQueryClient ? /* @__PURE__ */
|
|
16076
|
+
return finalWagmiConfig && finalQueryClient ? /* @__PURE__ */ React139.createElement(WagmiProvider, {
|
|
17375
16077
|
config: finalWagmiConfig
|
|
17376
|
-
}, /* @__PURE__ */
|
|
16078
|
+
}, /* @__PURE__ */ React139.createElement(QueryClientProvider, {
|
|
17377
16079
|
client: finalQueryClient
|
|
17378
16080
|
}, MainChild)) : MainChild;
|
|
17379
16081
|
}
|
|
@@ -17403,35 +16105,35 @@ function FunkitProviderInner({
|
|
|
17403
16105
|
const modalSizeFinal = modalSize || ModalSizeOptions.WIDE;
|
|
17404
16106
|
const coolMode = false;
|
|
17405
16107
|
const showRecentTransactions = false;
|
|
17406
|
-
return /* @__PURE__ */
|
|
16108
|
+
return /* @__PURE__ */ React139.createElement(FunkitConfigContext.Provider, {
|
|
17407
16109
|
value: funkitConfig
|
|
17408
|
-
}, /* @__PURE__ */
|
|
16110
|
+
}, /* @__PURE__ */ React139.createElement(FunkitConnectChainProvider, {
|
|
17409
16111
|
initialChain
|
|
17410
|
-
}, /* @__PURE__ */
|
|
16112
|
+
}, /* @__PURE__ */ React139.createElement(WalletButtonProvider, null, /* @__PURE__ */ React139.createElement(I18nProvider, {
|
|
17411
16113
|
locale
|
|
17412
|
-
}, /* @__PURE__ */
|
|
16114
|
+
}, /* @__PURE__ */ React139.createElement(CoolModeContext.Provider, {
|
|
17413
16115
|
value: coolMode
|
|
17414
|
-
}, /* @__PURE__ */
|
|
16116
|
+
}, /* @__PURE__ */ React139.createElement(ModalSizeProvider, {
|
|
17415
16117
|
modalSize: modalSizeFinal
|
|
17416
|
-
}, /* @__PURE__ */
|
|
16118
|
+
}, /* @__PURE__ */ React139.createElement(FunkitWeb2Provider, null, /* @__PURE__ */ React139.createElement(GeneralWalletProvider, null, /* @__PURE__ */ React139.createElement(FunkitCheckoutProvider, null, /* @__PURE__ */ React139.createElement(ShowRecentTransactionsContext.Provider, {
|
|
17417
16119
|
value: showRecentTransactions
|
|
17418
|
-
}, /* @__PURE__ */
|
|
16120
|
+
}, /* @__PURE__ */ React139.createElement(FunkitSandboxContext.Provider, {
|
|
17419
16121
|
value: isSandboxMode
|
|
17420
|
-
}, /* @__PURE__ */
|
|
16122
|
+
}, /* @__PURE__ */ React139.createElement(FunkitMeshProvider, null, /* @__PURE__ */ React139.createElement(TransactionStoreProvider, null, /* @__PURE__ */ React139.createElement(AvatarContext.Provider, {
|
|
17421
16123
|
value: avatarContext
|
|
17422
|
-
}, /* @__PURE__ */
|
|
16124
|
+
}, /* @__PURE__ */ React139.createElement(AppContext.Provider, {
|
|
17423
16125
|
value: appContext
|
|
17424
|
-
}, /* @__PURE__ */
|
|
16126
|
+
}, /* @__PURE__ */ React139.createElement(ThemeIdContext2.Provider, {
|
|
17425
16127
|
value: id
|
|
17426
|
-
}, /* @__PURE__ */
|
|
16128
|
+
}, /* @__PURE__ */ React139.createElement(ShowBalanceProvider, null, /* @__PURE__ */ React139.createElement(FunToastProvider, null, /* @__PURE__ */ React139.createElement(FunkitMoonpayProvider, {
|
|
17427
16129
|
debug: !!debug
|
|
17428
|
-
}, /* @__PURE__ */
|
|
16130
|
+
}, /* @__PURE__ */ React139.createElement(ModalProvider, null, activeTheme ? /* @__PURE__ */ React139.createElement("div", {
|
|
17429
16131
|
...createThemeRootProps2(id),
|
|
17430
16132
|
style: {
|
|
17431
16133
|
width: "100%",
|
|
17432
16134
|
height: "100%"
|
|
17433
16135
|
}
|
|
17434
|
-
}, /* @__PURE__ */
|
|
16136
|
+
}, /* @__PURE__ */ React139.createElement("style", {
|
|
17435
16137
|
dangerouslySetInnerHTML: {
|
|
17436
16138
|
__html: [
|
|
17437
16139
|
`${selector}{${cssStringFromTheme(
|
|
@@ -17443,18 +16145,18 @@ function FunkitProviderInner({
|
|
|
17443
16145
|
}
|
|
17444
16146
|
|
|
17445
16147
|
// src/components/WalletButton/WalletButton.tsx
|
|
17446
|
-
import
|
|
16148
|
+
import React141, { useContext as useContext30 } from "react";
|
|
17447
16149
|
|
|
17448
16150
|
// src/components/WalletButton/WalletButton.css.ts
|
|
17449
16151
|
var border = "_85s11r0";
|
|
17450
16152
|
var maxWidth = "_85s11r1";
|
|
17451
16153
|
|
|
17452
16154
|
// src/components/WalletButton/WalletButtonRenderer.tsx
|
|
17453
|
-
import
|
|
17454
|
-
useContext as
|
|
17455
|
-
useEffect as
|
|
16155
|
+
import React140, {
|
|
16156
|
+
useContext as useContext29,
|
|
16157
|
+
useEffect as useEffect37,
|
|
17456
16158
|
useMemo as useMemo36,
|
|
17457
|
-
useState as
|
|
16159
|
+
useState as useState45
|
|
17458
16160
|
} from "react";
|
|
17459
16161
|
import { useAccount as useAccount17, useAccountEffect as useAccountEffect4 } from "wagmi";
|
|
17460
16162
|
function WalletButtonRenderer({
|
|
@@ -17464,16 +16166,16 @@ function WalletButtonRenderer({
|
|
|
17464
16166
|
const isMounted = useIsMounted();
|
|
17465
16167
|
const { openConnectModal } = useConnectModal();
|
|
17466
16168
|
const { connectModalOpen } = useModalState();
|
|
17467
|
-
const { connector, setConnector } =
|
|
16169
|
+
const { connector, setConnector } = useContext29(WalletButtonContext);
|
|
17468
16170
|
const [firstConnector] = useWalletConnectors().filter((wallet2) => wallet2.isFunkitSdkConnector).filter((_wallet) => _wallet.id.toLowerCase() === wallet.toLowerCase()).sort((a, b) => a.groupIndex - b.groupIndex);
|
|
17469
16171
|
if (!firstConnector) {
|
|
17470
16172
|
throw new Error("Connector not found");
|
|
17471
16173
|
}
|
|
17472
16174
|
const connectionStatus = useConnectionStatus();
|
|
17473
|
-
const [loading, setLoading] =
|
|
17474
|
-
const [isError, setIsError] =
|
|
16175
|
+
const [loading, setLoading] = useState45(false);
|
|
16176
|
+
const [isError, setIsError] = useState45(false);
|
|
17475
16177
|
const mobile = isMobile();
|
|
17476
|
-
|
|
16178
|
+
useEffect37(() => {
|
|
17477
16179
|
if (!connectModalOpen && connector)
|
|
17478
16180
|
setConnector(null);
|
|
17479
16181
|
}, [connectModalOpen, connector, setConnector]);
|
|
@@ -17510,7 +16212,7 @@ function WalletButtonRenderer({
|
|
|
17510
16212
|
const isStatusLoading = connectionStatus === "loading";
|
|
17511
16213
|
const ready = !isConnecting && !!openConnectModal && firstConnector && !isStatusLoading;
|
|
17512
16214
|
const isNotSupported = !(firstConnector == null ? void 0 : firstConnector.installed) || !(firstConnector == null ? void 0 : firstConnector.ready);
|
|
17513
|
-
return /* @__PURE__ */
|
|
16215
|
+
return /* @__PURE__ */ React140.createElement(React140.Fragment, null, children({
|
|
17514
16216
|
error: isError,
|
|
17515
16217
|
loading,
|
|
17516
16218
|
connected: isLastWalletIdConnected,
|
|
@@ -17531,15 +16233,15 @@ function WalletButtonRenderer({
|
|
|
17531
16233
|
|
|
17532
16234
|
// src/components/WalletButton/WalletButton.tsx
|
|
17533
16235
|
var WalletButton = ({ wallet }) => {
|
|
17534
|
-
const { i18n: i18n2 } =
|
|
17535
|
-
return /* @__PURE__ */
|
|
16236
|
+
const { i18n: i18n2 } = useContext30(I18nContext);
|
|
16237
|
+
return /* @__PURE__ */ React141.createElement(WalletButtonRenderer, {
|
|
17536
16238
|
wallet
|
|
17537
16239
|
}, ({ ready, connect, connected, mounted, connector, loading }) => {
|
|
17538
16240
|
const isDisabled = !ready || loading;
|
|
17539
16241
|
const connectorName = (connector == null ? void 0 : connector.name) || "";
|
|
17540
16242
|
if (!mounted)
|
|
17541
16243
|
return;
|
|
17542
|
-
return /* @__PURE__ */
|
|
16244
|
+
return /* @__PURE__ */ React141.createElement(Box, {
|
|
17543
16245
|
display: "flex",
|
|
17544
16246
|
flexDirection: "column",
|
|
17545
16247
|
alignItems: "center",
|
|
@@ -17547,7 +16249,7 @@ var WalletButton = ({ wallet }) => {
|
|
|
17547
16249
|
style: {
|
|
17548
16250
|
pointerEvents: isDisabled ? "none" : "all"
|
|
17549
16251
|
}
|
|
17550
|
-
}, /* @__PURE__ */
|
|
16252
|
+
}, /* @__PURE__ */ React141.createElement(Box, {
|
|
17551
16253
|
as: "button",
|
|
17552
16254
|
borderRadius: "menuButton",
|
|
17553
16255
|
borderStyle: "solid",
|
|
@@ -17569,7 +16271,7 @@ var WalletButton = ({ wallet }) => {
|
|
|
17569
16271
|
transition: "default",
|
|
17570
16272
|
width: "full",
|
|
17571
16273
|
background: "connectButtonBackground"
|
|
17572
|
-
}, /* @__PURE__ */
|
|
16274
|
+
}, /* @__PURE__ */ React141.createElement(Box, {
|
|
17573
16275
|
color: "modalText",
|
|
17574
16276
|
fontFamily: "body",
|
|
17575
16277
|
fontSize: "16",
|
|
@@ -17577,28 +16279,28 @@ var WalletButton = ({ wallet }) => {
|
|
|
17577
16279
|
transition: "default",
|
|
17578
16280
|
display: "flex",
|
|
17579
16281
|
alignItems: "center"
|
|
17580
|
-
}, /* @__PURE__ */
|
|
16282
|
+
}, /* @__PURE__ */ React141.createElement(Box, {
|
|
17581
16283
|
alignItems: "center",
|
|
17582
16284
|
display: "flex",
|
|
17583
16285
|
flexDirection: "row",
|
|
17584
16286
|
gap: "12",
|
|
17585
16287
|
paddingRight: "6"
|
|
17586
|
-
}, /* @__PURE__ */
|
|
16288
|
+
}, /* @__PURE__ */ React141.createElement(Box, null, loading ? /* @__PURE__ */ React141.createElement(SpinnerIcon, null) : /* @__PURE__ */ React141.createElement(AsyncImage, {
|
|
17587
16289
|
background: connector == null ? void 0 : connector.iconBackground,
|
|
17588
16290
|
borderRadius: "6",
|
|
17589
16291
|
height: "28",
|
|
17590
16292
|
src: connector == null ? void 0 : connector.iconUrl,
|
|
17591
16293
|
width: "28"
|
|
17592
|
-
})), /* @__PURE__ */
|
|
16294
|
+
})), /* @__PURE__ */ React141.createElement(Box, {
|
|
17593
16295
|
alignItems: "center",
|
|
17594
16296
|
display: "flex",
|
|
17595
16297
|
flexDirection: "column",
|
|
17596
16298
|
color: "modalText"
|
|
17597
|
-
}, /* @__PURE__ */
|
|
16299
|
+
}, /* @__PURE__ */ React141.createElement(Box, {
|
|
17598
16300
|
testId: `wallet-button-label-${(connector == null ? void 0 : connector.id) || ""}`
|
|
17599
16301
|
}, loading ? i18n2.t("connect.status.connecting", {
|
|
17600
16302
|
wallet: connectorName
|
|
17601
|
-
}) : connectorName)), connected ? /* @__PURE__ */
|
|
16303
|
+
}) : connectorName)), connected ? /* @__PURE__ */ React141.createElement(Box, {
|
|
17602
16304
|
background: "connectionIndicator",
|
|
17603
16305
|
borderColor: "selectedOptionBorder",
|
|
17604
16306
|
borderRadius: "full",
|
|
@@ -17635,608 +16337,218 @@ function getDefaultWallets(parameters) {
|
|
|
17635
16337
|
};
|
|
17636
16338
|
}
|
|
17637
16339
|
|
|
17638
|
-
// src/components/ConnectOptions/MobileOptions.tsx
|
|
17639
|
-
import React152, {
|
|
17640
|
-
useCallback as useCallback35,
|
|
17641
|
-
useContext as useContext34,
|
|
17642
|
-
useEffect as useEffect39,
|
|
17643
|
-
useRef as useRef12,
|
|
17644
|
-
useState as useState47
|
|
17645
|
-
} from "react";
|
|
17646
|
-
|
|
17647
|
-
// src/components/ConnectOptions/MobileOptions.css.ts
|
|
17648
|
-
var rotatingBorder = "_1dcc7392";
|
|
17649
|
-
var scroll = "_1dcc7390";
|
|
17650
|
-
var spinner = "_1dcc7393";
|
|
17651
|
-
|
|
17652
|
-
// src/components/ConnectOptions/MobileOptions.tsx
|
|
17653
|
-
var LoadingSpinner = ({ wallet }) => {
|
|
17654
|
-
const width = 80;
|
|
17655
|
-
const height = 80;
|
|
17656
|
-
const radiusFactor = 20;
|
|
17657
|
-
const perimeter = 2 * (width + height - 4 * radiusFactor);
|
|
17658
|
-
return /* @__PURE__ */ React152.createElement("svg", {
|
|
17659
|
-
className: spinner,
|
|
17660
|
-
viewBox: "0 0 86 86",
|
|
17661
|
-
width: "86",
|
|
17662
|
-
height: "86"
|
|
17663
|
-
}, /* @__PURE__ */ React152.createElement("title", null, "Loading"), /* @__PURE__ */ React152.createElement("rect", {
|
|
17664
|
-
x: "3",
|
|
17665
|
-
y: "3",
|
|
17666
|
-
width,
|
|
17667
|
-
height,
|
|
17668
|
-
rx: radiusFactor,
|
|
17669
|
-
ry: radiusFactor,
|
|
17670
|
-
strokeDasharray: `${perimeter / 3} ${2 * perimeter / 3}`,
|
|
17671
|
-
strokeDashoffset: perimeter,
|
|
17672
|
-
className: rotatingBorder,
|
|
17673
|
-
style: {
|
|
17674
|
-
stroke: (wallet == null ? void 0 : wallet.iconAccent) || "#0D3887"
|
|
17675
|
-
}
|
|
17676
|
-
}));
|
|
17677
|
-
};
|
|
17678
|
-
function WalletButton2({
|
|
17679
|
-
onClose,
|
|
17680
|
-
wallet,
|
|
17681
|
-
connecting
|
|
17682
|
-
}) {
|
|
17683
|
-
const {
|
|
17684
|
-
connect,
|
|
17685
|
-
iconBackground,
|
|
17686
|
-
iconUrl,
|
|
17687
|
-
id,
|
|
17688
|
-
name,
|
|
17689
|
-
getMobileUri,
|
|
17690
|
-
ready,
|
|
17691
|
-
shortName,
|
|
17692
|
-
showWalletConnectModal
|
|
17693
|
-
} = wallet;
|
|
17694
|
-
const coolModeRef = useCoolMode(iconUrl);
|
|
17695
|
-
const initialized = useRef12(false);
|
|
17696
|
-
const { i18n: i18n2 } = useContext34(I18nContext);
|
|
17697
|
-
const onConnect = useCallback35(async () => {
|
|
17698
|
-
const onMobileUri = async () => {
|
|
17699
|
-
const mobileUri = await (getMobileUri == null ? void 0 : getMobileUri());
|
|
17700
|
-
if (!mobileUri)
|
|
17701
|
-
return;
|
|
17702
|
-
if (mobileUri) {
|
|
17703
|
-
setWalletConnectDeepLink({ mobileUri, name });
|
|
17704
|
-
}
|
|
17705
|
-
if (mobileUri.startsWith("http")) {
|
|
17706
|
-
const link = document.createElement("a");
|
|
17707
|
-
link.href = mobileUri;
|
|
17708
|
-
link.target = "_blank";
|
|
17709
|
-
link.rel = "noreferrer noopener";
|
|
17710
|
-
link.click();
|
|
17711
|
-
} else {
|
|
17712
|
-
window.location.href = mobileUri;
|
|
17713
|
-
}
|
|
17714
|
-
};
|
|
17715
|
-
if (id !== "walletConnect")
|
|
17716
|
-
onMobileUri();
|
|
17717
|
-
if (showWalletConnectModal) {
|
|
17718
|
-
showWalletConnectModal();
|
|
17719
|
-
onClose == null ? void 0 : onClose();
|
|
17720
|
-
return;
|
|
17721
|
-
}
|
|
17722
|
-
connect == null ? void 0 : connect();
|
|
17723
|
-
}, [connect, getMobileUri, showWalletConnectModal, onClose, name, id]);
|
|
17724
|
-
useEffect39(() => {
|
|
17725
|
-
if (connecting && !initialized.current) {
|
|
17726
|
-
onConnect();
|
|
17727
|
-
initialized.current = true;
|
|
17728
|
-
}
|
|
17729
|
-
}, [connecting, onConnect]);
|
|
17730
|
-
return /* @__PURE__ */ React152.createElement(Box, {
|
|
17731
|
-
as: "button",
|
|
17732
|
-
color: ready ? "modalText" : "modalTextSecondary",
|
|
17733
|
-
disabled: !ready,
|
|
17734
|
-
fontFamily: "body",
|
|
17735
|
-
key: id,
|
|
17736
|
-
onClick: onConnect,
|
|
17737
|
-
ref: coolModeRef,
|
|
17738
|
-
style: { overflow: "visible", textAlign: "center" },
|
|
17739
|
-
testId: `wallet-option-${id}`,
|
|
17740
|
-
type: "button",
|
|
17741
|
-
width: "full"
|
|
17742
|
-
}, /* @__PURE__ */ React152.createElement(Box, {
|
|
17743
|
-
alignItems: "center",
|
|
17744
|
-
display: "flex",
|
|
17745
|
-
flexDirection: "column",
|
|
17746
|
-
justifyContent: "center"
|
|
17747
|
-
}, /* @__PURE__ */ React152.createElement(Box, {
|
|
17748
|
-
display: "flex",
|
|
17749
|
-
alignItems: "center",
|
|
17750
|
-
justifyContent: "center",
|
|
17751
|
-
paddingBottom: "8",
|
|
17752
|
-
paddingTop: "10",
|
|
17753
|
-
position: "relative"
|
|
17754
|
-
}, connecting ? /* @__PURE__ */ React152.createElement(LoadingSpinner, {
|
|
17755
|
-
wallet
|
|
17756
|
-
}) : null, /* @__PURE__ */ React152.createElement(AsyncImage, {
|
|
17757
|
-
background: iconBackground,
|
|
17758
|
-
borderRadius: "13",
|
|
17759
|
-
boxShadow: "walletLogo",
|
|
17760
|
-
height: "60",
|
|
17761
|
-
src: iconUrl,
|
|
17762
|
-
width: "60"
|
|
17763
|
-
})), !connecting ? /* @__PURE__ */ React152.createElement(Box, {
|
|
17764
|
-
display: "flex",
|
|
17765
|
-
flexDirection: "column",
|
|
17766
|
-
textAlign: "center"
|
|
17767
|
-
}, /* @__PURE__ */ React152.createElement(Text, {
|
|
17768
|
-
as: "h2",
|
|
17769
|
-
color: wallet.ready ? "modalText" : "modalTextSecondary",
|
|
17770
|
-
size: "13",
|
|
17771
|
-
weight: "medium"
|
|
17772
|
-
}, /* @__PURE__ */ React152.createElement(Box, {
|
|
17773
|
-
as: "span",
|
|
17774
|
-
position: "relative"
|
|
17775
|
-
}, shortName != null ? shortName : name, !wallet.ready && " (unsupported)")), wallet.recent && /* @__PURE__ */ React152.createElement(Text, {
|
|
17776
|
-
color: "accentColor",
|
|
17777
|
-
size: "12",
|
|
17778
|
-
weight: "medium"
|
|
17779
|
-
}, i18n2.t("connect.recent"))) : null));
|
|
17780
|
-
}
|
|
17781
|
-
function MobileOptions({ onClose }) {
|
|
17782
|
-
var _a;
|
|
17783
|
-
const titleId = "rk_connect_title";
|
|
17784
|
-
const wallets = useWalletConnectors().filter(
|
|
17785
|
-
(wallet) => wallet.isFunkitSdkConnector
|
|
17786
|
-
);
|
|
17787
|
-
const { disclaimer: Disclaimer, learnMoreUrl } = useContext34(AppContext);
|
|
17788
|
-
let headerLabel = null;
|
|
17789
|
-
let walletContent = null;
|
|
17790
|
-
let headerBackgroundContrast = false;
|
|
17791
|
-
let headerBackButtonLink = null;
|
|
17792
|
-
const [walletStep, setWalletStep] = useState47(
|
|
17793
|
-
"CONNECT" /* Connect */
|
|
17794
|
-
);
|
|
17795
|
-
const { i18n: i18n2 } = useContext34(I18nContext);
|
|
17796
|
-
const ios = isIOS();
|
|
17797
|
-
switch (walletStep) {
|
|
17798
|
-
case "CONNECT" /* Connect */: {
|
|
17799
|
-
headerLabel = i18n2.t("connect.title");
|
|
17800
|
-
headerBackgroundContrast = true;
|
|
17801
|
-
walletContent = /* @__PURE__ */ React152.createElement(Box, null, /* @__PURE__ */ React152.createElement(Box, {
|
|
17802
|
-
background: "profileForeground",
|
|
17803
|
-
className: scroll,
|
|
17804
|
-
display: "flex",
|
|
17805
|
-
paddingBottom: "20",
|
|
17806
|
-
paddingTop: "6"
|
|
17807
|
-
}, /* @__PURE__ */ React152.createElement(Box, {
|
|
17808
|
-
display: "flex",
|
|
17809
|
-
style: { margin: "0 auto" }
|
|
17810
|
-
}, wallets.filter((wallet) => wallet.ready).map((wallet) => {
|
|
17811
|
-
return /* @__PURE__ */ React152.createElement(Box, {
|
|
17812
|
-
key: wallet.id,
|
|
17813
|
-
paddingX: "20"
|
|
17814
|
-
}, /* @__PURE__ */ React152.createElement(Box, {
|
|
17815
|
-
width: "60"
|
|
17816
|
-
}, /* @__PURE__ */ React152.createElement(WalletButton2, {
|
|
17817
|
-
onClose,
|
|
17818
|
-
wallet
|
|
17819
|
-
})));
|
|
17820
|
-
}))), /* @__PURE__ */ React152.createElement(Box, {
|
|
17821
|
-
background: "generalBorder",
|
|
17822
|
-
height: "1",
|
|
17823
|
-
marginBottom: "32",
|
|
17824
|
-
marginTop: "-1"
|
|
17825
|
-
}), /* @__PURE__ */ React152.createElement(Box, {
|
|
17826
|
-
alignItems: "center",
|
|
17827
|
-
display: "flex",
|
|
17828
|
-
flexDirection: "column",
|
|
17829
|
-
gap: "32",
|
|
17830
|
-
paddingX: "32",
|
|
17831
|
-
style: { textAlign: "center" }
|
|
17832
|
-
}, /* @__PURE__ */ React152.createElement(Box, {
|
|
17833
|
-
display: "flex",
|
|
17834
|
-
flexDirection: "column",
|
|
17835
|
-
gap: "8",
|
|
17836
|
-
textAlign: "center"
|
|
17837
|
-
}, /* @__PURE__ */ React152.createElement(Text, {
|
|
17838
|
-
color: "modalText",
|
|
17839
|
-
size: "16",
|
|
17840
|
-
weight: "bold"
|
|
17841
|
-
}, i18n2.t("intro.title")), /* @__PURE__ */ React152.createElement(Text, {
|
|
17842
|
-
color: "modalTextSecondary",
|
|
17843
|
-
size: "16"
|
|
17844
|
-
}, i18n2.t("intro.description")))), /* @__PURE__ */ React152.createElement(Box, {
|
|
17845
|
-
paddingTop: "32",
|
|
17846
|
-
paddingX: "20"
|
|
17847
|
-
}, /* @__PURE__ */ React152.createElement(Box, {
|
|
17848
|
-
display: "flex",
|
|
17849
|
-
gap: "14",
|
|
17850
|
-
justifyContent: "center"
|
|
17851
|
-
}, /* @__PURE__ */ React152.createElement(ActionButton, {
|
|
17852
|
-
label: i18n2.t("intro.get.label"),
|
|
17853
|
-
onClick: () => setWalletStep("GET" /* Get */),
|
|
17854
|
-
size: "large",
|
|
17855
|
-
type: "secondary"
|
|
17856
|
-
}), /* @__PURE__ */ React152.createElement(ActionButton, {
|
|
17857
|
-
href: learnMoreUrl,
|
|
17858
|
-
label: i18n2.t("intro.learn_more.label"),
|
|
17859
|
-
size: "large",
|
|
17860
|
-
type: "secondary"
|
|
17861
|
-
}))), Disclaimer && /* @__PURE__ */ React152.createElement(Box, {
|
|
17862
|
-
marginTop: "28",
|
|
17863
|
-
marginX: "32",
|
|
17864
|
-
textAlign: "center"
|
|
17865
|
-
}, /* @__PURE__ */ React152.createElement(Disclaimer, {
|
|
17866
|
-
Link: DisclaimerLink,
|
|
17867
|
-
Text: DisclaimerText
|
|
17868
|
-
})));
|
|
17869
|
-
break;
|
|
17870
|
-
}
|
|
17871
|
-
case "GET" /* Get */: {
|
|
17872
|
-
headerLabel = i18n2.t("get.title");
|
|
17873
|
-
headerBackButtonLink = "CONNECT" /* Connect */;
|
|
17874
|
-
const mobileWallets = (_a = wallets == null ? void 0 : wallets.filter(
|
|
17875
|
-
(wallet) => {
|
|
17876
|
-
var _a2, _b, _c;
|
|
17877
|
-
return ((_a2 = wallet.downloadUrls) == null ? void 0 : _a2.ios) || ((_b = wallet.downloadUrls) == null ? void 0 : _b.android) || ((_c = wallet.downloadUrls) == null ? void 0 : _c.mobile);
|
|
17878
|
-
}
|
|
17879
|
-
)) == null ? void 0 : _a.splice(0, 3);
|
|
17880
|
-
walletContent = /* @__PURE__ */ React152.createElement(Box, null, /* @__PURE__ */ React152.createElement(Box, {
|
|
17881
|
-
alignItems: "center",
|
|
17882
|
-
display: "flex",
|
|
17883
|
-
flexDirection: "column",
|
|
17884
|
-
height: "full",
|
|
17885
|
-
marginBottom: "36",
|
|
17886
|
-
marginTop: "5",
|
|
17887
|
-
paddingTop: "12",
|
|
17888
|
-
width: "full"
|
|
17889
|
-
}, mobileWallets.map((wallet, index) => {
|
|
17890
|
-
const { downloadUrls, iconBackground, iconUrl, name } = wallet;
|
|
17891
|
-
if (!(downloadUrls == null ? void 0 : downloadUrls.ios) && !(downloadUrls == null ? void 0 : downloadUrls.android) && !(downloadUrls == null ? void 0 : downloadUrls.mobile)) {
|
|
17892
|
-
return null;
|
|
17893
|
-
}
|
|
17894
|
-
return /* @__PURE__ */ React152.createElement(Box, {
|
|
17895
|
-
display: "flex",
|
|
17896
|
-
gap: "16",
|
|
17897
|
-
key: wallet.id,
|
|
17898
|
-
paddingX: "20",
|
|
17899
|
-
width: "full"
|
|
17900
|
-
}, /* @__PURE__ */ React152.createElement(Box, {
|
|
17901
|
-
style: { minHeight: 48, minWidth: 48 }
|
|
17902
|
-
}, /* @__PURE__ */ React152.createElement(AsyncImage, {
|
|
17903
|
-
background: iconBackground,
|
|
17904
|
-
borderColor: "generalBorder",
|
|
17905
|
-
borderRadius: "10",
|
|
17906
|
-
height: "48",
|
|
17907
|
-
src: iconUrl,
|
|
17908
|
-
width: "48"
|
|
17909
|
-
})), /* @__PURE__ */ React152.createElement(Box, {
|
|
17910
|
-
display: "flex",
|
|
17911
|
-
flexDirection: "column",
|
|
17912
|
-
width: "full"
|
|
17913
|
-
}, /* @__PURE__ */ React152.createElement(Box, {
|
|
17914
|
-
alignItems: "center",
|
|
17915
|
-
display: "flex",
|
|
17916
|
-
height: "48"
|
|
17917
|
-
}, /* @__PURE__ */ React152.createElement(Box, {
|
|
17918
|
-
width: "full"
|
|
17919
|
-
}, /* @__PURE__ */ React152.createElement(Text, {
|
|
17920
|
-
color: "modalText",
|
|
17921
|
-
size: "18",
|
|
17922
|
-
weight: "bold"
|
|
17923
|
-
}, name)), /* @__PURE__ */ React152.createElement(ActionButton, {
|
|
17924
|
-
href: (ios ? downloadUrls == null ? void 0 : downloadUrls.ios : downloadUrls == null ? void 0 : downloadUrls.android) || (downloadUrls == null ? void 0 : downloadUrls.mobile),
|
|
17925
|
-
label: i18n2.t("get.action.label"),
|
|
17926
|
-
size: "small",
|
|
17927
|
-
type: "secondary"
|
|
17928
|
-
})), index < mobileWallets.length - 1 && /* @__PURE__ */ React152.createElement(Box, {
|
|
17929
|
-
background: "generalBorderDim",
|
|
17930
|
-
height: "1",
|
|
17931
|
-
marginY: "10",
|
|
17932
|
-
width: "full"
|
|
17933
|
-
})));
|
|
17934
|
-
})), /* @__PURE__ */ React152.createElement(Box, {
|
|
17935
|
-
style: { marginBottom: "42px" }
|
|
17936
|
-
}), /* @__PURE__ */ React152.createElement(Box, {
|
|
17937
|
-
alignItems: "center",
|
|
17938
|
-
display: "flex",
|
|
17939
|
-
flexDirection: "column",
|
|
17940
|
-
gap: "36",
|
|
17941
|
-
paddingX: "36",
|
|
17942
|
-
style: { textAlign: "center" }
|
|
17943
|
-
}, /* @__PURE__ */ React152.createElement(Box, {
|
|
17944
|
-
display: "flex",
|
|
17945
|
-
flexDirection: "column",
|
|
17946
|
-
gap: "12",
|
|
17947
|
-
textAlign: "center"
|
|
17948
|
-
}, /* @__PURE__ */ React152.createElement(Text, {
|
|
17949
|
-
color: "modalText",
|
|
17950
|
-
size: "16",
|
|
17951
|
-
weight: "bold"
|
|
17952
|
-
}, i18n2.t("get.looking_for.title")), /* @__PURE__ */ React152.createElement(Text, {
|
|
17953
|
-
color: "modalTextSecondary",
|
|
17954
|
-
size: "16"
|
|
17955
|
-
}, i18n2.t("get.looking_for.mobile.description")))));
|
|
17956
|
-
break;
|
|
17957
|
-
}
|
|
17958
|
-
}
|
|
17959
|
-
return /* @__PURE__ */ React152.createElement(Box, {
|
|
17960
|
-
display: "flex",
|
|
17961
|
-
flexDirection: "column",
|
|
17962
|
-
paddingBottom: "36"
|
|
17963
|
-
}, /* @__PURE__ */ React152.createElement(Box, {
|
|
17964
|
-
background: headerBackgroundContrast ? "profileForeground" : "modalBackground",
|
|
17965
|
-
display: "flex",
|
|
17966
|
-
flexDirection: "column",
|
|
17967
|
-
paddingBottom: "4",
|
|
17968
|
-
paddingTop: "14"
|
|
17969
|
-
}, /* @__PURE__ */ React152.createElement(Box, {
|
|
17970
|
-
display: "flex",
|
|
17971
|
-
justifyContent: "center",
|
|
17972
|
-
paddingBottom: "6",
|
|
17973
|
-
paddingX: "20",
|
|
17974
|
-
position: "relative"
|
|
17975
|
-
}, headerBackButtonLink && /* @__PURE__ */ React152.createElement(Box, {
|
|
17976
|
-
display: "flex",
|
|
17977
|
-
position: "absolute",
|
|
17978
|
-
style: {
|
|
17979
|
-
left: 0,
|
|
17980
|
-
marginBottom: -20,
|
|
17981
|
-
marginTop: -20
|
|
17982
|
-
}
|
|
17983
|
-
}, /* @__PURE__ */ React152.createElement(Box, {
|
|
17984
|
-
alignItems: "center",
|
|
17985
|
-
as: "button",
|
|
17986
|
-
className: touchableStyles({
|
|
17987
|
-
active: "shrinkSm",
|
|
17988
|
-
hover: "growLg"
|
|
17989
|
-
}),
|
|
17990
|
-
color: "accentColor",
|
|
17991
|
-
display: "flex",
|
|
17992
|
-
marginLeft: "4",
|
|
17993
|
-
marginTop: "20",
|
|
17994
|
-
onClick: () => setWalletStep(headerBackButtonLink),
|
|
17995
|
-
padding: "16",
|
|
17996
|
-
style: { height: 17, willChange: "transform" },
|
|
17997
|
-
transition: "default",
|
|
17998
|
-
type: "button"
|
|
17999
|
-
}, /* @__PURE__ */ React152.createElement(BackIcon, null))), /* @__PURE__ */ React152.createElement(Box, {
|
|
18000
|
-
marginTop: "4",
|
|
18001
|
-
textAlign: "center",
|
|
18002
|
-
width: "full"
|
|
18003
|
-
}, /* @__PURE__ */ React152.createElement(Text, {
|
|
18004
|
-
as: "h1",
|
|
18005
|
-
color: "modalText",
|
|
18006
|
-
id: titleId,
|
|
18007
|
-
size: "20",
|
|
18008
|
-
weight: "bold"
|
|
18009
|
-
}, headerLabel)), /* @__PURE__ */ React152.createElement(Box, {
|
|
18010
|
-
alignItems: "center",
|
|
18011
|
-
display: "flex",
|
|
18012
|
-
height: "32",
|
|
18013
|
-
paddingRight: "14",
|
|
18014
|
-
position: "absolute",
|
|
18015
|
-
right: "0"
|
|
18016
|
-
}, /* @__PURE__ */ React152.createElement(Box, {
|
|
18017
|
-
style: { marginBottom: -20, marginTop: -20 }
|
|
18018
|
-
}, /* @__PURE__ */ React152.createElement(CloseButton, {
|
|
18019
|
-
onClose
|
|
18020
|
-
}))))), /* @__PURE__ */ React152.createElement(Box, {
|
|
18021
|
-
display: "flex",
|
|
18022
|
-
flexDirection: "column"
|
|
18023
|
-
}, walletContent));
|
|
18024
|
-
}
|
|
18025
|
-
|
|
18026
16340
|
// src/__private__/index.ts
|
|
18027
16341
|
var __private__ = {
|
|
18028
|
-
DesktopOptions,
|
|
18029
16342
|
dialogContent,
|
|
18030
|
-
dialogContentMobile
|
|
18031
|
-
MobileOptions
|
|
16343
|
+
dialogContentMobile
|
|
18032
16344
|
};
|
|
18033
16345
|
|
|
18034
16346
|
// src/components/Icons/FunkitPaymentsIconLine.tsx
|
|
18035
|
-
import
|
|
16347
|
+
import React142 from "react";
|
|
18036
16348
|
function MetaMaskPaymentIcon({ size = 16 }) {
|
|
18037
|
-
return /* @__PURE__ */
|
|
16349
|
+
return /* @__PURE__ */ React142.createElement("svg", {
|
|
18038
16350
|
width: size,
|
|
18039
16351
|
height: size,
|
|
18040
16352
|
viewBox: "0 0 28 28",
|
|
18041
16353
|
fill: "none",
|
|
18042
16354
|
xmlns: "http://www.w3.org/2000/svg"
|
|
18043
|
-
}, /* @__PURE__ */
|
|
16355
|
+
}, /* @__PURE__ */ React142.createElement("path", {
|
|
18044
16356
|
d: "M24.0891 3.1199L15.3446 9.61456L16.9617 5.7828L24.0891 3.1199Z",
|
|
18045
16357
|
fill: "#E2761B",
|
|
18046
16358
|
stroke: "#E2761B",
|
|
18047
16359
|
strokeWidth: "0.0878845",
|
|
18048
16360
|
strokeLinecap: "round",
|
|
18049
16361
|
strokeLinejoin: "round"
|
|
18050
|
-
}), /* @__PURE__ */
|
|
16362
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18051
16363
|
d: "M3.90207 3.1199L12.5763 9.67608L11.0383 5.7828L3.90207 3.1199Z",
|
|
18052
16364
|
fill: "#E4761B",
|
|
18053
16365
|
stroke: "#E4761B",
|
|
18054
16366
|
strokeWidth: "0.0878845",
|
|
18055
16367
|
strokeLinecap: "round",
|
|
18056
16368
|
strokeLinejoin: "round"
|
|
18057
|
-
}), /* @__PURE__ */
|
|
16369
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18058
16370
|
d: "M20.9429 18.1745L18.6139 21.7426L23.597 23.1136L25.0295 18.2536L20.9429 18.1745Z",
|
|
18059
16371
|
fill: "#E4761B",
|
|
18060
16372
|
stroke: "#E4761B",
|
|
18061
16373
|
strokeWidth: "0.0878845",
|
|
18062
16374
|
strokeLinecap: "round",
|
|
18063
16375
|
strokeLinejoin: "round"
|
|
18064
|
-
}), /* @__PURE__ */
|
|
16376
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18065
16377
|
d: "M2.97929 18.2536L4.40301 23.1136L9.38607 21.7426L7.05713 18.1745L2.97929 18.2536Z",
|
|
18066
16378
|
fill: "#E4761B",
|
|
18067
16379
|
stroke: "#E4761B",
|
|
18068
16380
|
strokeWidth: "0.0878845",
|
|
18069
16381
|
strokeLinecap: "round",
|
|
18070
16382
|
strokeLinejoin: "round"
|
|
18071
|
-
}), /* @__PURE__ */
|
|
16383
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18072
16384
|
d: "M9.10483 12.1456L7.71626 14.2461L12.6642 14.4658L12.4884 9.14877L9.10483 12.1456Z",
|
|
18073
16385
|
fill: "#E4761B",
|
|
18074
16386
|
stroke: "#E4761B",
|
|
18075
16387
|
strokeWidth: "0.0878845",
|
|
18076
16388
|
strokeLinecap: "round",
|
|
18077
16389
|
strokeLinejoin: "round"
|
|
18078
|
-
}), /* @__PURE__ */
|
|
16390
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18079
16391
|
d: "M18.8864 12.1456L15.4589 9.08725L15.3446 14.4658L20.2837 14.2461L18.8864 12.1456Z",
|
|
18080
16392
|
fill: "#E4761B",
|
|
18081
16393
|
stroke: "#E4761B",
|
|
18082
16394
|
strokeWidth: "0.0878845",
|
|
18083
16395
|
strokeLinecap: "round",
|
|
18084
16396
|
strokeLinejoin: "round"
|
|
18085
|
-
}), /* @__PURE__ */
|
|
16397
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18086
16398
|
d: "M9.38606 21.7426L12.3566 20.2925L9.79033 18.2888L9.38606 21.7426Z",
|
|
18087
16399
|
fill: "#E4761B",
|
|
18088
16400
|
stroke: "#E4761B",
|
|
18089
16401
|
strokeWidth: "0.0878845",
|
|
18090
16402
|
strokeLinecap: "round",
|
|
18091
16403
|
strokeLinejoin: "round"
|
|
18092
|
-
}), /* @__PURE__ */
|
|
16404
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18093
16405
|
d: "M15.6347 20.2925L18.6139 21.7426L18.2009 18.2888L15.6347 20.2925Z",
|
|
18094
16406
|
fill: "#E4761B",
|
|
18095
16407
|
stroke: "#E4761B",
|
|
18096
16408
|
strokeWidth: "0.0878845",
|
|
18097
16409
|
strokeLinecap: "round",
|
|
18098
16410
|
strokeLinejoin: "round"
|
|
18099
|
-
}), /* @__PURE__ */
|
|
16411
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18100
16412
|
d: "M18.6139 21.7426L15.6347 20.2925L15.8719 22.2348L15.8456 23.0521L18.6139 21.7426Z",
|
|
18101
16413
|
fill: "#D7C1B3",
|
|
18102
16414
|
stroke: "#D7C1B3",
|
|
18103
16415
|
strokeWidth: "0.0878845",
|
|
18104
16416
|
strokeLinecap: "round",
|
|
18105
16417
|
strokeLinejoin: "round"
|
|
18106
|
-
}), /* @__PURE__ */
|
|
16418
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18107
16419
|
d: "M9.38606 21.7426L12.1544 23.0521L12.1368 22.2348L12.3566 20.2925L9.38606 21.7426Z",
|
|
18108
16420
|
fill: "#D7C1B3",
|
|
18109
16421
|
stroke: "#D7C1B3",
|
|
18110
16422
|
strokeWidth: "0.0878845",
|
|
18111
16423
|
strokeLinecap: "round",
|
|
18112
16424
|
strokeLinejoin: "round"
|
|
18113
|
-
}), /* @__PURE__ */
|
|
16425
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18114
16426
|
d: "M12.1984 17.0056L9.72002 16.2762L11.4689 15.4765L12.1984 17.0056Z",
|
|
18115
16427
|
fill: "#233447",
|
|
18116
16428
|
stroke: "#233447",
|
|
18117
16429
|
strokeWidth: "0.0878845",
|
|
18118
16430
|
strokeLinecap: "round",
|
|
18119
16431
|
strokeLinejoin: "round"
|
|
18120
|
-
}), /* @__PURE__ */
|
|
16432
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18121
16433
|
d: "M15.7928 17.0056L16.5223 15.4765L18.28 16.2762L15.7928 17.0056Z",
|
|
18122
16434
|
fill: "#233447",
|
|
18123
16435
|
stroke: "#233447",
|
|
18124
16436
|
strokeWidth: "0.0878845",
|
|
18125
16437
|
strokeLinecap: "round",
|
|
18126
16438
|
strokeLinejoin: "round"
|
|
18127
|
-
}), /* @__PURE__ */
|
|
16439
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18128
16440
|
d: "M9.38606 21.7426L9.80791 18.1745L7.05712 18.2536L9.38606 21.7426Z",
|
|
18129
16441
|
fill: "#CD6116",
|
|
18130
16442
|
stroke: "#CD6116",
|
|
18131
16443
|
strokeWidth: "0.0878845",
|
|
18132
16444
|
strokeLinecap: "round",
|
|
18133
16445
|
strokeLinejoin: "round"
|
|
18134
|
-
}), /* @__PURE__ */
|
|
16446
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18135
16447
|
d: "M18.1921 18.1745L18.6139 21.7426L20.9429 18.2536L18.1921 18.1745Z",
|
|
18136
16448
|
fill: "#CD6116",
|
|
18137
16449
|
stroke: "#CD6116",
|
|
18138
16450
|
strokeWidth: "0.0878845",
|
|
18139
16451
|
strokeLinecap: "round",
|
|
18140
16452
|
strokeLinejoin: "round"
|
|
18141
|
-
}), /* @__PURE__ */
|
|
16453
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18142
16454
|
d: "M20.2837 14.2461L15.3446 14.4658L15.8016 17.0057L16.5311 15.4765L18.2888 16.2762L20.2837 14.2461Z",
|
|
18143
16455
|
fill: "#CD6116",
|
|
18144
16456
|
stroke: "#CD6116",
|
|
18145
16457
|
strokeWidth: "0.0878845",
|
|
18146
16458
|
strokeLinecap: "round",
|
|
18147
16459
|
strokeLinejoin: "round"
|
|
18148
|
-
}), /* @__PURE__ */
|
|
16460
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18149
16461
|
d: "M9.72002 16.2762L11.4777 15.4765L12.1984 17.0057L12.6642 14.4658L7.71626 14.2461L9.72002 16.2762Z",
|
|
18150
16462
|
fill: "#CD6116",
|
|
18151
16463
|
stroke: "#CD6116",
|
|
18152
16464
|
strokeWidth: "0.0878845",
|
|
18153
16465
|
strokeLinecap: "round",
|
|
18154
16466
|
strokeLinejoin: "round"
|
|
18155
|
-
}), /* @__PURE__ */
|
|
16467
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18156
16468
|
d: "M7.71626 14.2461L9.79033 18.2888L9.72002 16.2762L7.71626 14.2461Z",
|
|
18157
16469
|
fill: "#E4751F",
|
|
18158
16470
|
stroke: "#E4751F",
|
|
18159
16471
|
strokeWidth: "0.0878845",
|
|
18160
16472
|
strokeLinecap: "round",
|
|
18161
16473
|
strokeLinejoin: "round"
|
|
18162
|
-
}), /* @__PURE__ */
|
|
16474
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18163
16475
|
d: "M18.2888 16.2762L18.2009 18.2888L20.2837 14.2461L18.2888 16.2762Z",
|
|
18164
16476
|
fill: "#E4751F",
|
|
18165
16477
|
stroke: "#E4751F",
|
|
18166
16478
|
strokeWidth: "0.0878845",
|
|
18167
16479
|
strokeLinecap: "round",
|
|
18168
16480
|
strokeLinejoin: "round"
|
|
18169
|
-
}), /* @__PURE__ */
|
|
16481
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18170
16482
|
d: "M12.6642 14.4658L12.1984 17.0057L12.7784 20.0025L12.9102 16.0565L12.6642 14.4658Z",
|
|
18171
16483
|
fill: "#E4751F",
|
|
18172
16484
|
stroke: "#E4751F",
|
|
18173
16485
|
strokeWidth: "0.0878845",
|
|
18174
16486
|
strokeLinecap: "round",
|
|
18175
16487
|
strokeLinejoin: "round"
|
|
18176
|
-
}), /* @__PURE__ */
|
|
16488
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18177
16489
|
d: "M15.3446 14.4658L15.1073 16.0477L15.2128 20.0025L15.8016 17.0057L15.3446 14.4658Z",
|
|
18178
16490
|
fill: "#E4751F",
|
|
18179
16491
|
stroke: "#E4751F",
|
|
18180
16492
|
strokeWidth: "0.0878845",
|
|
18181
16493
|
strokeLinecap: "round",
|
|
18182
16494
|
strokeLinejoin: "round"
|
|
18183
|
-
}), /* @__PURE__ */
|
|
16495
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18184
16496
|
d: "M15.8016 17.0056L15.2128 20.0025L15.6347 20.2925L18.2009 18.2888L18.2888 16.2762L15.8016 17.0056Z",
|
|
18185
16497
|
fill: "#F6851B",
|
|
18186
16498
|
stroke: "#F6851B",
|
|
18187
16499
|
strokeWidth: "0.0878845",
|
|
18188
16500
|
strokeLinecap: "round",
|
|
18189
16501
|
strokeLinejoin: "round"
|
|
18190
|
-
}), /* @__PURE__ */
|
|
16502
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18191
16503
|
d: "M9.72002 16.2762L9.79033 18.2888L12.3566 20.2925L12.7784 20.0025L12.1984 17.0056L9.72002 16.2762Z",
|
|
18192
16504
|
fill: "#F6851B",
|
|
18193
16505
|
stroke: "#F6851B",
|
|
18194
16506
|
strokeWidth: "0.0878845",
|
|
18195
16507
|
strokeLinecap: "round",
|
|
18196
16508
|
strokeLinejoin: "round"
|
|
18197
|
-
}), /* @__PURE__ */
|
|
16509
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18198
16510
|
d: "M15.8456 23.0521L15.8719 22.2348L15.6522 22.0414H12.339L12.1368 22.2348L12.1544 23.0521L9.38606 21.7426L10.3528 22.5336L12.3126 23.8958H15.6786L17.6472 22.5336L18.6139 21.7426L15.8456 23.0521Z",
|
|
18199
16511
|
fill: "#C0AD9E",
|
|
18200
16512
|
stroke: "#C0AD9E",
|
|
18201
16513
|
strokeWidth: "0.0878845",
|
|
18202
16514
|
strokeLinecap: "round",
|
|
18203
16515
|
strokeLinejoin: "round"
|
|
18204
|
-
}), /* @__PURE__ */
|
|
16516
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18205
16517
|
d: "M15.6347 20.2925L15.2128 20.0025H12.7784L12.3566 20.2925L12.1368 22.2348L12.339 22.0414H15.6522L15.8719 22.2348L15.6347 20.2925Z",
|
|
18206
16518
|
fill: "#161616",
|
|
18207
16519
|
stroke: "#161616",
|
|
18208
16520
|
strokeWidth: "0.0878845",
|
|
18209
16521
|
strokeLinecap: "round",
|
|
18210
16522
|
strokeLinejoin: "round"
|
|
18211
|
-
}), /* @__PURE__ */
|
|
16523
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18212
16524
|
d: "M24.4583 10.0364L25.2053 6.45072L24.0891 3.1199L15.6347 9.39485L18.8864 12.1456L23.4827 13.4903L24.5022 12.3038L24.0628 11.9874L24.7658 11.3459L24.221 10.924L24.924 10.3879L24.4583 10.0364Z",
|
|
18213
16525
|
fill: "#763D16",
|
|
18214
16526
|
stroke: "#763D16",
|
|
18215
16527
|
strokeWidth: "0.0878845",
|
|
18216
16528
|
strokeLinecap: "round",
|
|
18217
16529
|
strokeLinejoin: "round"
|
|
18218
|
-
}), /* @__PURE__ */
|
|
16530
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18219
16531
|
d: "M2.79472 6.45072L3.54174 10.0364L3.06717 10.3879L3.77024 10.924L3.23415 11.3459L3.93722 11.9874L3.4978 12.3038L4.50847 13.4903L9.10483 12.1456L12.3566 9.39485L3.90207 3.1199L2.79472 6.45072Z",
|
|
18220
16532
|
fill: "#763D16",
|
|
18221
16533
|
stroke: "#763D16",
|
|
18222
16534
|
strokeWidth: "0.0878845",
|
|
18223
16535
|
strokeLinecap: "round",
|
|
18224
16536
|
strokeLinejoin: "round"
|
|
18225
|
-
}), /* @__PURE__ */
|
|
16537
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18226
16538
|
d: "M23.4827 13.4903L18.8864 12.1456L20.2837 14.2461L18.2009 18.2888L20.9429 18.2536H25.0295L23.4827 13.4903Z",
|
|
18227
16539
|
fill: "#F6851B",
|
|
18228
16540
|
stroke: "#F6851B",
|
|
18229
16541
|
strokeWidth: "0.0878845",
|
|
18230
16542
|
strokeLinecap: "round",
|
|
18231
16543
|
strokeLinejoin: "round"
|
|
18232
|
-
}), /* @__PURE__ */
|
|
16544
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18233
16545
|
d: "M9.10484 12.1456L4.50848 13.4903L2.97929 18.2536H7.05713L9.79033 18.2888L7.71626 14.2461L9.10484 12.1456Z",
|
|
18234
16546
|
fill: "#F6851B",
|
|
18235
16547
|
stroke: "#F6851B",
|
|
18236
16548
|
strokeWidth: "0.0878845",
|
|
18237
16549
|
strokeLinecap: "round",
|
|
18238
16550
|
strokeLinejoin: "round"
|
|
18239
|
-
}), /* @__PURE__ */
|
|
16551
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18240
16552
|
d: "M15.3446 14.4658L15.6347 9.39485L16.9705 5.7828H11.0383L12.3566 9.39485L12.6642 14.4658L12.7696 16.0653L12.7784 20.0025H15.2128L15.2304 16.0653L15.3446 14.4658Z",
|
|
18241
16553
|
fill: "#F6851B",
|
|
18242
16554
|
stroke: "#F6851B",
|
|
@@ -18246,29 +16558,29 @@ function MetaMaskPaymentIcon({ size = 16 }) {
|
|
|
18246
16558
|
}));
|
|
18247
16559
|
}
|
|
18248
16560
|
function MastercardPaymentIcon({ size = 16 }) {
|
|
18249
|
-
return /* @__PURE__ */
|
|
16561
|
+
return /* @__PURE__ */ React142.createElement("svg", {
|
|
18250
16562
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18251
16563
|
height: size,
|
|
18252
16564
|
viewBox: "0 0 152.407 108"
|
|
18253
|
-
}, /* @__PURE__ */
|
|
16565
|
+
}, /* @__PURE__ */ React142.createElement("g", null, /* @__PURE__ */ React142.createElement("rect", {
|
|
18254
16566
|
width: "152.407",
|
|
18255
16567
|
height: "108",
|
|
18256
16568
|
fill: "transparent"
|
|
18257
|
-
}), /* @__PURE__ */
|
|
16569
|
+
}), /* @__PURE__ */ React142.createElement("g", null, /* @__PURE__ */ React142.createElement("rect", {
|
|
18258
16570
|
x: "60.4117",
|
|
18259
16571
|
y: "25.6968",
|
|
18260
16572
|
width: "31.5",
|
|
18261
16573
|
height: "56.6064",
|
|
18262
16574
|
fill: "#ff5f00"
|
|
18263
|
-
}), /* @__PURE__ */
|
|
16575
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18264
16576
|
d: "M382.20839,306a35.9375,35.9375,0,0,1,13.7499-28.3032,36,36,0,1,0,0,56.6064A35.938,35.938,0,0,1,382.20839,306Z",
|
|
18265
16577
|
transform: "translate(-319.79649 -252)",
|
|
18266
16578
|
fill: "#eb001b"
|
|
18267
|
-
}), /* @__PURE__ */
|
|
16579
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18268
16580
|
d: "M454.20349,306a35.99867,35.99867,0,0,1-58.2452,28.3032,36.00518,36.00518,0,0,0,0-56.6064A35.99867,35.99867,0,0,1,454.20349,306Z",
|
|
18269
16581
|
transform: "translate(-319.79649 -252)",
|
|
18270
16582
|
fill: "#f79e1b"
|
|
18271
|
-
}), /* @__PURE__ */
|
|
16583
|
+
}), /* @__PURE__ */ React142.createElement("path", {
|
|
18272
16584
|
d: "M450.76889,328.3077v-1.1589h.4673v-.2361h-1.1901v.2361h.4675v1.1589Zm2.3105,0v-1.3973h-.3648l-.41959.9611-.41971-.9611h-.365v1.3973h.2576v-1.054l.3935.9087h.2671l.39351-.911v1.0563Z",
|
|
18273
16585
|
transform: "translate(-319.79649 -252)",
|
|
18274
16586
|
fill: "#f79e1b"
|
|
@@ -18278,29 +16590,29 @@ function FunkitPaymentsIconLine({
|
|
|
18278
16590
|
size = 16,
|
|
18279
16591
|
gap = "2"
|
|
18280
16592
|
}) {
|
|
18281
|
-
return /* @__PURE__ */
|
|
16593
|
+
return /* @__PURE__ */ React142.createElement(Box, {
|
|
18282
16594
|
display: "flex",
|
|
18283
16595
|
flexDirection: "row",
|
|
18284
16596
|
gap,
|
|
18285
16597
|
alignItems: "center",
|
|
18286
16598
|
justifyContent: "center"
|
|
18287
|
-
}, /* @__PURE__ */
|
|
16599
|
+
}, /* @__PURE__ */ React142.createElement(MetaMaskPaymentIcon, {
|
|
18288
16600
|
size
|
|
18289
|
-
}), /* @__PURE__ */
|
|
16601
|
+
}), /* @__PURE__ */ React142.createElement(MastercardPaymentIcon, {
|
|
18290
16602
|
size
|
|
18291
|
-
}), /* @__PURE__ */
|
|
16603
|
+
}), /* @__PURE__ */ React142.createElement(CoinbaseIcon, {
|
|
18292
16604
|
size
|
|
18293
16605
|
}));
|
|
18294
16606
|
}
|
|
18295
16607
|
|
|
18296
16608
|
// src/transactions/useAddRecentTransaction.ts
|
|
18297
|
-
import { useCallback as
|
|
16609
|
+
import { useCallback as useCallback35 } from "react";
|
|
18298
16610
|
import { useAccount as useAccount18 } from "wagmi";
|
|
18299
16611
|
function useAddRecentTransaction() {
|
|
18300
16612
|
const store = useTransactionStore();
|
|
18301
16613
|
const { address } = useAccount18();
|
|
18302
16614
|
const chainId = useChainId();
|
|
18303
|
-
return
|
|
16615
|
+
return useCallback35(
|
|
18304
16616
|
(transaction) => {
|
|
18305
16617
|
if (!address || !chainId) {
|
|
18306
16618
|
throw new Error("No address or chain ID found");
|