@funkit/connect 12.12.1 → 12.13.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 +13 -0
- package/dist/clients/{chunk-GPI6LBBB.js → chunk-5GX6G7JR.js} +1 -1
- package/dist/clients/{chunk-JDQK4VQB.js → chunk-I75AI3N7.js} +5 -5
- package/dist/clients/{chunk-JN52EBYV.js → chunk-P6UM36G5.js} +64 -0
- package/dist/clients/{chunk-RBMOSICG.js → chunk-YMBIRJQF.js} +1 -1
- package/dist/clients/{chunk-WXHSEFYH.js → chunk-ZOQQL2QX.js} +1 -1
- package/dist/clients/fanatics.js +2 -2
- package/dist/clients/internal/nado/withdrawalCallback.js +3 -3
- package/dist/clients/internal/nado/withdrawalErrors.js +2 -2
- package/dist/clients/internal/nado/withdrawalForm.js +3 -3
- package/dist/clients/internal/nado/withdrawalStatus.js +3 -3
- package/dist/clients/lighter.js +3 -3
- package/dist/clients/mallard.js +2 -2
- package/dist/clients/nado.js +3 -3
- package/dist/components/FunTransactionSummary/PaymentFeesSummary.d.ts +6 -1
- package/dist/components/LargeAmountInput/LargeAmountInput.css.d.ts +8 -0
- package/dist/components/LargeAmountInput/LargeAmountInput.d.ts +26 -0
- package/dist/components/SwapDirectionButton/SwapDirectionButton.d.ts +12 -0
- package/dist/components/TokenSwapWidget/AmountUnitToggle/AmountUnitToggle.d.ts +13 -0
- package/dist/components/TokenSwapWidget/AmountUnitToggle/useAmountUnitToggle.d.ts +46 -0
- package/dist/components/TokenSwapWidget/TokenSelectButton/TokenSelectButton.d.ts +17 -0
- package/dist/components/TokenSwapWidget/TokenSwapCard/TokenSwapCard.d.ts +24 -0
- package/dist/components/TokenSwapWidget/TokenSwapWidget.css.d.ts +5 -0
- package/dist/components/TokenSwapWidget/TokenSwapWidget.d.ts +36 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +235 -107
- package/dist/modals/WithdrawalModal/useWithdrawalExtraFeeItems.d.ts +8 -0
- package/dist/providers/FunkitCheckoutContext/types.d.ts +29 -0
- package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
- package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
- package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
- package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
- package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
- package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
- package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
- package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
- package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
- package/dist/wallets/walletConnectors/index.js +49 -49
- package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
- package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
- package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
- package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
- package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
- package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
- package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
- package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
- package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
- package/package.json +5 -5
- package/dist/wallets/walletConnectors/{chunk-CU5J53XR.js → chunk-53MYTA42.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-ZSSSLFQF.js → chunk-65ULY6OC.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-XODA5ESL.js → chunk-A5POD5SV.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-RXRYHMRI.js → chunk-ANODOMIN.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-IWOMSW64.js → chunk-ASTCNVJC.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-U52QO5HF.js → chunk-F45CUFRR.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-YRMBR6NA.js → chunk-FYPQ3HP4.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-BBDNB5TQ.js → chunk-IWPW26AL.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-4FHNLTR3.js → chunk-JJBLW4IU.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-NXWG6FG2.js → chunk-KE4CWI3A.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-BBB2J3US.js → chunk-MWB6LFSG.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-34B7OJNT.js → chunk-OVDCDVFX.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-SR5CZR3L.js → chunk-PPQ6L4K2.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-IA5432IR.js → chunk-RJF2YEZ5.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-RFCZYLNR.js → chunk-RQYEGJKL.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-TRZDAXCQ.js → chunk-TIHTQ3OB.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-ALGPGI6V.js → chunk-TM7UBV3Q.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-HOCKAU5H.js → chunk-USLZMUJ3.js} +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @funkit/connect
|
|
2
2
|
|
|
3
|
+
## 12.13.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 219d767: Integrators can add their own rows, such as a margin requirement, to the withdrawal screen's transaction breakdown.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- bd971f7: Add the building blocks for an upcoming token swap screen; nothing changes for users yet.
|
|
12
|
+
- Updated dependencies [cb9de15]
|
|
13
|
+
- @funkit/api-base@8.6.0
|
|
14
|
+
- @funkit/connect-core@8.6.0
|
|
15
|
+
|
|
3
16
|
## 12.12.1
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
toWithdrawalAmountBaseUnit
|
|
4
|
-
} from "./chunk-4DBUYTEE.js";
|
|
5
2
|
import {
|
|
6
3
|
isExpectedNadoWithdrawalFailure,
|
|
7
4
|
toNadoWithdrawalErrorMessage
|
|
8
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ZOQQL2QX.js";
|
|
6
|
+
import {
|
|
7
|
+
toWithdrawalAmountBaseUnit
|
|
8
|
+
} from "./chunk-4DBUYTEE.js";
|
|
9
9
|
import {
|
|
10
10
|
getAccount,
|
|
11
11
|
signTypedData,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./chunk-OODIKHYE.js";
|
|
14
14
|
import {
|
|
15
15
|
i18n_default
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-P6UM36G5.js";
|
|
17
17
|
import {
|
|
18
18
|
generateClientMetadataForTokenTransfer
|
|
19
19
|
} from "./chunk-I5GSXPFE.js";
|
|
@@ -687,6 +687,14 @@ var en_default = {
|
|
|
687
687
|
belowMinimum: "{{amount}} minimum transfer",
|
|
688
688
|
pending: "Transfer pending"
|
|
689
689
|
},
|
|
690
|
+
tokenSwap: {
|
|
691
|
+
from: "From",
|
|
692
|
+
to: "To",
|
|
693
|
+
switchDirection: "Switch direction",
|
|
694
|
+
switchUnit: "Switch between USD and token amount",
|
|
695
|
+
selectToken: "Select token, {{symbol}} selected",
|
|
696
|
+
balance: "Balance: {{amount}}"
|
|
697
|
+
},
|
|
690
698
|
errorFallback: {
|
|
691
699
|
title: "Something went wrong",
|
|
692
700
|
description: "Close this window and try again.",
|
|
@@ -1293,6 +1301,14 @@ var es_default = {
|
|
|
1293
1301
|
belowMinimum: "{{amount}} transferencia m\xEDnima",
|
|
1294
1302
|
pending: "Transferencia pendiente"
|
|
1295
1303
|
},
|
|
1304
|
+
tokenSwap: {
|
|
1305
|
+
from: "Desde",
|
|
1306
|
+
to: "A",
|
|
1307
|
+
switchDirection: "Cambiar direcci\xF3n",
|
|
1308
|
+
switchUnit: "Cambiar entre monto en USD y en token",
|
|
1309
|
+
selectToken: "Seleccionar token, {{symbol}} seleccionado",
|
|
1310
|
+
balance: "Saldo: {{amount}}"
|
|
1311
|
+
},
|
|
1296
1312
|
errorFallback: {
|
|
1297
1313
|
title: "Algo sali\xF3 mal",
|
|
1298
1314
|
description: "Cierra esta ventana e int\xE9ntalo de nuevo.",
|
|
@@ -1899,6 +1915,14 @@ var fr_default = {
|
|
|
1899
1915
|
belowMinimum: "Transfert minimum de {{amount}}",
|
|
1900
1916
|
pending: "Transfert en attente"
|
|
1901
1917
|
},
|
|
1918
|
+
tokenSwap: {
|
|
1919
|
+
from: "De",
|
|
1920
|
+
to: "Vers",
|
|
1921
|
+
switchDirection: "Inverser le sens",
|
|
1922
|
+
switchUnit: "Basculer entre le montant en USD et en jeton",
|
|
1923
|
+
selectToken: "S\xE9lectionner un jeton, {{symbol}} s\xE9lectionn\xE9",
|
|
1924
|
+
balance: "Solde : {{amount}}"
|
|
1925
|
+
},
|
|
1902
1926
|
errorFallback: {
|
|
1903
1927
|
title: "Un probl\xE8me est survenu",
|
|
1904
1928
|
description: "Fermez cette fen\xEAtre et r\xE9essayez.",
|
|
@@ -2505,6 +2529,14 @@ var ja_default = {
|
|
|
2505
2529
|
belowMinimum: "{{amount}} \u6700\u5C0F\u9001\u91D1\u984D",
|
|
2506
2530
|
pending: "\u9001\u91D1\u4FDD\u7559\u4E2D"
|
|
2507
2531
|
},
|
|
2532
|
+
tokenSwap: {
|
|
2533
|
+
from: "\u9001\u4FE1\u5143",
|
|
2534
|
+
to: "\u9001\u4FE1\u5148",
|
|
2535
|
+
switchDirection: "\u65B9\u5411\u3092\u5207\u308A\u66FF\u3048\u308B",
|
|
2536
|
+
switchUnit: "USD\u3068\u30C8\u30FC\u30AF\u30F3\u306E\u91D1\u984D\u3092\u5207\u308A\u66FF\u3048\u308B",
|
|
2537
|
+
selectToken: "\u30C8\u30FC\u30AF\u30F3\u3092\u9078\u629E\uFF08{{symbol}}\u3092\u9078\u629E\u4E2D\uFF09",
|
|
2538
|
+
balance: "\u6B8B\u9AD8\uFF1A{{amount}}"
|
|
2539
|
+
},
|
|
2508
2540
|
errorFallback: {
|
|
2509
2541
|
title: "\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F",
|
|
2510
2542
|
description: "\u3053\u306E\u30A6\u30A3\u30F3\u30C9\u30A6\u3092\u9589\u3058\u3066\u3001\u3082\u3046\u4E00\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002",
|
|
@@ -3111,6 +3143,14 @@ var ko_default = {
|
|
|
3111
3143
|
belowMinimum: "{{amount}} \uCD5C\uC18C \uC804\uC1A1 \uAE08\uC561",
|
|
3112
3144
|
pending: "\uC774\uCCB4 \uB300\uAE30 \uC911"
|
|
3113
3145
|
},
|
|
3146
|
+
tokenSwap: {
|
|
3147
|
+
from: "\uBCF4\uB0B4\uB294 \uC790\uC0B0",
|
|
3148
|
+
to: "\uBC1B\uB294 \uC790\uC0B0",
|
|
3149
|
+
switchDirection: "\uBC29\uD5A5 \uC804\uD658",
|
|
3150
|
+
switchUnit: "USD\uC640 \uD1A0\uD070 \uAE08\uC561 \uC804\uD658",
|
|
3151
|
+
selectToken: "\uD1A0\uD070 \uC120\uD0DD, {{symbol}} \uC120\uD0DD\uB428",
|
|
3152
|
+
balance: "\uC794\uC561: {{amount}}"
|
|
3153
|
+
},
|
|
3114
3154
|
errorFallback: {
|
|
3115
3155
|
title: "\uBB38\uC81C\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4",
|
|
3116
3156
|
description: "\uC774 \uCC3D\uC744 \uB2EB\uACE0 \uB2E4\uC2DC \uC2DC\uB3C4\uD574 \uC8FC\uC138\uC694.",
|
|
@@ -3717,6 +3757,14 @@ var ru_default = {
|
|
|
3717
3757
|
belowMinimum: "{{amount}} \u043C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u0439 \u043F\u0435\u0440\u0435\u0432\u043E\u0434",
|
|
3718
3758
|
pending: "\u041F\u0435\u0440\u0435\u0432\u043E\u0434 \u0432 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0435"
|
|
3719
3759
|
},
|
|
3760
|
+
tokenSwap: {
|
|
3761
|
+
from: "\u0418\u0437",
|
|
3762
|
+
to: "\u0412",
|
|
3763
|
+
switchDirection: "\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435",
|
|
3764
|
+
switchUnit: "\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043C\u0435\u0436\u0434\u0443 \u0441\u0443\u043C\u043C\u043E\u0439 \u0432 USD \u0438 \u0432 \u0442\u043E\u043A\u0435\u043D\u0430\u0445",
|
|
3765
|
+
selectToken: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0442\u043E\u043A\u0435\u043D, \u0432\u044B\u0431\u0440\u0430\u043D {{symbol}}",
|
|
3766
|
+
balance: "\u0411\u0430\u043B\u0430\u043D\u0441: {{amount}}"
|
|
3767
|
+
},
|
|
3720
3768
|
errorFallback: {
|
|
3721
3769
|
title: "\u0427\u0442\u043E-\u0442\u043E \u043F\u043E\u0448\u043B\u043E \u043D\u0435 \u0442\u0430\u043A",
|
|
3722
3770
|
description: "\u0417\u0430\u043A\u0440\u043E\u0439\u0442\u0435 \u044D\u0442\u043E \u043E\u043A\u043D\u043E \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.",
|
|
@@ -4323,6 +4371,14 @@ var tr_default = {
|
|
|
4323
4371
|
belowMinimum: "{{amount}} minimum transfer",
|
|
4324
4372
|
pending: "Transfer beklemede"
|
|
4325
4373
|
},
|
|
4374
|
+
tokenSwap: {
|
|
4375
|
+
from: "Kaynak",
|
|
4376
|
+
to: "Hedef",
|
|
4377
|
+
switchDirection: "Y\xF6n\xFC de\u011Fi\u015Ftir",
|
|
4378
|
+
switchUnit: "USD ve token tutar\u0131 aras\u0131nda ge\xE7i\u015F yap",
|
|
4379
|
+
selectToken: "Token se\xE7, {{symbol}} se\xE7ili",
|
|
4380
|
+
balance: "Bakiye: {{amount}}"
|
|
4381
|
+
},
|
|
4326
4382
|
errorFallback: {
|
|
4327
4383
|
title: "Bir \u015Feyler yanl\u0131\u015F gitti",
|
|
4328
4384
|
description: "Bu pencereyi kapat\u0131p tekrar deneyin.",
|
|
@@ -4929,6 +4985,14 @@ var zh_default = {
|
|
|
4929
4985
|
belowMinimum: "{{amount}} \u6700\u5C0F\u8F6C\u8D26",
|
|
4930
4986
|
pending: "\u8F6C\u8D26\u5904\u7406\u4E2D"
|
|
4931
4987
|
},
|
|
4988
|
+
tokenSwap: {
|
|
4989
|
+
from: "\u4ECE",
|
|
4990
|
+
to: "\u81F3",
|
|
4991
|
+
switchDirection: "\u5207\u6362\u65B9\u5411",
|
|
4992
|
+
switchUnit: "\u5728\u7F8E\u5143\u548C\u4EE3\u5E01\u91D1\u989D\u4E4B\u95F4\u5207\u6362",
|
|
4993
|
+
selectToken: "\u9009\u62E9\u4EE3\u5E01\uFF0C\u5DF2\u9009 {{symbol}}",
|
|
4994
|
+
balance: "\u4F59\u989D\uFF1A{{amount}}"
|
|
4995
|
+
},
|
|
4932
4996
|
errorFallback: {
|
|
4933
4997
|
title: "\u51FA\u73B0\u95EE\u9898",
|
|
4934
4998
|
description: "\u8BF7\u5173\u95ED\u6B64\u7A97\u53E3\u540E\u91CD\u8BD5\u3002",
|
package/dist/clients/fanatics.js
CHANGED
|
@@ -10,8 +10,8 @@ import {
|
|
|
10
10
|
} from "./chunk-RQALGV5U.js";
|
|
11
11
|
import {
|
|
12
12
|
useFunkitTranslation
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-5GX6G7JR.js";
|
|
14
|
+
import "./chunk-P6UM36G5.js";
|
|
15
15
|
import "./chunk-AHYOV7AV.js";
|
|
16
16
|
|
|
17
17
|
// src/clients/fanatics.tsx
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createNadoWithdrawalCallback
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-I75AI3N7.js";
|
|
5
|
+
import "../../chunk-ZOQQL2QX.js";
|
|
5
6
|
import "../../chunk-4DBUYTEE.js";
|
|
6
|
-
import "../../chunk-WXHSEFYH.js";
|
|
7
7
|
import "../../chunk-OODIKHYE.js";
|
|
8
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-P6UM36G5.js";
|
|
9
9
|
import "../../chunk-I5GSXPFE.js";
|
|
10
10
|
import "../../chunk-AHYOV7AV.js";
|
|
11
11
|
export {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import {
|
|
3
3
|
isExpectedNadoWithdrawalFailure,
|
|
4
4
|
toNadoWithdrawalErrorMessage
|
|
5
|
-
} from "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
5
|
+
} from "../../chunk-ZOQQL2QX.js";
|
|
6
|
+
import "../../chunk-P6UM36G5.js";
|
|
7
7
|
export {
|
|
8
8
|
isExpectedNadoWithdrawalFailure,
|
|
9
9
|
toNadoWithdrawalErrorMessage
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
import "../../chunk-6EU6CXNH.js";
|
|
9
9
|
import {
|
|
10
10
|
useFunkitConfig
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-YMBIRJQF.js";
|
|
12
12
|
import {
|
|
13
13
|
useFunkitTranslation
|
|
14
|
-
} from "../../chunk-
|
|
14
|
+
} from "../../chunk-5GX6G7JR.js";
|
|
15
15
|
import "../../chunk-4DBUYTEE.js";
|
|
16
16
|
import "../../chunk-2W2P3OS6.js";
|
|
17
|
-
import "../../chunk-
|
|
17
|
+
import "../../chunk-P6UM36G5.js";
|
|
18
18
|
import {
|
|
19
19
|
logger
|
|
20
20
|
} from "../../chunk-AHYOV7AV.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
useFunkitConfig
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-YMBIRJQF.js";
|
|
5
|
+
import "../../chunk-5GX6G7JR.js";
|
|
6
6
|
import {
|
|
7
7
|
useAccount
|
|
8
8
|
} from "../../chunk-2W2P3OS6.js";
|
|
9
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-P6UM36G5.js";
|
|
10
10
|
import {
|
|
11
11
|
logger
|
|
12
12
|
} from "../../chunk-AHYOV7AV.js";
|
package/dist/clients/lighter.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "./chunk-6EU6CXNH.js";
|
|
6
6
|
import {
|
|
7
7
|
useFunkitConfig
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-YMBIRJQF.js";
|
|
9
9
|
import {
|
|
10
10
|
AsyncImage,
|
|
11
11
|
Box,
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
} from "./chunk-RQALGV5U.js";
|
|
14
14
|
import {
|
|
15
15
|
useFunkitTranslation
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-5GX6G7JR.js";
|
|
17
17
|
import "./chunk-OODIKHYE.js";
|
|
18
18
|
import "./chunk-2W2P3OS6.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-P6UM36G5.js";
|
|
20
20
|
import {
|
|
21
21
|
logger
|
|
22
22
|
} from "./chunk-AHYOV7AV.js";
|
package/dist/clients/mallard.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
useFunkitTranslation
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5GX6G7JR.js";
|
|
5
5
|
import {
|
|
6
6
|
getAccount,
|
|
7
7
|
sendTransaction,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
useAccount,
|
|
15
15
|
useConfig
|
|
16
16
|
} from "./chunk-2W2P3OS6.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-P6UM36G5.js";
|
|
18
18
|
import {
|
|
19
19
|
logger
|
|
20
20
|
} from "./chunk-AHYOV7AV.js";
|
package/dist/clients/nado.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createNadoWithdrawalCallback
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-I75AI3N7.js";
|
|
5
|
+
import "./chunk-ZOQQL2QX.js";
|
|
5
6
|
import "./chunk-4DBUYTEE.js";
|
|
6
|
-
import "./chunk-WXHSEFYH.js";
|
|
7
7
|
import "./chunk-OODIKHYE.js";
|
|
8
8
|
import {
|
|
9
9
|
useAccount,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./chunk-2W2P3OS6.js";
|
|
12
12
|
import {
|
|
13
13
|
i18n_default
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-P6UM36G5.js";
|
|
15
15
|
import "./chunk-I5GSXPFE.js";
|
|
16
16
|
import {
|
|
17
17
|
logger
|
|
@@ -15,8 +15,13 @@ interface PaymentFeesSummaryProps {
|
|
|
15
15
|
isWithdrawal: boolean;
|
|
16
16
|
extraSourceChainGasUsd?: number;
|
|
17
17
|
step: FunCheckoutStep | WithdrawalModalStep;
|
|
18
|
+
/**
|
|
19
|
+
* Integrator rows rendered before the SDK's own rows.
|
|
20
|
+
* - Display-only: excluded from the total, expandability and analytics.
|
|
21
|
+
*/
|
|
22
|
+
extraFeeItems?: FeeItem[];
|
|
18
23
|
}
|
|
19
|
-
export declare function PaymentFeesSummary({ isLoading, quote, fallbackFees, isWithdrawal, valuesNotAvailable, extraSourceChainGasUsd, step, }: PaymentFeesSummaryProps): React.JSX.Element;
|
|
24
|
+
export declare function PaymentFeesSummary({ isLoading, quote, fallbackFees, isWithdrawal, valuesNotAvailable, extraSourceChainGasUsd, step, extraFeeItems, }: PaymentFeesSummaryProps): React.JSX.Element;
|
|
20
25
|
export interface FeeItem {
|
|
21
26
|
label: string;
|
|
22
27
|
value: string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Borderless big-number input; the wrapper owns the (fitted) font size, so
|
|
3
|
+
* everything here inherits.
|
|
4
|
+
* - `!important` beats host pages that style bare `input` selectors.
|
|
5
|
+
* - The family comes from the wrapper's theme `inputAmount` font, like
|
|
6
|
+
* checkout's amount field.
|
|
7
|
+
*/
|
|
8
|
+
export declare const largeAmountInput: string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface LargeAmountInputProps {
|
|
3
|
+
/** Controlled amount string (raw user input). */
|
|
4
|
+
amount: string;
|
|
5
|
+
/** Omit together with `readOnly` for a display-only amount. */
|
|
6
|
+
onAmountChange?: (next: string) => void;
|
|
7
|
+
ariaLabel: string;
|
|
8
|
+
/** Defaults to `center`. */
|
|
9
|
+
align?: 'center' | 'start';
|
|
10
|
+
/** Rendered outside the field so the caret sits on the digits, e.g. `$`. */
|
|
11
|
+
prefix?: string;
|
|
12
|
+
/** e.g. ` SOL` when the amount is in token units. */
|
|
13
|
+
suffix?: string;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
readOnly?: boolean;
|
|
16
|
+
autoFocus?: boolean;
|
|
17
|
+
/** Defaults to the theme `inputAmount` size. */
|
|
18
|
+
maxFontSize?: number;
|
|
19
|
+
/** Caps the width the text shrinks to fit, on top of the measured container. */
|
|
20
|
+
maxAvailableWidth?: number;
|
|
21
|
+
testId?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Big "$<amount>" field that shrinks its font to fit the available width.
|
|
25
|
+
*/
|
|
26
|
+
export declare function LargeAmountInput({ amount, onAmountChange, ariaLabel, align, prefix, suffix, placeholder, readOnly, autoFocus, maxFontSize: maxFontSizeProp, maxAvailableWidth, testId, }: LargeAmountInputProps): React.JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type SwapDirectionButtonShape = 'circle' | 'rounded';
|
|
3
|
+
export interface SwapDirectionButtonProps {
|
|
4
|
+
onClick: () => void;
|
|
5
|
+
/** Defaults to `circle`. */
|
|
6
|
+
shape?: SwapDirectionButtonShape;
|
|
7
|
+
ariaLabel?: string;
|
|
8
|
+
isDisabled?: boolean;
|
|
9
|
+
testId?: string;
|
|
10
|
+
}
|
|
11
|
+
/** Flips which side of a From/To pair is the source. */
|
|
12
|
+
export declare function SwapDirectionButton({ onClick, shape, ariaLabel, isDisabled, testId, }: SwapDirectionButtonProps): React.JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface AmountUnitToggleProps {
|
|
3
|
+
/** The amount in the unit that isn't being typed, already formatted. */
|
|
4
|
+
convertedAmount: string;
|
|
5
|
+
/** Omit to show the amount without the switch (e.g. price unknown). */
|
|
6
|
+
onToggle?: () => void;
|
|
7
|
+
testId?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* "28.05 ⇅": shows the other unit and switches the input to it on click.
|
|
11
|
+
* Without `onToggle` it's plain text, so it isn't a dead tab stop.
|
|
12
|
+
*/
|
|
13
|
+
export declare function AmountUnitToggle({ convertedAmount, onToggle, testId, }: AmountUnitToggleProps): React.JSX.Element;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export type AmountUnit = 'usd' | 'token';
|
|
2
|
+
/**
|
|
3
|
+
* The next input value reformatted like checkout's amount field (leading zeros
|
|
4
|
+
* dropped, group separators, decimals capped), or `null` when it holds
|
|
5
|
+
* anything but digits and separators (the caller keeps the previous value).
|
|
6
|
+
*/
|
|
7
|
+
export declare function sanitizeAmountInput(next: string, locale: Intl.LocalesArgument): string | null;
|
|
8
|
+
/** Floats, not base units: fine for display and quotes, not for an exact Max. */
|
|
9
|
+
export interface AmountInUnits {
|
|
10
|
+
/** `undefined` when the input is empty, or in token mode without a price. */
|
|
11
|
+
usdAmount: number | undefined;
|
|
12
|
+
/** `undefined` when the input is empty, or in USD mode without a price. */
|
|
13
|
+
tokenAmount: number | undefined;
|
|
14
|
+
}
|
|
15
|
+
export declare function getAmountInUnits(inputValue: string, unit: AmountUnit, unitPriceUsd: number | undefined, locale: Intl.LocalesArgument): AmountInUnits;
|
|
16
|
+
/**
|
|
17
|
+
* The input value re-expressed in `nextUnit`, rounded the way checkout's
|
|
18
|
+
* reducer does (USD floors so it never exceeds what the tokens are worth).
|
|
19
|
+
*/
|
|
20
|
+
export declare function convertInputValue(inputValue: string, nextUnit: AmountUnit, unitPriceUsd: number, locale: Intl.LocalesArgument): string;
|
|
21
|
+
export interface AmountUnitToggleState extends AmountInUnits {
|
|
22
|
+
/**
|
|
23
|
+
* Locale-formatted text for the field ("1,000.50"). Display only: pass
|
|
24
|
+
* `tokenAmount`/`usdAmount` on, since this breaks `parseUnits` and quotes.
|
|
25
|
+
*/
|
|
26
|
+
inputValue: string;
|
|
27
|
+
unit: AmountUnit;
|
|
28
|
+
/** Ignores input that isn't digits and separators. */
|
|
29
|
+
setInputValue: (next: string) => void;
|
|
30
|
+
/** `undefined` while the token price is unknown, so there's nothing to convert with. */
|
|
31
|
+
toggleUnit: (() => void) | undefined;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Amount entry that can be typed in either USD or token units, converting the
|
|
35
|
+
* typed value when the unit flips.
|
|
36
|
+
* - Placeholder until checkout's exact-in amount logic is shared: no frozen
|
|
37
|
+
* price, no base-unit amount, no balance cap.
|
|
38
|
+
* - `initialUnit`/`initialInputValue` are read on mount only; the caller must
|
|
39
|
+
* reset or convert the value when the token changes (picker or direction swap).
|
|
40
|
+
*/
|
|
41
|
+
export declare function useAmountUnitToggle({ unitPriceUsd, initialUnit, initialInputValue, locale, }: {
|
|
42
|
+
unitPriceUsd: number | undefined;
|
|
43
|
+
initialUnit?: AmountUnit;
|
|
44
|
+
initialInputValue?: string;
|
|
45
|
+
locale?: Intl.LocalesArgument;
|
|
46
|
+
}): AmountUnitToggleState;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface TokenSwapToken {
|
|
3
|
+
symbol: string;
|
|
4
|
+
iconSrc?: string;
|
|
5
|
+
chainId?: string | number;
|
|
6
|
+
}
|
|
7
|
+
export interface TokenSelectButtonProps {
|
|
8
|
+
token: TokenSwapToken;
|
|
9
|
+
/** Omit to render the token without the picker affordance. */
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
testId?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Token icon (with chain badge), symbol and ">" that opens the token picker.
|
|
15
|
+
* Without `onClick` it renders as plain content, so it isn't a dead tab stop.
|
|
16
|
+
*/
|
|
17
|
+
export declare function TokenSelectButton({ token, onClick, testId, }: TokenSelectButtonProps): React.JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type TokenSwapToken } from '../TokenSelectButton/TokenSelectButton';
|
|
3
|
+
export interface TokenSwapCardProps {
|
|
4
|
+
label: string;
|
|
5
|
+
token: TokenSwapToken;
|
|
6
|
+
onTokenClick?: () => void;
|
|
7
|
+
/** The big amount, without prefix/suffix. */
|
|
8
|
+
amount: string;
|
|
9
|
+
amountPrefix?: string;
|
|
10
|
+
/** Present only on the editable (source) card. */
|
|
11
|
+
onAmountChange?: (next: string) => void;
|
|
12
|
+
/** The amount in the other unit, already formatted. */
|
|
13
|
+
convertedAmount: string;
|
|
14
|
+
onToggleUnit?: () => void;
|
|
15
|
+
balance?: string;
|
|
16
|
+
isLoading?: boolean;
|
|
17
|
+
testId: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* One side of the swap widget.
|
|
21
|
+
* - Editable (has `onAmountChange`): filled background, unit toggle, highlighted balance.
|
|
22
|
+
* - Read-only: outlined, amount comes from the quote.
|
|
23
|
+
*/
|
|
24
|
+
export declare function TokenSwapCard({ label, token, onTokenClick, amount, amountPrefix, onAmountChange, convertedAmount, onToggleUnit, balance, isLoading, testId, }: TokenSwapCardProps): React.JSX.Element;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AmountUnit } from './AmountUnitToggle/useAmountUnitToggle';
|
|
3
|
+
import type { TokenSwapToken } from './TokenSelectButton/TokenSelectButton';
|
|
4
|
+
export type { TokenSwapToken };
|
|
5
|
+
interface TokenSwapSideAmounts {
|
|
6
|
+
token: TokenSwapToken;
|
|
7
|
+
onTokenClick?: () => void;
|
|
8
|
+
usdAmount: number | undefined;
|
|
9
|
+
tokenAmount: number | undefined;
|
|
10
|
+
/** The user's holding of `token`, in token units. */
|
|
11
|
+
tokenBalance?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface TokenSwapFromSide extends TokenSwapSideAmounts {
|
|
14
|
+
/** What the user typed, in `unit`. */
|
|
15
|
+
inputValue: string;
|
|
16
|
+
onInputChange: (next: string) => void;
|
|
17
|
+
}
|
|
18
|
+
export interface TokenSwapToSide extends TokenSwapSideAmounts {
|
|
19
|
+
/** Shows a skeleton in place of the amount while the quote loads. */
|
|
20
|
+
isLoading?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface TokenSwapWidgetProps {
|
|
23
|
+
from: TokenSwapFromSide;
|
|
24
|
+
to: TokenSwapToSide;
|
|
25
|
+
/** Unit the amounts are entered and shown in. */
|
|
26
|
+
unit: AmountUnit;
|
|
27
|
+
/** Omit to hide the unit switch (e.g. price unknown). */
|
|
28
|
+
onToggleUnit?: () => void;
|
|
29
|
+
onSwapDirection: () => void;
|
|
30
|
+
isSwapDirectionDisabled?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* From card, swap-direction button, To card. Layout and callbacks only; the
|
|
34
|
+
* caller owns amounts, quotes and token selection.
|
|
35
|
+
*/
|
|
36
|
+
export declare function TokenSwapWidget({ from, to, unit, onToggleUnit, onSwapDirection, isSwapDirectionDisabled, }: TokenSwapWidgetProps): React.JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export { createAuthenticationAdapter, FunkitConnectAuthenticationProvider, } fro
|
|
|
20
20
|
export type { AuthenticationAdapter, FunkitConnectAuthenticationProviderProps, } from './providers/AuthenticationContext';
|
|
21
21
|
export type { AvatarComponent } from './providers/AvatarContext';
|
|
22
22
|
export type { CheckoutBlockedReason } from './modals/CheckoutModal/CheckoutBlockedReason';
|
|
23
|
-
export type { FunkitCheckoutActionParams, FunkitCheckoutConfig, FunkitCheckoutOnCloseResult, FunkitWithdrawalConfig, WalletWithdrawalConfig, CustomWithdrawalConfig, MultiMethodWithdrawalConfig, WithdrawalMethodOption, WithdrawalParam, WithdrawalFormData, WithdrawalSourceTokenBalanceParams, WithdrawalSourceCustomData, SourceTokenOption, WithdrawalCustomerData, LighterWithdrawalCustomerData, LighterRouteType, WithdrawalCustomerConfig, UseFunkitCheckoutPropsWithFullConfig, UseFunkitCheckoutProps, FunkitCheckoutValidationResult, FunkitCheckoutResult, DynamicTargetAssetCandidate, AddToWalletToken, TokenInfo, ModalTitleContext, DestinationLineItem, DestinationLineItemContext, LineItemSlot, LineItemValue, LineItemValueColor, } from './providers/FunkitCheckoutContext';
|
|
23
|
+
export type { FunkitCheckoutActionParams, FunkitCheckoutConfig, FunkitCheckoutOnCloseResult, FunkitWithdrawalConfig, WalletWithdrawalConfig, CustomWithdrawalConfig, MultiMethodWithdrawalConfig, WithdrawalMethodOption, WithdrawalParam, WithdrawalFormData, WithdrawalSourceTokenBalanceParams, WithdrawalSourceCustomData, SourceTokenOption, WithdrawalCustomerData, LighterWithdrawalCustomerData, LighterRouteType, WithdrawalCustomerConfig, UseFunkitCheckoutPropsWithFullConfig, UseFunkitCheckoutProps, FunkitCheckoutValidationResult, FunkitCheckoutResult, DynamicTargetAssetCandidate, AddToWalletToken, TokenInfo, ModalTitleContext, DestinationLineItem, DestinationLineItemContext, LineItemSlot, LineItemValue, LineItemValueColor, WithdrawalFeeItem, WithdrawalFeeItemContext, } from './providers/FunkitCheckoutContext';
|
|
24
24
|
export { useFunkitCheckout, FunCheckoutStartingStep, } from './providers/FunkitCheckoutContext';
|
|
25
25
|
export type { FunkitCheckoutQuoteResult } from './domains/quote';
|
|
26
26
|
export type { FunkitConfig, FunkitUiCustomizationsConfig, FunkitTextCustomizationsConfig, } from './providers/FunkitConfigContext';
|