@funkit/connect 3.1.1 → 3.2.0
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 +28 -0
- package/dist/components/Box/Box.d.ts +21 -21
- package/dist/components/Dialog/Dialog.d.ts +4 -12
- package/dist/components/Dialog/hooks.d.ts +4 -0
- package/dist/components/FunAsset/FunAssetLoading.d.ts +4 -0
- package/dist/components/FunButton/FunIconButton.d.ts +2 -9
- package/dist/components/FunOptionBox/FunOptionBox.d.ts +2 -4
- package/dist/components/FunPaymentMethodItem/FunPaymentMethodItem.d.ts +4 -2
- package/dist/components/FunPayments/FunPaymentMethods.d.ts +20 -6
- package/dist/config/getDefaultConfig.d.ts +9 -9
- package/dist/consts/payment.d.ts +28 -2
- package/dist/css/sprinkles.css.d.ts +21 -21
- package/dist/hooks/useFunListeners.d.ts +0 -4
- package/dist/hooks/useMesh.d.ts +7 -5
- package/dist/hooks/useWalletAssets.d.ts +11 -0
- package/dist/index.css +1922 -1904
- package/dist/index.js +14959 -14271
- package/dist/modals/CheckoutModal/CheckoutPrimaryInfo.d.ts +4 -2
- package/dist/modals/CheckoutModal/ConfirmationStep.d.ts +4 -9
- package/dist/modals/CheckoutModal/ConnectExchange.d.ts +5 -5
- package/dist/modals/CheckoutModal/InputAmount.d.ts +7 -5
- package/dist/modals/CheckoutModal/LoadingAccount.d.ts +20 -0
- package/dist/modals/CheckoutModal/MeshVerification.d.ts +3 -3
- package/dist/modals/CheckoutModal/MoonpaySetup.d.ts +18 -0
- package/dist/modals/CheckoutModal/SelectAsset.d.ts +8 -7
- package/dist/modals/CheckoutModal/SelectBrokerage.d.ts +20 -0
- package/dist/modals/CheckoutModal/SelectPaymentMethod.d.ts +13 -7
- package/dist/modals/CheckoutModal/SourceChange.d.ts +26 -0
- package/dist/modals/CheckoutModal/TransferSetup.d.ts +14 -0
- package/dist/modals/CheckoutModal/stepTransition.d.ts +26 -26
- package/dist/modals/CheckoutModal/useAvailableBalanceForCheckout.d.ts +4 -0
- package/dist/modals/CheckoutModal/useSourceAssetConfirm.d.ts +3 -1
- package/dist/modals/CheckoutModal/useUpdateSourceAssetForCard.d.ts +4 -2
- package/dist/modals/CheckoutModal/useWalletAssetHoldings.d.ts +5 -0
- package/dist/providers/FunkitCheckoutContext.d.ts +5 -5
- package/dist/providers/FunkitConfigContext.d.ts +14 -0
- package/dist/providers/FunkitFlagsProvider.d.ts +25 -0
- package/dist/providers/FunkitMeshProvider.d.ts +14 -9
- package/dist/providers/FunkitMoonpayProvider.d.ts +1 -2
- package/dist/providers/GeneralWalletProvider.d.ts +14 -22
- package/dist/types/utils.d.ts +5 -0
- package/dist/utils/address.d.ts +4 -0
- package/dist/utils/assets.d.ts +7 -3
- package/dist/utils/checkout.d.ts +2 -6
- package/dist/utils/deposit.d.ts +2 -3
- package/dist/utils/flags/impl.d.ts +5 -22
- package/dist/utils/mesh.d.ts +14 -1
- package/dist/wallets/walletConnectors/index.js +32 -32
- package/package.json +4 -4
- package/dist/components/ConnectButton/formatAddress.d.ts +0 -2
- package/dist/components/FunPayments/FunPaymentSetup.d.ts +0 -17
- package/dist/components/Icons/WalletIcon.d.ts +0 -2
- package/dist/hooks/useInputAmountRestriction.d.ts +0 -7
- package/dist/modals/CheckoutModal/PaymentSetup.d.ts +0 -38
- package/dist/modals/CheckoutModal/useBottomSection.d.ts +0 -2
- package/dist/utils/flags/index.d.ts +0 -12
- package/dist/wallets/walletConnectors/chunk-FLTQRYFS.js +0 -27
- package/dist/components/Icons/{Checked.d.ts → CheckIcon.d.ts} +0 -0
- package/dist/wallets/walletConnectors/{chunk-5K4DIMYR.js → chunk-4HKPVECK.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-AXPQHNUI.js → chunk-4K3EKHXR.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-B7FHT3CB.js → chunk-5MVCKMZT.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-QP2BIVXD.js → chunk-5NZLWT3Y.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-2EMZOYQI.js → chunk-B5D7DYVV.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-L7QI6PBN.js → chunk-HLH777AC.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-EFIENLEE.js → chunk-HMDUVRZP.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-AUVBWDIK.js → chunk-KDGMYRMC.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-UZEMNN3Q.js → chunk-VU6B3HMD.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-UWZQZY4S.js → chunk-YRK6XWL6.js} +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @funkit/connect
|
|
2
2
|
|
|
3
|
+
## 3.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- a90f273: feat: auto-refresh quote after signature denial
|
|
8
|
+
- a90f273: feat: reorder checkout flow
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- a90f273: fix: fix out-of-sync payment method in checkoutItem
|
|
13
|
+
- a90f273: fix: do not disable button on quote error
|
|
14
|
+
- a90f273: fix: remove balance check in select asset
|
|
15
|
+
- a90f273: feat: add source variant for payment method
|
|
16
|
+
- a90f273: fix: don't generate quote after selecting card in payment selection
|
|
17
|
+
- a90f273: fix: disable wallet connection option in payment selection when isContinuing
|
|
18
|
+
- 65afa8d: fix: fix ArrowIcon rotation on Safari
|
|
19
|
+
- a90f273: fix: add visual fixes for source payment component
|
|
20
|
+
- a90f273: feat: add ui customizations
|
|
21
|
+
- a90f273: fix: hide amount in select payment method step
|
|
22
|
+
- a90f273: feat: add usd amount options
|
|
23
|
+
- a90f273: reactor: moved countdown element from dialog title to confirmation step
|
|
24
|
+
- a90f273: refactor: reactive feature flags
|
|
25
|
+
- a90f273: refactor: moved address utils
|
|
26
|
+
- Updated dependencies [a90f273]
|
|
27
|
+
- @funkit/api-base@1.1.2
|
|
28
|
+
- @funkit/core@2.1.7
|
|
29
|
+
- @funkit/wagmi-tools@3.0.9
|
|
30
|
+
|
|
3
31
|
## 3.1.1
|
|
4
32
|
|
|
5
33
|
### Patch Changes
|
|
@@ -54,35 +54,35 @@ export declare const Box: React.ForwardRefExoticComponent<{
|
|
|
54
54
|
readonly fontFamily?: "body" | undefined;
|
|
55
55
|
readonly fontSize?: "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "23" | "40" | "57" | undefined;
|
|
56
56
|
readonly fontWeight?: "medium" | "bold" | "regular" | "semibold" | "heavy" | undefined;
|
|
57
|
-
readonly gap?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "
|
|
58
|
-
readonly height?: "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "40" | "57" | "2" | "4" | "24" | "full" | "15" | "28" | "30" | "32" | "34" | "36" | "44" | "48" | "50" | "54" | "60" | "72" | "93" | "96" | "100" | "108" | "120" | "162" | "180" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "400" | "440" | "600" | "half" | "max" | undefined;
|
|
57
|
+
readonly gap?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "11" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "64" | undefined;
|
|
58
|
+
readonly height?: "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "40" | "57" | "2" | "4" | "24" | "full" | "11" | "15" | "28" | "30" | "32" | "34" | "36" | "44" | "48" | "50" | "54" | "60" | "72" | "93" | "96" | "100" | "108" | "120" | "162" | "180" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "400" | "440" | "600" | "half" | "max" | undefined;
|
|
59
59
|
readonly justifyContent?: "center" | "space-around" | "space-between" | "flex-end" | "flex-start" | undefined;
|
|
60
60
|
readonly textAlign?: "inherit" | "left" | "right" | "center" | undefined;
|
|
61
|
-
readonly marginBottom?: "auto" | "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "
|
|
62
|
-
readonly marginLeft?: "auto" | "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "
|
|
63
|
-
readonly marginRight?: "auto" | "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "
|
|
64
|
-
readonly marginTop?: "auto" | "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "
|
|
65
|
-
readonly minHeight?: "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "40" | "57" | "2" | "4" | "24" | "full" | "15" | "28" | "30" | "32" | "34" | "36" | "44" | "48" | "50" | "54" | "60" | "72" | "93" | "96" | "100" | "108" | "120" | "162" | "180" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "400" | "440" | "600" | "half" | "max" | undefined;
|
|
66
|
-
readonly maxHeight?: "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "40" | "57" | "2" | "4" | "24" | "full" | "15" | "28" | "30" | "32" | "34" | "36" | "44" | "48" | "50" | "54" | "60" | "72" | "93" | "96" | "100" | "108" | "120" | "162" | "180" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "400" | "440" | "600" | "half" | "max" | undefined;
|
|
67
|
-
readonly maxWidth?: "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "40" | "57" | "2" | "4" | "24" | "full" | "15" | "28" | "30" | "32" | "34" | "36" | "44" | "48" | "50" | "54" | "60" | "72" | "93" | "96" | "100" | "108" | "120" | "162" | "180" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "400" | "440" | "600" | "half" | "max" | undefined;
|
|
68
|
-
readonly minWidth?: "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "40" | "57" | "2" | "4" | "24" | "full" | "15" | "28" | "30" | "32" | "34" | "36" | "44" | "48" | "50" | "54" | "60" | "72" | "93" | "96" | "100" | "108" | "120" | "162" | "180" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "400" | "440" | "600" | "half" | "max" | undefined;
|
|
61
|
+
readonly marginBottom?: "auto" | "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "11" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "64" | "-18" | undefined;
|
|
62
|
+
readonly marginLeft?: "auto" | "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "11" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "64" | "-18" | undefined;
|
|
63
|
+
readonly marginRight?: "auto" | "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "11" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "64" | "-18" | undefined;
|
|
64
|
+
readonly marginTop?: "auto" | "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "11" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "64" | "-18" | undefined;
|
|
65
|
+
readonly minHeight?: "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "40" | "57" | "2" | "4" | "24" | "full" | "11" | "15" | "28" | "30" | "32" | "34" | "36" | "44" | "48" | "50" | "54" | "60" | "72" | "93" | "96" | "100" | "108" | "120" | "162" | "180" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "400" | "440" | "600" | "half" | "max" | undefined;
|
|
66
|
+
readonly maxHeight?: "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "40" | "57" | "2" | "4" | "24" | "full" | "11" | "15" | "28" | "30" | "32" | "34" | "36" | "44" | "48" | "50" | "54" | "60" | "72" | "93" | "96" | "100" | "108" | "120" | "162" | "180" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "400" | "440" | "600" | "half" | "max" | undefined;
|
|
67
|
+
readonly maxWidth?: "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "40" | "57" | "2" | "4" | "24" | "full" | "11" | "15" | "28" | "30" | "32" | "34" | "36" | "44" | "48" | "50" | "54" | "60" | "72" | "93" | "96" | "100" | "108" | "120" | "162" | "180" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "400" | "440" | "600" | "half" | "max" | undefined;
|
|
68
|
+
readonly minWidth?: "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "40" | "57" | "2" | "4" | "24" | "full" | "11" | "15" | "28" | "30" | "32" | "34" | "36" | "44" | "48" | "50" | "54" | "60" | "72" | "93" | "96" | "100" | "108" | "120" | "162" | "180" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "400" | "440" | "600" | "half" | "max" | undefined;
|
|
69
69
|
readonly overflow?: "hidden" | undefined;
|
|
70
|
-
readonly paddingBottom?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "
|
|
71
|
-
readonly paddingLeft?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "
|
|
72
|
-
readonly paddingRight?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "
|
|
73
|
-
readonly paddingTop?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "
|
|
70
|
+
readonly paddingBottom?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "11" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "64" | undefined;
|
|
71
|
+
readonly paddingLeft?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "11" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "64" | undefined;
|
|
72
|
+
readonly paddingRight?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "11" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "64" | undefined;
|
|
73
|
+
readonly paddingTop?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "11" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "64" | undefined;
|
|
74
74
|
readonly position?: "fixed" | "absolute" | "relative" | undefined;
|
|
75
75
|
readonly right?: "0" | undefined;
|
|
76
76
|
readonly transition?: "transform" | "default" | undefined;
|
|
77
77
|
readonly userSelect?: "none" | undefined;
|
|
78
|
-
readonly width?: "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "40" | "57" | "2" | "4" | "24" | "full" | "15" | "28" | "30" | "32" | "34" | "36" | "44" | "48" | "50" | "54" | "60" | "72" | "93" | "96" | "100" | "108" | "120" | "162" | "180" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "400" | "440" | "600" | "half" | "max" | undefined;
|
|
78
|
+
readonly width?: "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "40" | "57" | "2" | "4" | "24" | "full" | "11" | "15" | "28" | "30" | "32" | "34" | "36" | "44" | "48" | "50" | "54" | "60" | "72" | "93" | "96" | "100" | "108" | "120" | "162" | "180" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "400" | "440" | "600" | "half" | "max" | undefined;
|
|
79
79
|
readonly backdropFilter?: "modalOverlay" | undefined;
|
|
80
|
-
margin?: "auto" | "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "
|
|
81
|
-
marginX?: "auto" | "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "
|
|
82
|
-
marginY?: "auto" | "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "
|
|
83
|
-
padding?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "
|
|
84
|
-
paddingX?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "
|
|
85
|
-
paddingY?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "
|
|
80
|
+
margin?: "auto" | "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "11" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "64" | "-18" | undefined;
|
|
81
|
+
marginX?: "auto" | "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "11" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "64" | "-18" | undefined;
|
|
82
|
+
marginY?: "auto" | "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "11" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "64" | "-18" | undefined;
|
|
83
|
+
padding?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "11" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "64" | undefined;
|
|
84
|
+
paddingX?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "11" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "64" | undefined;
|
|
85
|
+
paddingY?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "11" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "64" | undefined;
|
|
86
86
|
} & {
|
|
87
87
|
reset?: keyof JSX.IntrinsicElements;
|
|
88
88
|
} & HTMLProperties<HTMLElement> & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { BoxProps } from '../Box/Box';
|
|
3
|
-
|
|
3
|
+
export { CHECKOUT_MODAL_BOTTOM_BAR_ID, CHECKOUT_MODAL_TITLE_COUNTDOWN_ID, useBottomSectionRef, useTitleCountdownRef, } from './hooks';
|
|
4
4
|
interface DialogProps {
|
|
5
5
|
open: boolean;
|
|
6
6
|
onClose: () => void;
|
|
@@ -17,7 +17,7 @@ interface DialogProps {
|
|
|
17
17
|
*/
|
|
18
18
|
export declare function Dialog({ children, onClose, open, titleId, isHidden, isSmartCloseable, }: DialogProps): React.JSX.Element;
|
|
19
19
|
export declare namespace Dialog {
|
|
20
|
-
var Title: ({ title, titleMeta, hasCloseButton: hasCloseButtonProp, isCloseDisabled, onClose, hasBackButton: hasBackButtonProp, isBackDisabled, onBack,
|
|
20
|
+
var Title: ({ title, titleMeta, hasCloseButton: hasCloseButtonProp, isCloseDisabled, onClose, hasBackButton: hasBackButtonProp, isBackDisabled, onBack, backAnimation, skipBackDelay, dydxHideBack, isCloseButtonHidden, }: DialogTitleProps) => React.JSX.Element;
|
|
21
21
|
var Content: ({ children, fullHeight, paddingLeft, paddingBottom, className, withTopDivider, withBottomDivider, id, ...boxProps }: DialogContentProps) => React.JSX.Element;
|
|
22
22
|
var BottomSection: ({ paddingX, ...boxProps }: Omit<BoxProps, "children">) => React.JSX.Element;
|
|
23
23
|
var BottomBar: ({ topSection, actionButtonProps, bottomSection, }: import("../FunBottomBar/FunBottomBar").FunBottomBarProps) => React.JSX.Element;
|
|
@@ -41,15 +41,7 @@ export interface DialogTitleProps {
|
|
|
41
41
|
onBack?: (p?: any) => void;
|
|
42
42
|
skipBackDelay?: boolean;
|
|
43
43
|
backAnimation?: boolean;
|
|
44
|
-
countdownSeconds?: number;
|
|
45
|
-
countdownKey?: string;
|
|
46
|
-
delayCountdownReturnByBuffer?: boolean;
|
|
47
44
|
dydxHideBack?: boolean;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
onBeforeCountdownEndsSeconds?: FunCountdownProps['onBeforeCountdownEndsSeconds'];
|
|
51
|
-
onCountdownEnded?: FunCountdownProps['onCountdownEnded'];
|
|
52
|
-
onCountdownLastSecond?: FunCountdownProps['onCountdownLastSecond'];
|
|
53
|
-
};
|
|
45
|
+
/** Hides the close button, eg. when using a countdown element in its place */
|
|
46
|
+
isCloseButtonHidden?: boolean;
|
|
54
47
|
}
|
|
55
|
-
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const CHECKOUT_MODAL_BOTTOM_BAR_ID = "checkout-modal-bottom-bar";
|
|
2
|
+
export declare function useBottomSectionRef(): HTMLElement | null;
|
|
3
|
+
export declare const CHECKOUT_MODAL_TITLE_COUNTDOWN_ID = "checkout-modal-title-countdown";
|
|
4
|
+
export declare function useTitleCountdownRef(): HTMLElement | null;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BoxProps } from '../Box/Box';
|
|
3
|
-
export interface FunIconButtonProps {
|
|
3
|
+
export interface FunIconButtonProps extends Pick<BoxProps, 'as' | 'borderRadius' | 'color' | 'fontSize' | 'fontWeight' | 'onBlur' | 'onMouseEnter' | 'onMouseLeave' | 'style'> {
|
|
4
4
|
onClick?: () => void;
|
|
5
|
-
onMouseEnter?: () => void;
|
|
6
|
-
onMouseLeave?: () => void;
|
|
7
|
-
onBlur?: () => void;
|
|
8
5
|
icon: React.ReactNode;
|
|
9
6
|
/** Total height and width of the clickable area (including borders) */
|
|
10
7
|
size?: BoxProps['height'];
|
|
@@ -17,14 +14,10 @@ export interface FunIconButtonProps {
|
|
|
17
14
|
/** Defaults to 8px */
|
|
18
15
|
gap?: BoxProps['gap'];
|
|
19
16
|
ariaLabel?: string;
|
|
20
|
-
color?: BoxProps['color'];
|
|
21
17
|
renderAsSquare?: boolean;
|
|
22
|
-
as?: BoxProps['as'];
|
|
23
18
|
isDisabled?: boolean;
|
|
24
|
-
borderRadius?: BoxProps['borderRadius'];
|
|
25
|
-
style?: BoxProps['style'];
|
|
26
19
|
children?: React.ReactNode;
|
|
27
20
|
/** Defaults to 'quiet' */
|
|
28
|
-
variant?: 'quiet' | 'outlined';
|
|
21
|
+
variant?: 'filled' | 'quiet' | 'outlined';
|
|
29
22
|
}
|
|
30
23
|
export declare const FunIconButton: ({ children, onClick, icon, size, width, gap, ariaLabel, color, as, isDisabled, borderRadius, style, variant, ...props }: FunIconButtonProps) => React.JSX.Element;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { BoxProps } from '../Box/Box';
|
|
3
|
-
interface FunOptionBoxProps {
|
|
3
|
+
interface FunOptionBoxProps extends Omit<BoxProps, 'className' | 'cursor' | 'tabIndex' | 'style'> {
|
|
4
4
|
isActive?: boolean;
|
|
5
|
-
isDisabled?: boolean;
|
|
6
5
|
paddingX?: BoxProps['paddingX'];
|
|
7
6
|
paddingY?: BoxProps['paddingY'];
|
|
8
|
-
onClick?: null | (() => void);
|
|
9
7
|
type?: 'default' | 'bordered';
|
|
10
8
|
children: ReactNode;
|
|
11
9
|
}
|
|
12
|
-
export declare function FunOptionBox({ isActive,
|
|
10
|
+
export declare function FunOptionBox({ isActive, onClick, paddingX, paddingY, type, as, borderStyle, borderWidth, borderRadius, display, alignItems, gap, justifyContent, color, children, disabled, ...boxProps }: FunOptionBoxProps): React.JSX.Element;
|
|
13
11
|
export {};
|
|
@@ -4,8 +4,10 @@ export interface FunPaymentMethodItemProps {
|
|
|
4
4
|
keyText: string;
|
|
5
5
|
valueIcon?: ReactNode;
|
|
6
6
|
disclaimerText?: string;
|
|
7
|
-
onClick?:
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
isError?: boolean;
|
|
8
9
|
isDisabled?: boolean;
|
|
9
10
|
isActive?: boolean;
|
|
11
|
+
isSource?: boolean;
|
|
10
12
|
}
|
|
11
|
-
export declare function FunPaymentMethodItem({ keyIcon, keyText, valueIcon, disclaimerText, onClick, isDisabled, isActive, }: FunPaymentMethodItemProps): React.JSX.Element;
|
|
13
|
+
export declare function FunPaymentMethodItem({ keyIcon, keyText, valueIcon, disclaimerText, onClick, isError, isDisabled, isActive, isSource, }: FunPaymentMethodItemProps): React.JSX.Element;
|
|
@@ -1,17 +1,31 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PaymentMethodInfo } from '../../consts/payment';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { PaymentMethod, PaymentMethodInfo } from '../../consts/payment';
|
|
3
|
+
import { SelectMethodPayloadData } from '../../modals/CheckoutModal/SelectPaymentMethod';
|
|
4
|
+
export declare function ConnectWalletItem({ checkoutId, isClickable, }: {
|
|
5
|
+
checkoutId: string;
|
|
6
|
+
isClickable?: boolean;
|
|
7
|
+
}): React.JSX.Element;
|
|
8
|
+
export declare function AddPaymentMethodItem({ paymentMethod, checkoutId, isClickable, isActive, onClick, isSource, dynamicLimit, customValueIcon, }: {
|
|
9
|
+
paymentMethod: PaymentMethod;
|
|
10
|
+
checkoutId: string;
|
|
11
|
+
isActive: boolean;
|
|
12
|
+
isClickable?: boolean;
|
|
13
|
+
onClick?: () => void;
|
|
14
|
+
isSource?: boolean;
|
|
15
|
+
dynamicLimit?: string;
|
|
16
|
+
customValueIcon?: ReactNode;
|
|
17
|
+
}): React.JSX.Element;
|
|
3
18
|
export declare function ExistingPaymentMethodItem({ paymentMethodInfo, }: {
|
|
4
19
|
paymentMethodInfo: PaymentMethodInfo;
|
|
5
20
|
}): React.JSX.Element;
|
|
6
21
|
/**
|
|
7
22
|
* Handle selection and adding of payment methods
|
|
8
23
|
*/
|
|
9
|
-
export declare function FunPaymentMethods({
|
|
10
|
-
primaryInfo: React.ReactNode;
|
|
24
|
+
export declare function FunPaymentMethods({ checkoutId, onSelect, isDisabled, depositAmount, isLoadingGeoCheck, onCloseWrapper, }: {
|
|
11
25
|
checkoutId: string;
|
|
12
|
-
onSelect: (
|
|
26
|
+
onSelect: (selectMethodData: SelectMethodPayloadData) => void;
|
|
13
27
|
isDisabled?: boolean;
|
|
14
|
-
depositAmount:
|
|
28
|
+
depositAmount: number;
|
|
15
29
|
isLoadingGeoCheck: boolean;
|
|
16
30
|
onCloseWrapper: () => void;
|
|
17
31
|
}): React.JSX.Element;
|
|
@@ -689,13 +689,13 @@ export declare const getDefaultChains: () => ({
|
|
|
689
689
|
sourceId?: number | undefined;
|
|
690
690
|
testnet?: boolean | undefined;
|
|
691
691
|
custom: {
|
|
692
|
-
readonly getEip712Domain: import("viem/zksync").EIP712DomainFn<import("viem/
|
|
692
|
+
readonly getEip712Domain: import("viem/zksync").EIP712DomainFn<import("viem/zksync").ZkSyncTransactionSerializable, import("viem/zksync").ZkSyncEIP712TransactionSignable>;
|
|
693
693
|
};
|
|
694
694
|
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
695
695
|
formatters: {
|
|
696
696
|
readonly block: {
|
|
697
697
|
exclude: [] | undefined;
|
|
698
|
-
format: (args: import("viem/
|
|
698
|
+
format: (args: import("viem/zksync").ZkSyncRpcBlock) => {
|
|
699
699
|
baseFeePerGas: bigint | null;
|
|
700
700
|
blobGasUsed: bigint;
|
|
701
701
|
difficulty: bigint;
|
|
@@ -717,7 +717,7 @@ export declare const getDefaultChains: () => ({
|
|
|
717
717
|
stateRoot: import("viem").Hash;
|
|
718
718
|
timestamp: bigint;
|
|
719
719
|
totalDifficulty: bigint | null;
|
|
720
|
-
transactions: `0x${string}`[] | import("viem/
|
|
720
|
+
transactions: `0x${string}`[] | import("viem/zksync").ZkSyncTransaction<boolean>[];
|
|
721
721
|
transactionsRoot: import("viem").Hash;
|
|
722
722
|
uncles: import("viem").Hash[];
|
|
723
723
|
withdrawals?: import("viem").Withdrawal[] | undefined;
|
|
@@ -729,7 +729,7 @@ export declare const getDefaultChains: () => ({
|
|
|
729
729
|
};
|
|
730
730
|
readonly transaction: {
|
|
731
731
|
exclude: [] | undefined;
|
|
732
|
-
format: (args: import("viem/
|
|
732
|
+
format: (args: import("viem/zksync").ZkSyncRpcTransaction) => ({
|
|
733
733
|
r: import("viem").Hex;
|
|
734
734
|
s: import("viem").Hex;
|
|
735
735
|
v: bigint;
|
|
@@ -885,7 +885,7 @@ export declare const getDefaultChains: () => ({
|
|
|
885
885
|
readonly transactionReceipt: {
|
|
886
886
|
exclude: [] | undefined;
|
|
887
887
|
format: (args: import("viem/_types/zksync/types/transaction").ZkSyncRpcTransactionReceipt) => {
|
|
888
|
-
type: import("viem/
|
|
888
|
+
type: import("viem/zksync").ZkSyncTransactionType;
|
|
889
889
|
to: import("viem").Address | null;
|
|
890
890
|
from: import("viem").Address;
|
|
891
891
|
blockHash: import("viem").Hash;
|
|
@@ -903,14 +903,14 @@ export declare const getDefaultChains: () => ({
|
|
|
903
903
|
root?: import("viem").Hash | undefined;
|
|
904
904
|
l1BatchNumber: bigint | null;
|
|
905
905
|
l1BatchTxIndex: bigint | null;
|
|
906
|
-
logs: import("viem/
|
|
907
|
-
l2ToL1Logs: import("viem/
|
|
906
|
+
logs: import("viem/zksync").ZkSyncLog[];
|
|
907
|
+
l2ToL1Logs: import("viem/zksync").ZkSyncL2ToL1Log[];
|
|
908
908
|
} & {};
|
|
909
909
|
type: "transactionReceipt";
|
|
910
910
|
};
|
|
911
911
|
readonly transactionRequest: {
|
|
912
912
|
exclude: ("gasPerPubdata" | "paymaster" | "factoryDeps" | "paymasterInput" | "customSignature")[] | undefined;
|
|
913
|
-
format: (args: import("viem/
|
|
913
|
+
format: (args: import("viem/zksync").ZkSyncTransactionRequest) => ({
|
|
914
914
|
data?: import("viem").Hex | undefined;
|
|
915
915
|
from: import("viem").Address;
|
|
916
916
|
gas?: `0x${string}` | undefined;
|
|
@@ -993,7 +993,7 @@ export declare const getDefaultChains: () => ({
|
|
|
993
993
|
maxFeePerBlobGas?: undefined;
|
|
994
994
|
maxFeePerGas?: `0x${string}` | undefined;
|
|
995
995
|
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
|
996
|
-
eip712Meta: import("viem/
|
|
996
|
+
eip712Meta: import("viem/zksync").ZkSyncEip712Meta;
|
|
997
997
|
type: "0x71" | "0xff";
|
|
998
998
|
}) & {
|
|
999
999
|
gasPerPubdata: never;
|
package/dist/consts/payment.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { PreviewTransferResult } from '@funkit/api-base';
|
|
2
|
+
import { LinkPayload } from '@meshconnect/web-link-sdk';
|
|
1
3
|
import { ReactNode } from 'react';
|
|
2
4
|
/** Supported payment methods in FunkitConnect. **/
|
|
3
5
|
export declare enum PaymentMethod {
|
|
@@ -10,12 +12,36 @@ export declare enum PaymentMethod {
|
|
|
10
12
|
/** Mesh - Exchange / Brokerage **/
|
|
11
13
|
BROKERAGE = "brokerage"
|
|
12
14
|
}
|
|
15
|
+
type PaymentMethodInfoMeta = LinkPayload & {
|
|
16
|
+
checkoutMeshNetworkId?: string;
|
|
17
|
+
computedPreviewExpirationMs?: number;
|
|
18
|
+
previewTransferResult?: PreviewTransferResult;
|
|
19
|
+
};
|
|
13
20
|
/** Full payment method information used in frontend during payment flows. **/
|
|
14
21
|
export interface PaymentMethodInfo {
|
|
15
22
|
paymentMethod: PaymentMethod;
|
|
16
23
|
title: string;
|
|
17
|
-
titleIcon
|
|
24
|
+
titleIcon: ReactNode;
|
|
18
25
|
description: string;
|
|
19
26
|
descriptionIcon?: ReactNode;
|
|
20
|
-
meta:
|
|
27
|
+
meta: PaymentMethodInfoMeta;
|
|
21
28
|
}
|
|
29
|
+
export interface PaymentMethodCardInfo extends PaymentMethodInfo {
|
|
30
|
+
paymentMethod: PaymentMethod.CARD;
|
|
31
|
+
}
|
|
32
|
+
export interface PaymentMethodBrokerageInfo extends PaymentMethodInfo {
|
|
33
|
+
paymentMethod: PaymentMethod.BROKERAGE;
|
|
34
|
+
}
|
|
35
|
+
export interface PaymentMethodAccountInfo extends PaymentMethodInfo {
|
|
36
|
+
paymentMethod: PaymentMethod.ACCOUNT_BALANCE;
|
|
37
|
+
}
|
|
38
|
+
/** Shouldn't be used generally. Will most likely be removed once checkoutItem usage is reduced */
|
|
39
|
+
export declare const getPartialPaymentMethodInfo: <T extends PaymentMethodInfo>(paymentMethod: T["paymentMethod"]) => {
|
|
40
|
+
paymentMethod: T["paymentMethod"];
|
|
41
|
+
title: string;
|
|
42
|
+
titleIcon: null;
|
|
43
|
+
description: string;
|
|
44
|
+
descriptionIcon: null;
|
|
45
|
+
meta: {};
|
|
46
|
+
};
|
|
47
|
+
export {};
|
|
@@ -529,35 +529,35 @@ export declare const sprinkles: ((props: {
|
|
|
529
529
|
readonly fontFamily?: "body" | undefined;
|
|
530
530
|
readonly fontSize?: "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "23" | "40" | "57" | undefined;
|
|
531
531
|
readonly fontWeight?: "medium" | "bold" | "regular" | "semibold" | "heavy" | undefined;
|
|
532
|
-
readonly gap?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "
|
|
533
|
-
readonly height?: "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "40" | "57" | "2" | "4" | "24" | "full" | "15" | "28" | "30" | "32" | "34" | "36" | "44" | "48" | "50" | "54" | "60" | "72" | "93" | "96" | "100" | "108" | "120" | "162" | "180" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "400" | "440" | "600" | "half" | "max" | undefined;
|
|
532
|
+
readonly gap?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "11" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "64" | undefined;
|
|
533
|
+
readonly height?: "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "40" | "57" | "2" | "4" | "24" | "full" | "11" | "15" | "28" | "30" | "32" | "34" | "36" | "44" | "48" | "50" | "54" | "60" | "72" | "93" | "96" | "100" | "108" | "120" | "162" | "180" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "400" | "440" | "600" | "half" | "max" | undefined;
|
|
534
534
|
readonly justifyContent?: "center" | "space-around" | "space-between" | "flex-end" | "flex-start" | undefined;
|
|
535
535
|
readonly textAlign?: "inherit" | "left" | "right" | "center" | undefined;
|
|
536
|
-
readonly marginBottom?: "auto" | "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "
|
|
537
|
-
readonly marginLeft?: "auto" | "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "
|
|
538
|
-
readonly marginRight?: "auto" | "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "
|
|
539
|
-
readonly marginTop?: "auto" | "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "
|
|
540
|
-
readonly minHeight?: "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "40" | "57" | "2" | "4" | "24" | "full" | "15" | "28" | "30" | "32" | "34" | "36" | "44" | "48" | "50" | "54" | "60" | "72" | "93" | "96" | "100" | "108" | "120" | "162" | "180" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "400" | "440" | "600" | "half" | "max" | undefined;
|
|
541
|
-
readonly maxHeight?: "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "40" | "57" | "2" | "4" | "24" | "full" | "15" | "28" | "30" | "32" | "34" | "36" | "44" | "48" | "50" | "54" | "60" | "72" | "93" | "96" | "100" | "108" | "120" | "162" | "180" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "400" | "440" | "600" | "half" | "max" | undefined;
|
|
542
|
-
readonly maxWidth?: "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "40" | "57" | "2" | "4" | "24" | "full" | "15" | "28" | "30" | "32" | "34" | "36" | "44" | "48" | "50" | "54" | "60" | "72" | "93" | "96" | "100" | "108" | "120" | "162" | "180" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "400" | "440" | "600" | "half" | "max" | undefined;
|
|
543
|
-
readonly minWidth?: "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "40" | "57" | "2" | "4" | "24" | "full" | "15" | "28" | "30" | "32" | "34" | "36" | "44" | "48" | "50" | "54" | "60" | "72" | "93" | "96" | "100" | "108" | "120" | "162" | "180" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "400" | "440" | "600" | "half" | "max" | undefined;
|
|
536
|
+
readonly marginBottom?: "auto" | "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "11" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "64" | "-18" | undefined;
|
|
537
|
+
readonly marginLeft?: "auto" | "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "11" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "64" | "-18" | undefined;
|
|
538
|
+
readonly marginRight?: "auto" | "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "11" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "64" | "-18" | undefined;
|
|
539
|
+
readonly marginTop?: "auto" | "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "11" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "64" | "-18" | undefined;
|
|
540
|
+
readonly minHeight?: "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "40" | "57" | "2" | "4" | "24" | "full" | "11" | "15" | "28" | "30" | "32" | "34" | "36" | "44" | "48" | "50" | "54" | "60" | "72" | "93" | "96" | "100" | "108" | "120" | "162" | "180" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "400" | "440" | "600" | "half" | "max" | undefined;
|
|
541
|
+
readonly maxHeight?: "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "40" | "57" | "2" | "4" | "24" | "full" | "11" | "15" | "28" | "30" | "32" | "34" | "36" | "44" | "48" | "50" | "54" | "60" | "72" | "93" | "96" | "100" | "108" | "120" | "162" | "180" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "400" | "440" | "600" | "half" | "max" | undefined;
|
|
542
|
+
readonly maxWidth?: "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "40" | "57" | "2" | "4" | "24" | "full" | "11" | "15" | "28" | "30" | "32" | "34" | "36" | "44" | "48" | "50" | "54" | "60" | "72" | "93" | "96" | "100" | "108" | "120" | "162" | "180" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "400" | "440" | "600" | "half" | "max" | undefined;
|
|
543
|
+
readonly minWidth?: "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "40" | "57" | "2" | "4" | "24" | "full" | "11" | "15" | "28" | "30" | "32" | "34" | "36" | "44" | "48" | "50" | "54" | "60" | "72" | "93" | "96" | "100" | "108" | "120" | "162" | "180" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "400" | "440" | "600" | "half" | "max" | undefined;
|
|
544
544
|
readonly overflow?: "hidden" | undefined;
|
|
545
|
-
readonly paddingBottom?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "
|
|
546
|
-
readonly paddingLeft?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "
|
|
547
|
-
readonly paddingRight?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "
|
|
548
|
-
readonly paddingTop?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "
|
|
545
|
+
readonly paddingBottom?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "11" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "64" | undefined;
|
|
546
|
+
readonly paddingLeft?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "11" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "64" | undefined;
|
|
547
|
+
readonly paddingRight?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "11" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "64" | undefined;
|
|
548
|
+
readonly paddingTop?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "11" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "64" | undefined;
|
|
549
549
|
readonly position?: "fixed" | "absolute" | "relative" | undefined;
|
|
550
550
|
readonly right?: "0" | undefined;
|
|
551
551
|
readonly transition?: "transform" | "default" | undefined;
|
|
552
552
|
readonly userSelect?: "none" | undefined;
|
|
553
|
-
readonly width?: "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "40" | "57" | "2" | "4" | "24" | "full" | "15" | "28" | "30" | "32" | "34" | "36" | "44" | "48" | "50" | "54" | "60" | "72" | "93" | "96" | "100" | "108" | "120" | "162" | "180" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "400" | "440" | "600" | "half" | "max" | undefined;
|
|
553
|
+
readonly width?: "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "40" | "57" | "2" | "4" | "24" | "full" | "11" | "15" | "28" | "30" | "32" | "34" | "36" | "44" | "48" | "50" | "54" | "60" | "72" | "93" | "96" | "100" | "108" | "120" | "162" | "180" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "400" | "440" | "600" | "half" | "max" | undefined;
|
|
554
554
|
readonly backdropFilter?: "modalOverlay" | undefined;
|
|
555
|
-
margin?: "auto" | "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "
|
|
556
|
-
marginX?: "auto" | "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "
|
|
557
|
-
marginY?: "auto" | "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "
|
|
558
|
-
padding?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "
|
|
559
|
-
paddingX?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "
|
|
560
|
-
paddingY?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "
|
|
555
|
+
margin?: "auto" | "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "11" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "64" | "-18" | undefined;
|
|
556
|
+
marginX?: "auto" | "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "11" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "64" | "-18" | undefined;
|
|
557
|
+
marginY?: "auto" | "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "11" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "64" | "-18" | undefined;
|
|
558
|
+
padding?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "11" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "64" | undefined;
|
|
559
|
+
paddingX?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "11" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "64" | undefined;
|
|
560
|
+
paddingY?: "0" | "1" | "8" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "2" | "3" | "4" | "6" | "24" | "11" | "15" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "9" | "64" | undefined;
|
|
561
561
|
}) => string) & {
|
|
562
562
|
properties: Set<"alignItems" | "alignSelf" | "backdropFilter" | "backgroundSize" | "boxShadow" | "color" | "cursor" | "display" | "flexDirection" | "fontFamily" | "fontSize" | "fontWeight" | "height" | "justifyContent" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "textAlign" | "userSelect" | "width" | "background" | "borderColor" | "borderRadius" | "borderStyle" | "borderWidth" | "gap" | "margin" | "overflow" | "padding" | "transition" | "marginX" | "marginY" | "paddingX" | "paddingY">;
|
|
563
563
|
};
|
|
@@ -4,8 +4,4 @@ import { Address } from 'viem';
|
|
|
4
4
|
* Each hook will store and track its own intervalId
|
|
5
5
|
*/
|
|
6
6
|
export declare function useCheckoutHistoryListener(activate?: boolean, singleDepositAddr?: Address | undefined): void;
|
|
7
|
-
/**
|
|
8
|
-
* Handles the starting and stopping of asset listeners based on the calling component's mount/unmount status
|
|
9
|
-
*/
|
|
10
|
-
export declare function useWalletAssetsListener(activate?: boolean): void;
|
|
11
7
|
export declare function useSIWFarcasterListener(channelToken: string): void;
|
package/dist/hooks/useMesh.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { LinkPayload } from '@meshconnect/web-link-sdk';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
2
|
+
import React, { ReactNode } from 'react';
|
|
3
3
|
import { FunSelectOption } from '../components/FunSelect/FunSelect';
|
|
4
|
-
import {
|
|
4
|
+
import { PaymentMethodBrokerageInfo } from '../consts/payment';
|
|
5
5
|
import { MeshExchanges } from '../utils/mesh';
|
|
6
6
|
export declare const getMeshExchangeIconMap: (size?: number) => Partial<Record<MeshExchanges, ReactNode>>;
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const useSupportedExchanges: () => MeshExchanges[];
|
|
8
8
|
export declare function getExchangeName(exchange: MeshExchanges): string;
|
|
9
9
|
export declare const useMeshExchanges: ({ fullInfo, iconSize, }: {
|
|
10
10
|
fullInfo?: boolean;
|
|
11
11
|
iconSize?: number;
|
|
12
12
|
}) => {
|
|
13
13
|
options: FunSelectOption[];
|
|
14
|
-
preparePaymentInfo: (meshMeta: LinkPayload) =>
|
|
14
|
+
preparePaymentInfo: (meshMeta: LinkPayload, brokerage: MeshExchanges) => PaymentMethodBrokerageInfo;
|
|
15
|
+
getIcon: (brokerage: MeshExchanges) => React.ReactNode;
|
|
15
16
|
};
|
|
16
17
|
/**
|
|
17
18
|
* Fetches mesh-related network information across all chains, given an exchange
|
|
@@ -24,7 +25,7 @@ export declare const useMeshNetworkInfo: (exchange: MeshExchanges) => {
|
|
|
24
25
|
* Fetches mesh-related network information based on the active chain user is logged in on, given an exchange
|
|
25
26
|
* @param exchange The mesh exchange user is currently connected with
|
|
26
27
|
*/
|
|
27
|
-
export declare const useMeshActiveNetworkInfo: (exchange
|
|
28
|
+
export declare const useMeshActiveNetworkInfo: (exchange?: MeshExchanges) => {
|
|
28
29
|
meshNetworkInfo: {
|
|
29
30
|
meshSupportedTokens: string[];
|
|
30
31
|
meshNetworkId: string | null;
|
|
@@ -37,3 +38,4 @@ export declare const useMeshActiveNetworkInfo: (exchange: MeshExchanges) => {
|
|
|
37
38
|
meshNetworkId: string | null;
|
|
38
39
|
}>;
|
|
39
40
|
};
|
|
41
|
+
export declare function useMeshAccountHoldings(targetChain: string, connection: LinkPayload | null): import("@tanstack/react-query").UseQueryResult<import("../utils/assets").AssetHoldingsMap, Error>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { KnownAssetBalanceInfo } from '../providers/GeneralWalletProvider';
|
|
2
|
+
export type WalletAssets = Record<string, KnownAssetBalanceInfo>;
|
|
3
|
+
export declare const useWalletAssets: ({ enableRefetchInterval, refetchOnMount, }: {
|
|
4
|
+
enableRefetchInterval?: boolean | undefined;
|
|
5
|
+
refetchOnMount?: boolean | undefined;
|
|
6
|
+
}) => {
|
|
7
|
+
walletAssets: WalletAssets | undefined;
|
|
8
|
+
totalWalletAssetsUsd: number;
|
|
9
|
+
isLoading: boolean;
|
|
10
|
+
isFetching: boolean;
|
|
11
|
+
};
|