@unifold/connect-react 0.1.78 → 0.1.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +308 -322
- package/dist/index.mjs +53 -67
- package/package.json +6 -6
package/dist/index.mjs
CHANGED
|
@@ -6194,8 +6194,6 @@ import {
|
|
|
6194
6194
|
generatePrefixedKSUID as generatePrefixedKSUID5,
|
|
6195
6195
|
DepositEventType as DepositEventType4
|
|
6196
6196
|
} from "@unifold/core";
|
|
6197
|
-
import { useQuery as useQuery9 } from "@tanstack/react-query";
|
|
6198
|
-
import { getCashAppLimits } from "@unifold/core";
|
|
6199
6197
|
import { Fragment as Fragment62, jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
6200
6198
|
import { useCallback as useCallback62, useEffect as useEffect162, useMemo as useMemo92, useRef as useRef72, useState as useState19 } from "react";
|
|
6201
6199
|
import {
|
|
@@ -6206,7 +6204,7 @@ import {
|
|
|
6206
6204
|
getWalletByChainType as getWalletByChainType3,
|
|
6207
6205
|
generatePrefixedKSUID as generatePrefixedKSUID6
|
|
6208
6206
|
} from "@unifold/core";
|
|
6209
|
-
import { useQuery as
|
|
6207
|
+
import { useQuery as useQuery9 } from "@tanstack/react-query";
|
|
6210
6208
|
import { getBankTransferProviders } from "@unifold/core";
|
|
6211
6209
|
import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
6212
6210
|
import { ExecutionStatus as ExecutionStatus4, getIconUrl as getIconUrl4 } from "@unifold/core";
|
|
@@ -6502,18 +6500,18 @@ import {
|
|
|
6502
6500
|
IntegrationTransferError,
|
|
6503
6501
|
IntegrationProvider
|
|
6504
6502
|
} from "@unifold/core";
|
|
6505
|
-
import { useQuery as
|
|
6503
|
+
import { useQuery as useQuery10, keepPreviousData } from "@tanstack/react-query";
|
|
6506
6504
|
import { getProjectConfig } from "@unifold/core";
|
|
6507
|
-
import { useQuery as
|
|
6505
|
+
import { useQuery as useQuery11 } from "@tanstack/react-query";
|
|
6508
6506
|
import {
|
|
6509
6507
|
getIntegrationTransferDefaultToken
|
|
6510
6508
|
} from "@unifold/core";
|
|
6511
6509
|
import { Fragment as Fragment92, jsx as jsx51, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
6512
|
-
import { useQuery as
|
|
6510
|
+
import { useQuery as useQuery12 } from "@tanstack/react-query";
|
|
6513
6511
|
import { getExchanges } from "@unifold/core";
|
|
6514
|
-
import { useQuery as
|
|
6512
|
+
import { useQuery as useQuery13 } from "@tanstack/react-query";
|
|
6515
6513
|
import { getPublicIncident } from "@unifold/core";
|
|
6516
|
-
import { useQuery as
|
|
6514
|
+
import { useQuery as useQuery14 } from "@tanstack/react-query";
|
|
6517
6515
|
import {
|
|
6518
6516
|
getWalletPayProviders
|
|
6519
6517
|
} from "@unifold/core";
|
|
@@ -6625,7 +6623,7 @@ function generateKSUID() {
|
|
|
6625
6623
|
function generatePrefixedKSUID(prefix) {
|
|
6626
6624
|
return `${prefix}_${generateKSUID()}`;
|
|
6627
6625
|
}
|
|
6628
|
-
var PACKAGE_VERSION = "0.1.
|
|
6626
|
+
var PACKAGE_VERSION = "0.1.79";
|
|
6629
6627
|
var LIBRARY_NAME = "@unifold/analytics";
|
|
6630
6628
|
var DEFAULT_DEDUP_MS = 500;
|
|
6631
6629
|
var SESSION_PREFIX = "asess";
|
|
@@ -6779,7 +6777,7 @@ function createEventTracker(config) {
|
|
|
6779
6777
|
// ../ui-react/dist/index.mjs
|
|
6780
6778
|
import { DepositEventType as DepositEventType6 } from "@unifold/core";
|
|
6781
6779
|
import { DepositEventType as DepositEventType7 } from "@unifold/core";
|
|
6782
|
-
import { useQuery as
|
|
6780
|
+
import { useQuery as useQuery15 } from "@tanstack/react-query";
|
|
6783
6781
|
import {
|
|
6784
6782
|
verifyRecipientAddress
|
|
6785
6783
|
} from "@unifold/core";
|
|
@@ -11538,7 +11536,7 @@ import {
|
|
|
11538
11536
|
getWalletByChainType as getWalletByChainType5,
|
|
11539
11537
|
formatStablecoinAmount
|
|
11540
11538
|
} from "@unifold/core";
|
|
11541
|
-
import { useQuery as
|
|
11539
|
+
import { useQuery as useQuery16 } from "@tanstack/react-query";
|
|
11542
11540
|
import { checkHypercoreActivation } from "@unifold/core";
|
|
11543
11541
|
import { jsx as jsx59, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
11544
11542
|
import { Fragment as Fragment12, jsx as jsx60, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
@@ -12797,9 +12795,9 @@ import {
|
|
|
12797
12795
|
buildHypercoreTransaction as buildHypercoreTransactionFromBackend,
|
|
12798
12796
|
sendHypercoreTransaction as sendHypercoreTransactionToBackend
|
|
12799
12797
|
} from "@unifold/core";
|
|
12800
|
-
import { useQuery as
|
|
12798
|
+
import { useQuery as useQuery17 } from "@tanstack/react-query";
|
|
12801
12799
|
import { getDepositQuote } from "@unifold/core";
|
|
12802
|
-
import { useQuery as
|
|
12800
|
+
import { useQuery as useQuery18 } from "@tanstack/react-query";
|
|
12803
12801
|
import { getExternalWallets } from "@unifold/core";
|
|
12804
12802
|
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
12805
12803
|
import { jsx as jsx64, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
@@ -12816,7 +12814,7 @@ import { jsx as jsx71 } from "react/jsx-runtime";
|
|
|
12816
12814
|
import { useState as useState45, useEffect as useEffect43, useLayoutEffect as useLayoutEffect32, useCallback as useCallback15, useRef as useRef182, useMemo as useMemo18 } from "react";
|
|
12817
12815
|
import { useEffect as useEffect422, useRef as useRef172 } from "react";
|
|
12818
12816
|
import { CheckoutEventType } from "@unifold/core";
|
|
12819
|
-
import { useQuery as
|
|
12817
|
+
import { useQuery as useQuery19 } from "@tanstack/react-query";
|
|
12820
12818
|
import { retrievePaymentIntent } from "@unifold/core";
|
|
12821
12819
|
import {
|
|
12822
12820
|
CheckoutEventType as CheckoutEventType2,
|
|
@@ -12824,15 +12822,15 @@ import {
|
|
|
12824
12822
|
} from "@unifold/core";
|
|
12825
12823
|
import { Fragment as Fragment17, jsx as jsx722, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
12826
12824
|
import { useState as useState49, useEffect as useEffect47, useLayoutEffect as useLayoutEffect42, useCallback as useCallback17, useMemo as useMemo21, useRef as useRef20 } from "react";
|
|
12827
|
-
import { useQuery as
|
|
12825
|
+
import { useQuery as useQuery20 } from "@tanstack/react-query";
|
|
12828
12826
|
import {
|
|
12829
12827
|
getSupportedDestinationTokens
|
|
12830
12828
|
} from "@unifold/core";
|
|
12831
|
-
import { useQuery as
|
|
12829
|
+
import { useQuery as useQuery21 } from "@tanstack/react-query";
|
|
12832
12830
|
import { getSupportedDepositTokens as getSupportedDepositTokens3 } from "@unifold/core";
|
|
12833
|
-
import { useQuery as
|
|
12831
|
+
import { useQuery as useQuery22 } from "@tanstack/react-query";
|
|
12834
12832
|
import { getAddressBalance as getAddressBalance2 } from "@unifold/core";
|
|
12835
|
-
import { useQuery as
|
|
12833
|
+
import { useQuery as useQuery23 } from "@tanstack/react-query";
|
|
12836
12834
|
import { queryExecutions as queryExecutions4, ActionType as ActionType4 } from "@unifold/core";
|
|
12837
12835
|
import { useState as useState46, useEffect as useEffect44, useRef as useRef192 } from "react";
|
|
12838
12836
|
import {
|
|
@@ -12848,7 +12846,7 @@ import { useState as useState47, useCallback as useCallback16, useMemo as useMem
|
|
|
12848
12846
|
import {
|
|
12849
12847
|
checkHypercoreActivation as checkHypercoreActivation3
|
|
12850
12848
|
} from "@unifold/core";
|
|
12851
|
-
import { useQuery as
|
|
12849
|
+
import { useQuery as useQuery24 } from "@tanstack/react-query";
|
|
12852
12850
|
import { verifyRecipientAddress as verifyRecipientAddress2 } from "@unifold/core";
|
|
12853
12851
|
import {
|
|
12854
12852
|
buildSolanaTransaction as buildSolanaTransaction2,
|
|
@@ -12856,7 +12854,7 @@ import {
|
|
|
12856
12854
|
} from "@unifold/core";
|
|
12857
12855
|
import { useMemo as useMemo19 } from "react";
|
|
12858
12856
|
import { ActionType as ActionType6 } from "@unifold/core";
|
|
12859
|
-
import { useQuery as
|
|
12857
|
+
import { useQuery as useQuery25 } from "@tanstack/react-query";
|
|
12860
12858
|
import { getDepositAddress } from "@unifold/core";
|
|
12861
12859
|
import { Fragment as Fragment18, jsx as jsx74, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
12862
12860
|
import { ExecutionStatus as ExecutionStatus7, getIconUrl as getIconUrl5 } from "@unifold/core";
|
|
@@ -21904,16 +21902,6 @@ function PayWithExchange({
|
|
|
21904
21902
|
}
|
|
21905
21903
|
);
|
|
21906
21904
|
}
|
|
21907
|
-
function useCashAppLimits({ publishableKey, currency = "usd" }) {
|
|
21908
|
-
return useQuery9({
|
|
21909
|
-
queryKey: ["unifold", "cashAppLimits", currency, publishableKey],
|
|
21910
|
-
queryFn: () => getCashAppLimits(currency, publishableKey),
|
|
21911
|
-
enabled: !!publishableKey,
|
|
21912
|
-
staleTime: 2 * 60 * 6e4,
|
|
21913
|
-
gcTime: 4 * 60 * 6e4,
|
|
21914
|
-
retry: 2
|
|
21915
|
-
});
|
|
21916
|
-
}
|
|
21917
21905
|
var POLL_INTERVAL_MS3 = 5e3;
|
|
21918
21906
|
var FALLBACK_MIN_USD = 5;
|
|
21919
21907
|
var SUGGESTED_AMOUNTS = [25, 50, 100];
|
|
@@ -21949,9 +21937,11 @@ function PayWithCashApp({
|
|
|
21949
21937
|
const b = parseInt(bg.slice(4, 6), 16);
|
|
21950
21938
|
return (r2 * 299 + g * 587 + b * 114) / 1e3 < 128;
|
|
21951
21939
|
})();
|
|
21952
|
-
const { data:
|
|
21953
|
-
|
|
21954
|
-
|
|
21940
|
+
const { data: fiatCurrencies, isLoading: limitsLoading } = useFiatCurrencies({
|
|
21941
|
+
publishableKey
|
|
21942
|
+
});
|
|
21943
|
+
const minUsd = fiatCurrencies?.data.find((entry) => entry.currency_code.toLowerCase() === "usd")?.minimum_amount ?? FALLBACK_MIN_USD;
|
|
21944
|
+
const quickAmounts = SUGGESTED_AMOUNTS.filter((value) => value >= minUsd);
|
|
21955
21945
|
const [amount, setAmount] = useState18(() => sanitizePrefilledUsd(prefilledAmountUsd));
|
|
21956
21946
|
const [loading, setLoading] = useState18(false);
|
|
21957
21947
|
const [session, setSession] = useState18(null);
|
|
@@ -22006,6 +21996,8 @@ function PayWithCashApp({
|
|
|
22006
21996
|
setError(strings.depositModal.cashAppErrors.missingFields);
|
|
22007
21997
|
return;
|
|
22008
21998
|
}
|
|
21999
|
+
const amountNum2 = parseFloat(amount);
|
|
22000
|
+
if (isNaN(amountNum2) || amountNum2 < minUsd) return;
|
|
22009
22001
|
setLoading(true);
|
|
22010
22002
|
setError(null);
|
|
22011
22003
|
try {
|
|
@@ -22054,6 +22046,7 @@ function PayWithCashApp({
|
|
|
22054
22046
|
}
|
|
22055
22047
|
}, [
|
|
22056
22048
|
amount,
|
|
22049
|
+
minUsd,
|
|
22057
22050
|
userId,
|
|
22058
22051
|
publishableKey,
|
|
22059
22052
|
recipientAddress,
|
|
@@ -22157,8 +22150,7 @@ function PayWithCashApp({
|
|
|
22157
22150
|
const amountNum = parseFloat(amount);
|
|
22158
22151
|
const hasInput = !isNaN(amountNum) && amountNum > 0;
|
|
22159
22152
|
const belowMin = hasInput && amountNum < minUsd;
|
|
22160
|
-
const
|
|
22161
|
-
const isValidAmount = hasInput && !belowMin && !aboveMax;
|
|
22153
|
+
const isValidAmount = hasInput && !belowMin;
|
|
22162
22154
|
if (view === "amount") {
|
|
22163
22155
|
return /* @__PURE__ */ jsxs16(
|
|
22164
22156
|
"div",
|
|
@@ -22187,7 +22179,7 @@ function PayWithCashApp({
|
|
|
22187
22179
|
}
|
|
22188
22180
|
}
|
|
22189
22181
|
) }) }),
|
|
22190
|
-
/* @__PURE__ */ jsx20("div", { className: "uf-flex uf-gap-3 uf-justify-center", children:
|
|
22182
|
+
/* @__PURE__ */ jsx20("div", { className: "uf-flex uf-gap-3 uf-justify-center", children: quickAmounts.map((quickAmount) => {
|
|
22191
22183
|
const isSelected = parseFloat(amount) === quickAmount;
|
|
22192
22184
|
return /* @__PURE__ */ jsxs16(
|
|
22193
22185
|
"button",
|
|
@@ -22213,23 +22205,17 @@ function PayWithCashApp({
|
|
|
22213
22205
|
quickAmount
|
|
22214
22206
|
);
|
|
22215
22207
|
}) }),
|
|
22216
|
-
|
|
22217
|
-
"div",
|
|
22218
|
-
{
|
|
22219
|
-
className: "uf-text-sm uf-text-center uf-mt-3 uf-px-2",
|
|
22220
|
-
style: { color: colors2.error, fontFamily: fonts.regular },
|
|
22221
|
-
children: interpolate(strings.common.minimumAmount, { amount: `$${minUsd}` })
|
|
22222
|
-
}
|
|
22223
|
-
) : amount && maxUsd !== null && amountNum > maxUsd && !error ? /* @__PURE__ */ jsx20(
|
|
22208
|
+
!limitsLoading && minUsd > 0 && /* @__PURE__ */ jsx20(
|
|
22224
22209
|
"div",
|
|
22225
22210
|
{
|
|
22226
|
-
className: "uf-text-
|
|
22227
|
-
style: { color: colors2.
|
|
22228
|
-
children: interpolate(strings.common.
|
|
22229
|
-
amount: `$${
|
|
22211
|
+
className: "uf-text-center uf-text-xs uf-mt-4",
|
|
22212
|
+
style: { color: colors2.warning, fontFamily: fonts.regular },
|
|
22213
|
+
children: interpolate(strings.common.minimumDeposit, {
|
|
22214
|
+
amount: `$${minUsd.toFixed(2)}`
|
|
22230
22215
|
})
|
|
22231
22216
|
}
|
|
22232
|
-
)
|
|
22217
|
+
),
|
|
22218
|
+
error ? /* @__PURE__ */ jsx20(
|
|
22233
22219
|
"div",
|
|
22234
22220
|
{
|
|
22235
22221
|
className: "uf-text-sm uf-text-center uf-mt-3 uf-px-2",
|
|
@@ -22238,7 +22224,7 @@ function PayWithCashApp({
|
|
|
22238
22224
|
}
|
|
22239
22225
|
) : null
|
|
22240
22226
|
] }),
|
|
22241
|
-
/* @__PURE__ */ jsx20("div", { className: "uf-px-1", children: /* @__PURE__ */ jsx20(
|
|
22227
|
+
/* @__PURE__ */ jsx20("div", { className: "uf-px-1 uf-mt-5", children: /* @__PURE__ */ jsx20(
|
|
22242
22228
|
"button",
|
|
22243
22229
|
{
|
|
22244
22230
|
onClick: handleCreateSession,
|
|
@@ -22459,7 +22445,7 @@ function useBankTransferProviders({
|
|
|
22459
22445
|
countryCode
|
|
22460
22446
|
}) {
|
|
22461
22447
|
const normalizedCountry = countryCode?.toUpperCase();
|
|
22462
|
-
const { data: providers, isLoading } =
|
|
22448
|
+
const { data: providers, isLoading } = useQuery9({
|
|
22463
22449
|
queryKey: ["unifold", "bankTransferProviders", publishableKey, normalizedCountry ?? null],
|
|
22464
22450
|
queryFn: () => getBankTransferProviders(publishableKey, { countryCode: normalizedCountry }),
|
|
22465
22451
|
enabled,
|
|
@@ -30813,7 +30799,7 @@ function useProjectConfig({
|
|
|
30813
30799
|
data: projectConfig,
|
|
30814
30800
|
isLoading,
|
|
30815
30801
|
error
|
|
30816
|
-
} =
|
|
30802
|
+
} = useQuery10({
|
|
30817
30803
|
// Country is part of the key so a region change refetches the region-aware
|
|
30818
30804
|
// config. Omitted when undefined so callers that don't pass a country keep
|
|
30819
30805
|
// sharing the base cache entry.
|
|
@@ -30835,7 +30821,7 @@ function useIntegrationTransferDefaultToken({
|
|
|
30835
30821
|
publishableKey,
|
|
30836
30822
|
enabled = true
|
|
30837
30823
|
}) {
|
|
30838
|
-
return
|
|
30824
|
+
return useQuery11({
|
|
30839
30825
|
queryKey: [
|
|
30840
30826
|
"unifold",
|
|
30841
30827
|
"integrationTransferDefaultToken",
|
|
@@ -33638,7 +33624,7 @@ function useExchanges({
|
|
|
33638
33624
|
publishableKey,
|
|
33639
33625
|
enabled = true
|
|
33640
33626
|
}) {
|
|
33641
|
-
const { data: exchanges = [], isLoading } =
|
|
33627
|
+
const { data: exchanges = [], isLoading } = useQuery12({
|
|
33642
33628
|
queryKey: ["unifold", "exchanges", publishableKey],
|
|
33643
33629
|
queryFn: () => getExchanges(void 0, publishableKey).then((res) => res.data),
|
|
33644
33630
|
enabled,
|
|
@@ -33656,7 +33642,7 @@ function usePublicIncident({
|
|
|
33656
33642
|
data: incident,
|
|
33657
33643
|
isLoading,
|
|
33658
33644
|
error
|
|
33659
|
-
} =
|
|
33645
|
+
} = useQuery13({
|
|
33660
33646
|
queryKey: ["unifold", "publicIncident", publishableKey],
|
|
33661
33647
|
queryFn: () => getPublicIncident(publishableKey),
|
|
33662
33648
|
enabled,
|
|
@@ -33671,7 +33657,7 @@ function useWalletPayProviders({
|
|
|
33671
33657
|
publishableKey,
|
|
33672
33658
|
enabled = true
|
|
33673
33659
|
}) {
|
|
33674
|
-
const { data: providers, isLoading } =
|
|
33660
|
+
const { data: providers, isLoading } = useQuery14({
|
|
33675
33661
|
queryKey: ["unifold", "walletPayProviders", method, publishableKey],
|
|
33676
33662
|
queryFn: () => getWalletPayProviders(method, publishableKey),
|
|
33677
33663
|
enabled,
|
|
@@ -33937,7 +33923,7 @@ function useAddressValidation({
|
|
|
33937
33923
|
refetchOnMount = false
|
|
33938
33924
|
}) {
|
|
33939
33925
|
const shouldValidate = enabled && !!recipientAddress && !!destinationChainType && !!destinationChainId && !!destinationTokenAddress;
|
|
33940
|
-
const { data, isLoading, error } =
|
|
33926
|
+
const { data, isLoading, error } = useQuery15({
|
|
33941
33927
|
queryKey: [
|
|
33942
33928
|
"unifold",
|
|
33943
33929
|
"addressValidation",
|
|
@@ -35340,7 +35326,7 @@ function useHypercoreActivation(params) {
|
|
|
35340
35326
|
const recipient = recipientAddress?.trim() ?? "";
|
|
35341
35327
|
const source = sourceAddress?.trim() ?? "";
|
|
35342
35328
|
const hasAddresses = !!recipient && !!source;
|
|
35343
|
-
const { data, isLoading } =
|
|
35329
|
+
const { data, isLoading } = useQuery16({
|
|
35344
35330
|
queryKey: ["unifold", "hypercoreActivation", source, recipient, publishableKey],
|
|
35345
35331
|
queryFn: () => checkHypercoreActivation(
|
|
35346
35332
|
{
|
|
@@ -37119,7 +37105,7 @@ function useDepositQuote(params) {
|
|
|
37119
37105
|
...adjustForSlippage ? { adjust_for_slippage: true } : {},
|
|
37120
37106
|
...stablecoinParity ? { stablecoin_parity: true } : {}
|
|
37121
37107
|
};
|
|
37122
|
-
return
|
|
37108
|
+
return useQuery17({
|
|
37123
37109
|
queryKey: [
|
|
37124
37110
|
"unifold",
|
|
37125
37111
|
"depositQuote",
|
|
@@ -37149,7 +37135,7 @@ function useExternalWallets({
|
|
|
37149
37135
|
publishableKey,
|
|
37150
37136
|
enabled = true
|
|
37151
37137
|
}) {
|
|
37152
|
-
const { data: wallets = [], isLoading } =
|
|
37138
|
+
const { data: wallets = [], isLoading } = useQuery18({
|
|
37153
37139
|
queryKey: ["unifold", "external-wallets", publishableKey],
|
|
37154
37140
|
queryFn: () => getExternalWallets(publishableKey).then((res) => res.data),
|
|
37155
37141
|
enabled: enabled && !!publishableKey,
|
|
@@ -41481,7 +41467,7 @@ function useForwardCheckoutEvents(onEvent, journeySessionId) {
|
|
|
41481
41467
|
var TERMINAL_STATUSES = /* @__PURE__ */ new Set(["succeeded", "expired", "refunded", "canceled"]);
|
|
41482
41468
|
function usePaymentIntent(params) {
|
|
41483
41469
|
const { clientSecret, publishableKey, enabled = true, pollingInterval = 3e3 } = params;
|
|
41484
|
-
return
|
|
41470
|
+
return useQuery19({
|
|
41485
41471
|
queryKey: ["unifold", "paymentIntent", clientSecret, publishableKey],
|
|
41486
41472
|
queryFn: () => retrievePaymentIntent(clientSecret, publishableKey),
|
|
41487
41473
|
enabled: enabled && !!clientSecret && !!publishableKey,
|
|
@@ -42311,7 +42297,7 @@ function CheckoutModal({
|
|
|
42311
42297
|
) }) });
|
|
42312
42298
|
}
|
|
42313
42299
|
function useSupportedDestinationTokens(publishableKey, enabled = true) {
|
|
42314
|
-
return
|
|
42300
|
+
return useQuery20({
|
|
42315
42301
|
queryKey: ["unifold", "supportedDestinationTokens", publishableKey],
|
|
42316
42302
|
queryFn: () => getSupportedDestinationTokens(publishableKey),
|
|
42317
42303
|
staleTime: 1e3 * 60 * 5,
|
|
@@ -42349,7 +42335,7 @@ function useSourceTokenValidation(params) {
|
|
|
42349
42335
|
enabled = true
|
|
42350
42336
|
} = params;
|
|
42351
42337
|
const hasParams = !!sourceChainType && !!sourceChainId && !!sourceTokenAddress;
|
|
42352
|
-
return
|
|
42338
|
+
return useQuery21({
|
|
42353
42339
|
queryKey: [
|
|
42354
42340
|
"unifold",
|
|
42355
42341
|
"sourceTokenValidation",
|
|
@@ -42400,7 +42386,7 @@ function useSourceTokenValidation(params) {
|
|
|
42400
42386
|
function useAddressBalance(params) {
|
|
42401
42387
|
const { address, chainType, chainId, tokenAddress, publishableKey, enabled = true } = params;
|
|
42402
42388
|
const hasParams = !!address && !!chainType && !!chainId && !!tokenAddress;
|
|
42403
|
-
return
|
|
42389
|
+
return useQuery22({
|
|
42404
42390
|
queryKey: [
|
|
42405
42391
|
"unifold",
|
|
42406
42392
|
"addressBalance",
|
|
@@ -42456,7 +42442,7 @@ function useAddressBalance(params) {
|
|
|
42456
42442
|
}
|
|
42457
42443
|
function useExecutions(userId, publishableKey, options) {
|
|
42458
42444
|
const actionType = options?.actionType ?? ActionType4.Deposit;
|
|
42459
|
-
const query =
|
|
42445
|
+
const query = useQuery23({
|
|
42460
42446
|
queryKey: ["unifold", "executions", actionType, userId, publishableKey],
|
|
42461
42447
|
queryFn: () => queryExecutions4(userId, publishableKey, actionType),
|
|
42462
42448
|
enabled: (options?.enabled ?? true) && !!userId,
|
|
@@ -42803,7 +42789,7 @@ function useVerifyRecipientAddress(params) {
|
|
|
42803
42789
|
} = params;
|
|
42804
42790
|
const trimmedAddress = recipientAddress?.trim() || "";
|
|
42805
42791
|
const hasAllParams = !!chainType && !!chainId && !!tokenAddress && trimmedAddress.length > 0;
|
|
42806
|
-
return
|
|
42792
|
+
return useQuery24({
|
|
42807
42793
|
queryKey: [
|
|
42808
42794
|
"unifold",
|
|
42809
42795
|
"verifyRecipientAddress",
|
|
@@ -42842,7 +42828,7 @@ function useGetDepositAddress(params) {
|
|
|
42842
42828
|
enabled = true
|
|
42843
42829
|
} = params;
|
|
42844
42830
|
const canFire = !!userId && !!recipientAddress && !!destinationChainType && !!destinationChainId && !!destinationTokenAddress;
|
|
42845
|
-
const query =
|
|
42831
|
+
const query = useQuery25({
|
|
42846
42832
|
queryKey: [
|
|
42847
42833
|
"unifold",
|
|
42848
42834
|
"getDepositAddress",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unifold/connect-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.79",
|
|
4
4
|
"description": "Unifold Connect React - Complete React SDK with UI components for crypto deposits",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@tanstack/react-query": "^5.90.11",
|
|
40
|
-
"@unifold/analytics": "0.1.
|
|
41
|
-
"@unifold/core": "0.1.
|
|
42
|
-
"@unifold/headless-react": "0.1.
|
|
43
|
-
"@unifold/react-provider": "0.1.
|
|
44
|
-
"@unifold/ui-react": "0.1.
|
|
40
|
+
"@unifold/analytics": "0.1.79",
|
|
41
|
+
"@unifold/core": "0.1.79",
|
|
42
|
+
"@unifold/headless-react": "0.1.79",
|
|
43
|
+
"@unifold/react-provider": "0.1.79",
|
|
44
|
+
"@unifold/ui-react": "0.1.79"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/react": "^19.0.0",
|