@funkit/connect 3.0.1 → 3.0.3
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 +24 -0
- package/dist/components/Dialog/Dialog.css.d.ts +1 -0
- package/dist/components/Dialog/Dialog.d.ts +2 -1
- package/dist/components/FunButton/FunIconButton.d.ts +1 -0
- package/dist/config/getDefaultConfig.d.ts +428 -3148
- package/dist/consts/customers.d.ts +1 -0
- package/dist/index.css +9 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +80 -40
- package/dist/providers/FunkitCheckoutContext.d.ts +2 -0
- package/dist/utils/flags/config.d.ts +4 -1
- package/dist/utils/flags/index.d.ts +1 -0
- package/dist/wallets/walletConnectors/chunk-25VW5TZP.js +92 -0
- package/dist/wallets/walletConnectors/chunk-4HKPVECK.js +95 -0
- package/dist/wallets/walletConnectors/chunk-4K3EKHXR.js +71 -0
- package/dist/wallets/walletConnectors/chunk-57UUMOOZ.js +95 -0
- package/dist/wallets/walletConnectors/chunk-5MVCKMZT.js +94 -0
- package/dist/wallets/walletConnectors/chunk-5NZLWT3Y.js +73 -0
- package/dist/wallets/walletConnectors/chunk-B5D7DYVV.js +101 -0
- package/dist/wallets/walletConnectors/chunk-HCKLWBE5.js +98 -0
- package/dist/wallets/walletConnectors/chunk-HLH777AC.js +108 -0
- package/dist/wallets/walletConnectors/chunk-HMDUVRZP.js +98 -0
- package/dist/wallets/walletConnectors/chunk-IR3YKU2N.js +103 -0
- package/dist/wallets/walletConnectors/chunk-J2BF4L2V.js +87 -0
- package/dist/wallets/walletConnectors/chunk-KDGMYRMC.js +102 -0
- package/dist/wallets/walletConnectors/chunk-OKUX4BC4.js +66 -0
- package/dist/wallets/walletConnectors/chunk-VU6B3HMD.js +96 -0
- package/dist/wallets/walletConnectors/chunk-WAMHUVNP.js +96 -0
- package/dist/wallets/walletConnectors/chunk-YRK6XWL6.js +149 -0
- package/dist/wallets/walletConnectors/chunk-ZCKNEKQQ.js +110 -0
- package/dist/wallets/walletConnectors/index.js +67 -67
- package/package.json +6 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DYDX_API_KEY = "NJq0CGrsE19xBbP1vHyBOp8xJvzYo9kayJHqDFP5";
|
package/dist/index.css
CHANGED
|
@@ -5987,7 +5987,7 @@
|
|
|
5987
5987
|
--_7rkubb1: 0.9;
|
|
5988
5988
|
}
|
|
5989
5989
|
|
|
5990
|
-
/* vanilla-extract-css-ns:src/components/Dialog/Dialog.css.ts.vanilla.css?source=#
|
|
5990
|
+
/* vanilla-extract-css-ns:src/components/Dialog/Dialog.css.ts.vanilla.css?source=#H4sIAAAAAAAAE9WUzY6bMBSF9zzF3VRKpRgZEpKJs5nn6KZy4BpuxzbIdpqfKu9eQWgC7TDNzKbqCv8cn/NdX4vnFzwpJw16+Jq4J5WtOfyIAPin7gMQnLRe1c4I8LnUOOPxJvu8jQAuEUDCp4VJr7pEz3+EJH8JSR5KGKC8FpKOQ+pG5hROAvgr3rfNZNpvMeGXvOXHp/3yKb44/SBh8SHCX3GXKO59sk4jLRkZqLbifqNpxo2HfL+jnO3wTOhmPF7Mgc+Bx3w1h2vndnUItRHAUs6bY7uiUYXhvJFFQbYUcFtxVFYjSaib0fTe/m6oZcAvM97lnRnZAo8C0mS5Xj4tVsvVdlDPeqKeBSTp/1jPZqIe/kh/5u/uppFHdqAiVKJ9QN8PQ5TdBEryyNXO392It1BwjMKKveuZFpwbvx1tBjJkS6b2Nr9qNFmUbixSpDUzdYECVO0O0hW/uVhp8FZyPoRR/ximGMKUHYyqbWCeziggTftXTBZZhdeXmm7axfupqjtVkG+0PAlQGrszUlNpGQU0XkCONmAH+m3vA6kTy2sb0AYBvpE5sh2GA6JtFX3f1F7rdtr6MV85si/9b9KQvcFkqw7mJx/0QpKgBgAA */
|
|
5991
5991
|
@keyframes _1r8f570 {
|
|
5992
5992
|
0% {
|
|
5993
5993
|
transform: scale(0.95);
|
|
@@ -6080,6 +6080,14 @@
|
|
|
6080
6080
|
font-size: 22px;
|
|
6081
6081
|
line-height: 29px;
|
|
6082
6082
|
}
|
|
6083
|
+
[data-rk] ._1r8f57h {
|
|
6084
|
+
display: flex;
|
|
6085
|
+
align-items: center;
|
|
6086
|
+
justify-content: space-between;
|
|
6087
|
+
width: full;
|
|
6088
|
+
flex-shrink: 0;
|
|
6089
|
+
min-height: 56px;
|
|
6090
|
+
}
|
|
6083
6091
|
|
|
6084
6092
|
/* vanilla-extract-css-ns:src/components/FunButton/FunButton.css.ts.vanilla.css?source=QGtleWZyYW1lcyBfMXR5eDVudTcgewogIDAlIHsKICAgIHRyYW5zZm9ybTogcm90YXRlKDBkZWcpOwogIH0KICAzMyUgewogICAgdHJhbnNmb3JtOiByb3RhdGUoMjAwZGVnKTsKICB9CiAgNjYlIHsKICAgIHRyYW5zZm9ybTogcm90YXRlKDE2MGRlZyk7CiAgfQogIDEwMCUgewogICAgdHJhbnNmb3JtOiByb3RhdGUoMTgwZGVnKTsKICB9Cn0KLl8xdHl4NW51MSB7CiAgY3Vyc29yOiBwb2ludGVyOwp9Ci5fMXR5eDVudTE6aG92ZXIgewogIHRleHQtZGVjb3JhdGlvbi1saW5lOiB1bmRlcmxpbmU7Cn0KLl8xdHl4NW51MiB7CiAgdHJhbnNpdGlvbjogYWxsIDE1MG1zIGN1YmljLWJlemllcigwLjMsIDAsIDAuMDYsIDEpOwp9Ci5fMXR5eDVudTM6YWN0aXZlIHsKICB0cmFuc2Zvcm06IHNjYWxlKDAuOTgpOwp9Ci5fMXR5eDVudTQgewogIGN1cnNvcjogcG9pbnRlcjsKfQouXzF0eXg1bnU0OmZvY3VzLXZpc2libGUgewogIGJvcmRlci13aWR0aDogMnB4Owp9Ci5fMXR5eDVudTUgewogIGN1cnNvcjogZGVmYXVsdDsKfQouXzF0eXg1bnU2IHsKICBjdXJzb3I6IG5vdC1hbGxvd2VkOwp9Ci5fMXR5eDVudTggewogIGFuaW1hdGlvbjogXzF0eXg1bnU3IDFzOwp9 */
|
|
6085
6093
|
@keyframes _1tyx5nu7 {
|
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export type { DisclaimerComponent } from './providers/AppContext';
|
|
|
13
13
|
export type { AuthenticationConfig, AuthenticationStatus, } from './providers/AuthenticationContext';
|
|
14
14
|
export { createAuthenticationAdapter, FunkitConnectAuthenticationProvider, } from './providers/AuthenticationContext';
|
|
15
15
|
export type { AvatarComponent } from './providers/AvatarContext';
|
|
16
|
+
export type { FunkitCheckoutConfig } from './providers/FunkitCheckoutContext';
|
|
16
17
|
export { useFunkitCheckout } from './providers/FunkitCheckoutContext';
|
|
17
18
|
export type { FunkitConfig } from './providers/FunkitConfigContext';
|
|
18
19
|
export type { FunkitConnectChain as Chain } from './providers/FunkitConnectChainContext';
|
package/dist/index.js
CHANGED
|
@@ -738,6 +738,9 @@ import React9, {
|
|
|
738
738
|
} from "react";
|
|
739
739
|
import { useConfig } from "wagmi";
|
|
740
740
|
|
|
741
|
+
// src/consts/customers.ts
|
|
742
|
+
var DYDX_API_KEY = "NJq0CGrsE19xBbP1vHyBOp8xJvzYo9kayJHqDFP5";
|
|
743
|
+
|
|
741
744
|
// src/utils/mesh.ts
|
|
742
745
|
import {
|
|
743
746
|
meshGetCryptocurrencyHoldings,
|
|
@@ -926,6 +929,22 @@ var flagConfig = {
|
|
|
926
929
|
["blocked_countries" /* BlockedCountries */]: {
|
|
927
930
|
type: "string",
|
|
928
931
|
default_value: ["US"].join(",")
|
|
932
|
+
},
|
|
933
|
+
["show_powered_tagline" /* ShowPoweredTagline */]: {
|
|
934
|
+
type: "boolean",
|
|
935
|
+
default_value: false,
|
|
936
|
+
overrides: [
|
|
937
|
+
{
|
|
938
|
+
if_any: [
|
|
939
|
+
{
|
|
940
|
+
key: "apiKey",
|
|
941
|
+
type: "isAnyOf",
|
|
942
|
+
values: [DYDX_API_KEY]
|
|
943
|
+
}
|
|
944
|
+
],
|
|
945
|
+
value: true
|
|
946
|
+
}
|
|
947
|
+
]
|
|
929
948
|
}
|
|
930
949
|
};
|
|
931
950
|
|
|
@@ -1431,6 +1450,7 @@ var contentSlideOut = "_1r8f57b _1rsrm2fa _1rsrm2f1a _1rsrm2ffd";
|
|
|
1431
1450
|
var dydxTitle = "_1r8f57g";
|
|
1432
1451
|
var overlay = "_1r8f575 _1rsrm2fgt _1rsrm2fk0 _1rsrm2fa _1rsrm2f3v _1rsrm2ffc";
|
|
1433
1452
|
var overlayOut = "_1r8f577 _1rsrm2fgt _1rsrm2fk0 _1rsrm2fa _1rsrm2f3v _1rsrm2ffc";
|
|
1453
|
+
var titleContainer = "_1r8f57h";
|
|
1434
1454
|
|
|
1435
1455
|
// src/modals/AccountModal/AccountModal.tsx
|
|
1436
1456
|
import React96 from "react";
|
|
@@ -2093,9 +2113,12 @@ var topSectionDynamicPadding = "n5qwi0";
|
|
|
2093
2113
|
var FunBottomBar = ({
|
|
2094
2114
|
topSection = null,
|
|
2095
2115
|
actionButtonProps,
|
|
2096
|
-
bottomSection
|
|
2116
|
+
bottomSection
|
|
2097
2117
|
}) => {
|
|
2098
|
-
|
|
2118
|
+
const showTagline = flags.getBool("show_powered_tagline" /* ShowPoweredTagline */, false);
|
|
2119
|
+
const defaultBottomSection = showTagline ? /* @__PURE__ */ React20.createElement(FunPoweredTagline, null) : void 0;
|
|
2120
|
+
const bottomSectionComponent = bottomSection ?? defaultBottomSection;
|
|
2121
|
+
return /* @__PURE__ */ React20.createElement(Box, null, /* @__PURE__ */ React20.createElement(Box, { className: topSectionDynamicPadding }, topSection), /* @__PURE__ */ React20.createElement(Box, null, /* @__PURE__ */ React20.createElement(FunButton, { ...actionButtonProps })), bottomSectionComponent && /* @__PURE__ */ React20.createElement(Box, { paddingTop: "8" }, bottomSectionComponent));
|
|
2099
2122
|
};
|
|
2100
2123
|
|
|
2101
2124
|
// src/components/FunButton/FunBackButton.tsx
|
|
@@ -2611,13 +2634,13 @@ var DialogBottom = ({
|
|
|
2611
2634
|
}) => {
|
|
2612
2635
|
return /* @__PURE__ */ React27.createElement(Box, { paddingX, ...boxProps });
|
|
2613
2636
|
};
|
|
2614
|
-
var DYDX_API = "NJq0CGrsE19xBbP1vHyBOp8xJvzYo9kayJHqDFP5";
|
|
2615
2637
|
function useDydxHideBack(hasBackButton, dydxHideBack) {
|
|
2616
2638
|
const { apiKey } = useFunkitConfig();
|
|
2617
|
-
return apiKey ===
|
|
2639
|
+
return apiKey === DYDX_API_KEY && !hasBackButton && dydxHideBack;
|
|
2618
2640
|
}
|
|
2619
2641
|
var DialogTitle = ({
|
|
2620
2642
|
title,
|
|
2643
|
+
titleMeta,
|
|
2621
2644
|
hasCloseButton: hasCloseButtonProp,
|
|
2622
2645
|
isCloseDisabled,
|
|
2623
2646
|
onClose,
|
|
@@ -2653,36 +2676,37 @@ var DialogTitle = ({
|
|
|
2653
2676
|
useEffect10(() => {
|
|
2654
2677
|
setIsCountdownVisible(hasTimeLeft);
|
|
2655
2678
|
}, [hasTimeLeft, countdownKey]);
|
|
2656
|
-
const
|
|
2679
|
+
const adjustDydxVisuals = useDydxHideBack(hasBackButton, !!dydxHideBack);
|
|
2657
2680
|
return /* @__PURE__ */ React27.createElement(
|
|
2658
2681
|
Box,
|
|
2659
2682
|
{
|
|
2660
|
-
|
|
2661
|
-
alignItems: "center",
|
|
2662
|
-
justifyContent: "space-between",
|
|
2663
|
-
width: "full",
|
|
2683
|
+
className: titleContainer,
|
|
2664
2684
|
paddingX: "12",
|
|
2665
|
-
paddingY:
|
|
2666
|
-
style: {
|
|
2667
|
-
// to prevent the title from jumping when the countdown is removed/added
|
|
2668
|
-
minHeight: "56px"
|
|
2669
|
-
}
|
|
2685
|
+
paddingY: adjustDydxVisuals ? "16" : "12"
|
|
2670
2686
|
},
|
|
2671
|
-
|
|
2687
|
+
adjustDydxVisuals ? null : /* @__PURE__ */ React27.createElement(Box, { style: { flexBasis: 0, flexGrow: 1 } }, hasBackButton && /* @__PURE__ */ React27.createElement(FunBackButton, { onBack: handleBack, isDisabled: isBackDisabled })),
|
|
2672
2688
|
/* @__PURE__ */ React27.createElement(Box, null, title && /* @__PURE__ */ React27.createElement(
|
|
2673
|
-
|
|
2689
|
+
Box,
|
|
2674
2690
|
{
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
className:
|
|
2681
|
-
animateOut ? animateTitleOutClass : animateTitleInClass,
|
|
2682
|
-
hideAllBackSection && dydxTitle
|
|
2683
|
-
)
|
|
2691
|
+
textAlign: "center",
|
|
2692
|
+
display: "flex",
|
|
2693
|
+
alignItems: "center",
|
|
2694
|
+
justifyContent: "center",
|
|
2695
|
+
flexDirection: "column",
|
|
2696
|
+
className: animateOut ? animateTitleOutClass : animateTitleInClass
|
|
2684
2697
|
},
|
|
2685
|
-
|
|
2698
|
+
/* @__PURE__ */ React27.createElement(
|
|
2699
|
+
Text,
|
|
2700
|
+
{
|
|
2701
|
+
as: "h1",
|
|
2702
|
+
weight: "medium",
|
|
2703
|
+
size: "13",
|
|
2704
|
+
testId: "fun-modal-title-section",
|
|
2705
|
+
className: clsx5(adjustDydxVisuals && dydxTitle)
|
|
2706
|
+
},
|
|
2707
|
+
title
|
|
2708
|
+
),
|
|
2709
|
+
titleMeta && !adjustDydxVisuals && /* @__PURE__ */ React27.createElement(Text, { color: "secondaryText", size: "10" }, titleMeta)
|
|
2686
2710
|
)),
|
|
2687
2711
|
/* @__PURE__ */ React27.createElement(
|
|
2688
2712
|
Box,
|
|
@@ -4625,6 +4649,18 @@ function validateCheckoutConfig(config) {
|
|
|
4625
4649
|
message: `Invalid configuration: Not allowed to specify both customRecipient and actionsParams at the same time.`
|
|
4626
4650
|
};
|
|
4627
4651
|
}
|
|
4652
|
+
if (config.modalTitleMeta && typeof config.modalTitleMeta !== "string") {
|
|
4653
|
+
return {
|
|
4654
|
+
isValid: false,
|
|
4655
|
+
message: `Invalid configuration: modalTitleMeta has to be a string.`
|
|
4656
|
+
};
|
|
4657
|
+
}
|
|
4658
|
+
if (config.modalTitleMeta && !config.modalTitle) {
|
|
4659
|
+
return {
|
|
4660
|
+
isValid: false,
|
|
4661
|
+
message: `Invalid configuration: Specified modalTitleMeta without a modalTitle. If meta is provided modalTitle is required.`
|
|
4662
|
+
};
|
|
4663
|
+
}
|
|
4628
4664
|
return {
|
|
4629
4665
|
isValid: true,
|
|
4630
4666
|
message: "Valid checkout configuration, proceeding..."
|
|
@@ -8197,7 +8233,9 @@ function ChainLineItem({
|
|
|
8197
8233
|
gap = "12",
|
|
8198
8234
|
hideChainName = false
|
|
8199
8235
|
}) {
|
|
8200
|
-
const
|
|
8236
|
+
const enabledChainMap = useFunkitConnectChainsById();
|
|
8237
|
+
const enabledChainItem = enabledChainMap?.[chainId];
|
|
8238
|
+
const chainItem = chainMetadataById[chainId] || enabledChainItem;
|
|
8201
8239
|
if (!chainItem) return null;
|
|
8202
8240
|
return /* @__PURE__ */ React69.createElement(
|
|
8203
8241
|
Box,
|
|
@@ -8208,7 +8246,7 @@ function ChainLineItem({
|
|
|
8208
8246
|
gap,
|
|
8209
8247
|
height: chainIconSize
|
|
8210
8248
|
},
|
|
8211
|
-
|
|
8249
|
+
/* @__PURE__ */ React69.createElement(Box, { height: "full" }, /* @__PURE__ */ React69.createElement(
|
|
8212
8250
|
AsyncImage,
|
|
8213
8251
|
{
|
|
8214
8252
|
alt: chainItem.name,
|
|
@@ -10385,7 +10423,8 @@ var ProfileTitleSection = ({
|
|
|
10385
10423
|
"aria-label": "Disconnect",
|
|
10386
10424
|
onClick: isDisconnectExpanded ? onLogout : () => setIsDisconnectExpanded(true),
|
|
10387
10425
|
onMouseEnter: () => setIsDisconnectExpanded(true),
|
|
10388
|
-
onMouseLeave: () => setIsDisconnectExpanded(false)
|
|
10426
|
+
onMouseLeave: () => setIsDisconnectExpanded(false),
|
|
10427
|
+
onBlur: () => setIsDisconnectExpanded(false)
|
|
10389
10428
|
},
|
|
10390
10429
|
isDisconnectExpanded && /* @__PURE__ */ React93.createElement(Text, { size: "10", color: "secondaryText", weight: "medium" }, "Disconnect")
|
|
10391
10430
|
)
|
|
@@ -11055,7 +11094,7 @@ var Standard = /* @__PURE__ */ React102.createElement(
|
|
|
11055
11094
|
);
|
|
11056
11095
|
|
|
11057
11096
|
// src/components/DydxSwitchModalTab/DydxSwitchModalTab.tsx
|
|
11058
|
-
var
|
|
11097
|
+
var DYDX_API_KEY2 = "NJq0CGrsE19xBbP1vHyBOp8xJvzYo9kayJHqDFP5";
|
|
11059
11098
|
function DydxSwitchTab({
|
|
11060
11099
|
checkoutItem,
|
|
11061
11100
|
checkoutStep,
|
|
@@ -11067,7 +11106,7 @@ function DydxSwitchTab({
|
|
|
11067
11106
|
onClose?.();
|
|
11068
11107
|
}, [onDydxSwitch, onClose]);
|
|
11069
11108
|
const { apiKey } = useFunkitConfig();
|
|
11070
|
-
if (!onDydxSwitch || apiKey !==
|
|
11109
|
+
if (!onDydxSwitch || apiKey !== DYDX_API_KEY2) {
|
|
11071
11110
|
return null;
|
|
11072
11111
|
}
|
|
11073
11112
|
if (checkoutStep !== "input_amount" /* INPUT_AMOUNT */) {
|
|
@@ -11890,19 +11929,17 @@ var CoinbaseIcon = ({ size = 24 }) => {
|
|
|
11890
11929
|
return /* @__PURE__ */ React120.createElement(
|
|
11891
11930
|
"svg",
|
|
11892
11931
|
{
|
|
11932
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
11893
11933
|
width: size,
|
|
11894
11934
|
height: size,
|
|
11895
|
-
viewBox: "0 0
|
|
11896
|
-
fill: "none"
|
|
11897
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
11935
|
+
viewBox: "0 0 20 20",
|
|
11936
|
+
fill: "none"
|
|
11898
11937
|
},
|
|
11899
|
-
/* @__PURE__ */ React120.createElement("rect", { width: "
|
|
11938
|
+
/* @__PURE__ */ React120.createElement("rect", { width: "20", height: "20", rx: "4", fill: "#2C5FF6" }),
|
|
11900
11939
|
/* @__PURE__ */ React120.createElement(
|
|
11901
11940
|
"path",
|
|
11902
11941
|
{
|
|
11903
|
-
|
|
11904
|
-
clipRule: "evenodd",
|
|
11905
|
-
d: "M14.0002 23.8002C19.4126 23.8002 23.8002 19.4126 23.8002 14.0002C23.8002 8.5878 19.4126 4.2002 14.0002 4.2002C8.5878 4.2002 4.2002 8.5878 4.2002 14.0002C4.2002 19.4126 8.5878 23.8002 14.0002 23.8002ZM11.5502 10.8002C11.136 10.8002 10.8002 11.136 10.8002 11.5502V16.4502C10.8002 16.8644 11.136 17.2002 11.5502 17.2002H16.4502C16.8644 17.2002 17.2002 16.8644 17.2002 16.4502V11.5502C17.2002 11.136 16.8644 10.8002 16.4502 10.8002H11.5502Z",
|
|
11942
|
+
d: "M9.99023 13.5C8.06023 13.5 6.49023 11.93 6.49023 10C6.49023 8.07 8.06023 6.5 9.99023 6.5C11.7502 6.5 13.2102 7.805 13.4502 9.5H16.9702C16.7152 5.87 13.6802 3 9.99023 3C6.13023 3 2.99023 6.14 2.99023 10C2.99023 13.86 6.13023 17 9.99023 17C13.6802 17 16.7152 14.13 16.9702 10.5H13.4502C13.2102 12.195 11.7502 13.5 9.99023 13.5Z",
|
|
11906
11943
|
fill: "white"
|
|
11907
11944
|
}
|
|
11908
11945
|
)
|
|
@@ -14740,7 +14777,9 @@ function FunCheckoutConfirmationStep({
|
|
|
14740
14777
|
const depositToken = checkoutItem?.selectedSourceAssetInfo.symbol || "";
|
|
14741
14778
|
const sourceChainName = chainMetadataById[checkoutItem?.selectedSourceAssetInfo.chainId || ""].name;
|
|
14742
14779
|
const toChainName = chainMetadataById[checkoutItem?.initSettings.config.targetChain || ""].name;
|
|
14743
|
-
|
|
14780
|
+
const areTokensEqual = depositToken === finalConvertedAssetName && sourceChainName === toChainName;
|
|
14781
|
+
const tokenActionDescription = areTokensEqual ? "processes for your checkout" : `converts to ${finalConvertedAssetName} (${toChainName})`;
|
|
14782
|
+
return `This transaction occurs in two steps. MoonPay powers only your purchase of ${depositToken} (${sourceChainName}) which Fun.xyz then ${tokenActionDescription}.`;
|
|
14744
14783
|
}, [checkoutItem]);
|
|
14745
14784
|
return /* @__PURE__ */ React156.createElement(Box, { className: animateContentInClass }, /* @__PURE__ */ React156.createElement(Box, { display: "flex", flexDirection: "column", gap: "18" }, /* @__PURE__ */ React156.createElement(
|
|
14746
14785
|
CheckoutPrimaryInfo,
|
|
@@ -15077,7 +15116,7 @@ var useDynamicFont = (inputValue, max, min = 16) => {
|
|
|
15077
15116
|
var MAX_AMOUNT = 2e3;
|
|
15078
15117
|
var useAmountRestriction = (currentAmount) => {
|
|
15079
15118
|
const { apiKey } = useFunkitConfig();
|
|
15080
|
-
const isDydx = apiKey ===
|
|
15119
|
+
const isDydx = apiKey === DYDX_API_KEY;
|
|
15081
15120
|
const isOverLimit = currentAmount > MAX_AMOUNT && isDydx;
|
|
15082
15121
|
return {
|
|
15083
15122
|
error: isOverLimit && `$${MAX_AMOUNT} maximum order`
|
|
@@ -16374,6 +16413,7 @@ function FunCheckoutModal({
|
|
|
16374
16413
|
isBackDisabled: checkoutItem?.isQuoting,
|
|
16375
16414
|
onBack: titleConfig.onBack,
|
|
16376
16415
|
title: titleConfig.title,
|
|
16416
|
+
titleMeta: checkoutItem?.initSettings.config.modalTitleMeta,
|
|
16377
16417
|
onClose: onCloseWrapper,
|
|
16378
16418
|
countdownSeconds: checkoutStep === "confirmation" /* CONFIRMATION */ ? countdown : 0,
|
|
16379
16419
|
countdownKey: countdownKey.toString(),
|
|
@@ -37,6 +37,8 @@ export interface FunkitCheckoutConfig {
|
|
|
37
37
|
*******************************************/
|
|
38
38
|
/** Title to show in the checkout modal. Defaults to "Checkout" **/
|
|
39
39
|
modalTitle?: string;
|
|
40
|
+
/** Additional information to show in the title of the checkout modal. Blank by default **/
|
|
41
|
+
modalTitleMeta?: string;
|
|
40
42
|
/** Icon to show in the checkout modal (50px x 50px). If not specified, no icon will be shown. **/
|
|
41
43
|
iconSrc?: null | string;
|
|
42
44
|
/** Title of the item being checked out. e.g. Staked Ether, XYZ Option, Solar Bond ABC **/
|
|
@@ -23,7 +23,9 @@ export declare enum FlagKey {
|
|
|
23
23
|
/** Which exchanges to show in the exchange selection screen */
|
|
24
24
|
SupportedExchanges = "supported_exchanges",
|
|
25
25
|
/** Which countries should be blocked for Funkit Checkout. Reference Alpha-2 Code format https://www.iban.com/country-codes. */
|
|
26
|
-
BlockedCountries = "blocked_countries"
|
|
26
|
+
BlockedCountries = "blocked_countries",
|
|
27
|
+
/** Whether to show the [Powered by Fun.xyz] tagline at the bottom of the checkout modal. */
|
|
28
|
+
ShowPoweredTagline = "show_powered_tagline"
|
|
27
29
|
}
|
|
28
30
|
export declare const flagConfig: {
|
|
29
31
|
[FlagKey.PaymentMethodCopyV1]: BooleanFlagConfig;
|
|
@@ -32,4 +34,5 @@ export declare const flagConfig: {
|
|
|
32
34
|
[FlagKey.DisableZkSyncSourceAssetsForDydxCheckouts]: BooleanFlagConfig;
|
|
33
35
|
[FlagKey.SupportedExchanges]: StringFlagConfig;
|
|
34
36
|
[FlagKey.BlockedCountries]: StringFlagConfig;
|
|
37
|
+
[FlagKey.ShowPoweredTagline]: BooleanFlagConfig;
|
|
35
38
|
};
|
|
@@ -8,5 +8,6 @@ declare const singleton: FeatureFlag<{
|
|
|
8
8
|
disable_zksync_source_assets_for_dydx_checkouts: import("./types").BooleanFlagConfig;
|
|
9
9
|
supported_exchanges: import("./types").StringFlagConfig;
|
|
10
10
|
blocked_countries: import("./types").StringFlagConfig;
|
|
11
|
+
show_powered_tagline: import("./types").BooleanFlagConfig;
|
|
11
12
|
}>;
|
|
12
13
|
export declare const flags: Pick<typeof singleton, "init" | "getBool" | "getNumber" | "getString">;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getInjectedConnector,
|
|
4
|
+
hasInjectedProvider
|
|
5
|
+
} from "./chunk-WRA2DVJ7.js";
|
|
6
|
+
import {
|
|
7
|
+
getWalletConnectConnector
|
|
8
|
+
} from "./chunk-23WIEY36.js";
|
|
9
|
+
|
|
10
|
+
// src/wallets/walletConnectors/roninWallet/roninWallet.ts
|
|
11
|
+
var roninWallet = ({
|
|
12
|
+
projectId,
|
|
13
|
+
walletConnectParameters
|
|
14
|
+
}) => {
|
|
15
|
+
const isRoninInjected = hasInjectedProvider({
|
|
16
|
+
namespace: "ronin.provider"
|
|
17
|
+
});
|
|
18
|
+
return {
|
|
19
|
+
id: "ronin",
|
|
20
|
+
name: "Ronin Wallet",
|
|
21
|
+
iconUrl: async () => (await import("./roninWallet-SAB5ESVK.js")).default,
|
|
22
|
+
iconBackground: "#ffffff",
|
|
23
|
+
rdns: "com.roninchain.wallet",
|
|
24
|
+
installed: isRoninInjected || void 0,
|
|
25
|
+
downloadUrls: {
|
|
26
|
+
android: "https://play.google.com/store/apps/details?id=com.skymavis.genesis",
|
|
27
|
+
ios: "https://apps.apple.com/us/app/ronin-wallet/id1592675001",
|
|
28
|
+
mobile: "https://wallet.roninchain.com",
|
|
29
|
+
chrome: "https://chrome.google.com/webstore/detail/ronin-wallet/fnjhmkhhmkbjkkabndcnnogagogbneec",
|
|
30
|
+
edge: "https://microsoftedge.microsoft.com/addons/detail/ronin-wallet/kjmoohlgokccodicjjfebfomlbljgfhk",
|
|
31
|
+
firefox: "https://addons.mozilla.org/firefox/addon/ronin-wallet",
|
|
32
|
+
browserExtension: "https://wallet.roninchain.com/",
|
|
33
|
+
qrCode: "https://wallet.roninchain.com/"
|
|
34
|
+
},
|
|
35
|
+
mobile: {
|
|
36
|
+
getUri: (uri) => `roninwallet://wc?uri=${encodeURIComponent(uri)}`
|
|
37
|
+
},
|
|
38
|
+
qrCode: {
|
|
39
|
+
getUri: (uri) => uri,
|
|
40
|
+
instructions: {
|
|
41
|
+
learnMoreUrl: "https://wallet.roninchain.com/",
|
|
42
|
+
steps: [
|
|
43
|
+
{
|
|
44
|
+
description: "wallet_connectors.ronin.qr_code.step1.description",
|
|
45
|
+
step: "install",
|
|
46
|
+
title: "wallet_connectors.ronin.qr_code.step1.title"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
description: "wallet_connectors.ronin.qr_code.step2.description",
|
|
50
|
+
step: "create",
|
|
51
|
+
title: "wallet_connectors.ronin.qr_code.step2.title"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
description: "wallet_connectors.ronin.qr_code.step3.description",
|
|
55
|
+
step: "scan",
|
|
56
|
+
title: "wallet_connectors.ronin.qr_code.step3.title"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
extension: {
|
|
62
|
+
instructions: {
|
|
63
|
+
learnMoreUrl: "https://wallet.roninchain.com/",
|
|
64
|
+
steps: [
|
|
65
|
+
{
|
|
66
|
+
description: "wallet_connectors.ronin.extension.step1.description",
|
|
67
|
+
step: "install",
|
|
68
|
+
title: "wallet_connectors.ronin.extension.step1.title"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
description: "wallet_connectors.ronin.extension.step2.description",
|
|
72
|
+
step: "create",
|
|
73
|
+
title: "wallet_connectors.ronin.extension.step2.title"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
description: "wallet_connectors.ronin.extension.step3.description",
|
|
77
|
+
step: "refresh",
|
|
78
|
+
title: "wallet_connectors.ronin.extension.step3.title"
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
createConnector: isRoninInjected ? getInjectedConnector({ namespace: "ronin.provider" }) : getWalletConnectConnector({
|
|
84
|
+
projectId,
|
|
85
|
+
walletConnectParameters
|
|
86
|
+
})
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export {
|
|
91
|
+
roninWallet
|
|
92
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
isMobile
|
|
4
|
+
} from "./chunk-RETKWSKD.js";
|
|
5
|
+
import {
|
|
6
|
+
getInjectedConnector,
|
|
7
|
+
hasInjectedProvider
|
|
8
|
+
} from "./chunk-WRA2DVJ7.js";
|
|
9
|
+
import {
|
|
10
|
+
getWalletConnectConnector
|
|
11
|
+
} from "./chunk-23WIEY36.js";
|
|
12
|
+
|
|
13
|
+
// src/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.ts
|
|
14
|
+
var tokenPocketWallet = ({
|
|
15
|
+
projectId,
|
|
16
|
+
walletConnectParameters
|
|
17
|
+
}) => {
|
|
18
|
+
const isTokenPocketInjected = hasInjectedProvider({ flag: "isTokenPocket" });
|
|
19
|
+
const shouldUseWalletConnect = !isTokenPocketInjected;
|
|
20
|
+
const getUri = (uri) => {
|
|
21
|
+
return isMobile() ? `tpoutside://wc?uri=${encodeURIComponent(uri)}` : uri;
|
|
22
|
+
};
|
|
23
|
+
return {
|
|
24
|
+
id: "tokenPocket",
|
|
25
|
+
name: "TokenPocket",
|
|
26
|
+
rdns: "pro.tokenpocket",
|
|
27
|
+
iconUrl: async () => (await import("./tokenPocketWallet-BVMBOYTC.js")).default,
|
|
28
|
+
iconBackground: "#2980FE",
|
|
29
|
+
installed: !shouldUseWalletConnect ? isTokenPocketInjected : void 0,
|
|
30
|
+
downloadUrls: {
|
|
31
|
+
chrome: "https://chrome.google.com/webstore/detail/tokenpocket/mfgccjchihfkkindfppnaooecgfneiii",
|
|
32
|
+
browserExtension: "https://extension.tokenpocket.pro/",
|
|
33
|
+
android: "https://play.google.com/store/apps/details?id=vip.mytokenpocket",
|
|
34
|
+
ios: "https://apps.apple.com/us/app/tp-global-wallet/id6444625622",
|
|
35
|
+
qrCode: "https://tokenpocket.pro/en/download/app",
|
|
36
|
+
mobile: "https://tokenpocket.pro/en/download/app"
|
|
37
|
+
},
|
|
38
|
+
mobile: {
|
|
39
|
+
getUri: shouldUseWalletConnect ? getUri : void 0
|
|
40
|
+
},
|
|
41
|
+
qrCode: shouldUseWalletConnect ? {
|
|
42
|
+
getUri,
|
|
43
|
+
instructions: {
|
|
44
|
+
learnMoreUrl: "https://help.tokenpocket.pro/en/",
|
|
45
|
+
steps: [
|
|
46
|
+
{
|
|
47
|
+
description: "wallet_connectors.token_pocket.qr_code.step1.description",
|
|
48
|
+
step: "install",
|
|
49
|
+
title: "wallet_connectors.token_pocket.qr_code.step1.title"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
description: "wallet_connectors.token_pocket.qr_code.step2.description",
|
|
53
|
+
step: "create",
|
|
54
|
+
title: "wallet_connectors.token_pocket.qr_code.step2.title"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
description: "wallet_connectors.token_pocket.qr_code.step3.description",
|
|
58
|
+
step: "scan",
|
|
59
|
+
title: "wallet_connectors.token_pocket.qr_code.step3.title"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
} : void 0,
|
|
64
|
+
extension: {
|
|
65
|
+
instructions: {
|
|
66
|
+
learnMoreUrl: "https://help.tokenpocket.pro/en/extension-wallet/faq/installation-tutorial",
|
|
67
|
+
steps: [
|
|
68
|
+
{
|
|
69
|
+
description: "wallet_connectors.token_pocket.extension.step1.description",
|
|
70
|
+
step: "install",
|
|
71
|
+
title: "wallet_connectors.token_pocket.extension.step1.title"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
description: "wallet_connectors.token_pocket.extension.step2.description",
|
|
75
|
+
step: "create",
|
|
76
|
+
title: "wallet_connectors.token_pocket.extension.step2.title"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
description: "wallet_connectors.token_pocket.extension.step3.description",
|
|
80
|
+
step: "refresh",
|
|
81
|
+
title: "wallet_connectors.token_pocket.extension.step3.title"
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
87
|
+
projectId,
|
|
88
|
+
walletConnectParameters
|
|
89
|
+
}) : getInjectedConnector({ flag: "isTokenPocket" })
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export {
|
|
94
|
+
tokenPocketWallet
|
|
95
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
isAndroid
|
|
4
|
+
} from "./chunk-RETKWSKD.js";
|
|
5
|
+
import {
|
|
6
|
+
getInjectedConnector,
|
|
7
|
+
hasInjectedProvider
|
|
8
|
+
} from "./chunk-WRA2DVJ7.js";
|
|
9
|
+
import {
|
|
10
|
+
getWalletConnectConnector
|
|
11
|
+
} from "./chunk-23WIEY36.js";
|
|
12
|
+
|
|
13
|
+
// src/wallets/walletConnectors/bifrostWallet/bifrostWallet.ts
|
|
14
|
+
var bifrostWallet = ({
|
|
15
|
+
projectId,
|
|
16
|
+
walletConnectParameters
|
|
17
|
+
}) => {
|
|
18
|
+
const isBifrostInjected = hasInjectedProvider({ flag: "isBifrost" });
|
|
19
|
+
const shouldUseWalletConnect = !isBifrostInjected;
|
|
20
|
+
const getUri = (uri) => {
|
|
21
|
+
return isAndroid() ? uri : `https://app.bifrostwallet.com/wc?uri=${encodeURIComponent(uri)}`;
|
|
22
|
+
};
|
|
23
|
+
return {
|
|
24
|
+
id: "bifrostWallet",
|
|
25
|
+
name: "Bifrost Wallet",
|
|
26
|
+
iconUrl: async () => (await import("./bifrostWallet-ORF3DABG.js")).default,
|
|
27
|
+
iconBackground: "#fff",
|
|
28
|
+
installed: !shouldUseWalletConnect ? isBifrostInjected : void 0,
|
|
29
|
+
downloadUrls: {
|
|
30
|
+
android: "https://play.google.com/store/apps/details?id=com.bifrostwallet.app",
|
|
31
|
+
ios: "https://apps.apple.com/us/app/bifrost-wallet/id1577198351",
|
|
32
|
+
qrCode: "https://bifrostwallet.com/#download-app"
|
|
33
|
+
},
|
|
34
|
+
mobile: {
|
|
35
|
+
getUri: shouldUseWalletConnect ? getUri : void 0
|
|
36
|
+
},
|
|
37
|
+
qrCode: shouldUseWalletConnect ? {
|
|
38
|
+
getUri: (uri) => uri,
|
|
39
|
+
instructions: {
|
|
40
|
+
learnMoreUrl: "https://support.bifrostwallet.com/en/articles/6886814-how-to-use-walletconnect",
|
|
41
|
+
steps: [
|
|
42
|
+
{
|
|
43
|
+
description: "wallet_connectors.bifrost.qr_code.step1.description",
|
|
44
|
+
step: "install",
|
|
45
|
+
title: "wallet_connectors.bifrost.qr_code.step1.title"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
description: "wallet_connectors.bifrost.qr_code.step2.description",
|
|
49
|
+
step: "create",
|
|
50
|
+
title: "wallet_connectors.bifrost.qr_code.step2.title"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
description: "wallet_connectors.bifrost.qr_code.step3.description",
|
|
54
|
+
step: "scan",
|
|
55
|
+
title: "wallet_connectors.bifrost.qr_code.step3.title"
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
} : void 0,
|
|
60
|
+
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
61
|
+
projectId,
|
|
62
|
+
walletConnectParameters
|
|
63
|
+
}) : getInjectedConnector({
|
|
64
|
+
flag: "isBifrost"
|
|
65
|
+
})
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export {
|
|
70
|
+
bifrostWallet
|
|
71
|
+
};
|