@funkit/connect 5.5.13 → 5.5.15
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 +36 -0
- package/dist/components/CopyAddress/CopyInputDisplayedAddress.css.d.ts +11 -0
- package/dist/components/CopyAddress/CopyInputDisplayedAddress.d.ts +0 -1
- package/dist/components/FunCheckoutHistory/FunCheckoutHistoryContent.d.ts +3 -1
- package/dist/components/FunPayments/FunPaymentMethods.d.ts +8 -8
- package/dist/components/Icons/CheckIcon.d.ts +2 -1
- package/dist/components/Icons/EtherFiIcon.d.ts +4 -0
- package/dist/components/ReceiveAmount/ReceiveAmount.d.ts +10 -0
- package/dist/consts/customers.d.ts +1 -1
- package/dist/domains/asset.d.ts +3 -3
- package/dist/domains/clientMetadata.d.ts +7 -1
- package/dist/domains/paymentMethods.d.ts +1 -0
- package/dist/domains/quote.d.ts +3 -2
- package/dist/domains/relay.d.ts +5 -0
- package/dist/domains/wallet.d.ts +1 -1
- package/dist/hooks/queries/useWithdrawalQuote.d.ts +2 -3
- package/dist/{modals/CheckoutModal/InputAmount → hooks}/useAssetPrice.d.ts +10 -6
- package/dist/hooks/useCheckoutDirectExecution.d.ts +17 -15
- package/dist/hooks/useCheckoutTimeEstimate.d.ts +3 -0
- package/dist/hooks/usePaymentMethodIcon.d.ts +1 -6
- package/dist/index.css +230 -88
- package/dist/index.js +9609 -9332
- package/dist/modals/CheckoutModal/ConfirmationStep/CheckoutPrimaryInfo.d.ts +2 -3
- package/dist/modals/CheckoutModal/ConfirmationStep/useCheckoutConfirmation.d.ts +1 -0
- package/dist/modals/CheckoutModal/InputAmount/InputAmountLoaded.d.ts +1 -1
- package/dist/modals/CheckoutModal/InputAmount/state.d.ts +1 -2
- package/dist/modals/CheckoutModal/LoadingAccount.d.ts +4 -4
- package/dist/modals/CheckoutModal/SourceChange/DefiPurchaseSection.d.ts +7 -0
- package/dist/modals/CheckoutModal/stepTransition.d.ts +4 -1
- package/dist/{components/Withdraw/WithdrawContent.d.ts → modals/WithdrwalModal/WithdrawalContent.d.ts} +1 -9
- package/dist/{components/Withdraw/WithdrawSuccess.d.ts → modals/WithdrwalModal/WithdrawalSuccess.d.ts} +3 -1
- package/dist/modals/WithdrwalModal/useWithdrawal.d.ts +24 -0
- package/dist/providers/FunkitCheckoutContext.d.ts +6 -1
- package/dist/themes/darkTheme.js +1 -1
- package/dist/themes/lightTheme.js +1 -1
- package/dist/utils/assets.d.ts +0 -1
- package/dist/utils/flags/config.d.ts +19 -12
- package/dist/utils/moonpay.d.ts +2 -5
- package/dist/wallets/walletConnectors/index.js +44 -44
- package/package.json +6 -6
- package/dist/hooks/useWithdrawal.d.ts +0 -15
- package/dist/{chunk-ICCAQZHZ.js → chunk-DMCSGHKQ.js} +1 -1
- package/dist/{chunk-RN4I4Y57.js → chunk-UQVBCTN3.js} +1 -1
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { FunkitCheckoutQuoteResult } from '~/domains/quote';
|
|
3
2
|
import type { FunkitCheckoutConfig } from '~/providers/FunkitCheckoutContext';
|
|
4
3
|
interface CheckoutPrimaryInfoProps {
|
|
5
4
|
showTokenAmount?: boolean;
|
|
6
5
|
config: FunkitCheckoutConfig;
|
|
7
|
-
|
|
6
|
+
usdAmount?: number;
|
|
8
7
|
isLoading?: boolean;
|
|
9
8
|
}
|
|
10
|
-
export declare function CheckoutPrimaryInfo({ showTokenAmount,
|
|
9
|
+
export declare function CheckoutPrimaryInfo({ showTokenAmount, usdAmount, config, isLoading, }: CheckoutPrimaryInfoProps): React.JSX.Element;
|
|
11
10
|
export {};
|
|
@@ -20,5 +20,6 @@ interface UseCheckoutConfirmationResult {
|
|
|
20
20
|
handleCheckoutConfirmation(): Promise<void>;
|
|
21
21
|
isConfirming: boolean;
|
|
22
22
|
}
|
|
23
|
+
export declare function toCheckoutConfirmationError(error: unknown): CheckoutConfirmationError;
|
|
23
24
|
export declare function useCheckoutConfirmation({ onError, onSuccess, }: UseCheckoutConfirmationOptions): UseCheckoutConfirmationResult;
|
|
24
25
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { FunkitTextCustomizationsConfig } from '~/providers/FunkitConfigContext';
|
|
3
3
|
import type { AssetHoldingsItem } from '~/utils/assets';
|
|
4
4
|
import type { FunkitCheckoutConfig } from '../../../providers/FunkitCheckoutContext';
|
|
5
5
|
import { FunCheckoutStep, type ModalStepComponentProps } from '../stepTransition';
|
|
@@ -2,7 +2,6 @@ import { PaymentMethod } from '~/domains/paymentMethods';
|
|
|
2
2
|
import type { AssetHoldingsItem } from '~/utils/assets';
|
|
3
3
|
import type { FunkitCheckoutConfig } from '../../../providers/FunkitCheckoutContext';
|
|
4
4
|
export interface AmountInputInitOptions {
|
|
5
|
-
apiKey: string;
|
|
6
5
|
checkoutConfig: FunkitCheckoutConfig;
|
|
7
6
|
paymentMethod: PaymentMethod;
|
|
8
7
|
sourceHolding: AssetHoldingsItem | null;
|
|
@@ -79,6 +78,6 @@ export type AmountInputError = {
|
|
|
79
78
|
/** Input is empty */
|
|
80
79
|
type: 'noInput';
|
|
81
80
|
};
|
|
82
|
-
export declare function initializeState({
|
|
81
|
+
export declare function initializeState({ checkoutConfig, maxUsd, minUsd, paymentMethod, sourceHolding, unitPrice, defaultAmount, fiatCurrency, quickOptions, }: AmountInputInitOptions): AmountInputState;
|
|
83
82
|
export declare function reduceState(state: AmountInputState, action: AmountInputAction): AmountInputState;
|
|
84
83
|
export declare function getDerivedState(state: AmountInputState): AmountInputDerivedState;
|
|
@@ -6,17 +6,17 @@ type WithNewUser<T> = T & {
|
|
|
6
6
|
newUser?: boolean;
|
|
7
7
|
};
|
|
8
8
|
export type LoadingAccountNext = WithNewUser<{
|
|
9
|
-
|
|
9
|
+
chosenPaymentMethod: PaymentMethod.ACCOUNT_BALANCE;
|
|
10
10
|
paymentMethodInfo: PaymentMethodAccountInfo;
|
|
11
11
|
} | {
|
|
12
|
-
|
|
12
|
+
chosenPaymentMethod: PaymentMethod.BROKERAGE;
|
|
13
13
|
paymentMethodInfo: PaymentMethodBrokerageInfo;
|
|
14
14
|
} | {
|
|
15
|
-
|
|
15
|
+
chosenPaymentMethod: PaymentMethod.VIRTUAL_BANK;
|
|
16
16
|
paymentMethodInfo: PaymentMethodVirtualBankInfo;
|
|
17
17
|
} | {
|
|
18
18
|
/** Can be set to null to skip auto payment method selection */
|
|
19
|
-
|
|
19
|
+
chosenPaymentMethod: null | PaymentMethod.TOKEN_TRANSFER;
|
|
20
20
|
paymentMethodInfo?: ConnectablePaymentMethodInfo;
|
|
21
21
|
}>;
|
|
22
22
|
export declare const LoadingAccountInfo: ModalStepInfo<FunCheckoutStep.LOADING_ACCOUNT>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FunkitCheckoutConfig } from '~/providers/FunkitCheckoutContext';
|
|
3
|
+
interface DefiPurchaseSectionProps {
|
|
4
|
+
config: FunkitCheckoutConfig;
|
|
5
|
+
}
|
|
6
|
+
export declare const DefiPurchaseSection: ({ config }: DefiPurchaseSectionProps) => React.JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -28,6 +28,8 @@ export interface CheckoutModalCommonState {
|
|
|
28
28
|
isSoftHidden: boolean;
|
|
29
29
|
/** Whether checkout should not be allowed to continue due to security reasons*/
|
|
30
30
|
isBlocked?: boolean;
|
|
31
|
+
/** Whether checkout is started in a defi mode which has various flow implications (most importantly targetAssetAmount must be set and is not editable throughout the checkout)*/
|
|
32
|
+
isDefiMode: boolean;
|
|
31
33
|
targetChainId: string;
|
|
32
34
|
}
|
|
33
35
|
export interface ModalStepComponentProps<S extends FunCheckoutStep = FunCheckoutStep> {
|
|
@@ -65,6 +67,7 @@ export declare enum FunCheckoutStep {
|
|
|
65
67
|
interface ModalStepInput<S extends FunCheckoutStep> {
|
|
66
68
|
state: CheckoutModalState<S>;
|
|
67
69
|
apiKey: string;
|
|
70
|
+
isDefiMode?: boolean;
|
|
68
71
|
}
|
|
69
72
|
export type ModalStepInfo<S extends FunCheckoutStep> = {
|
|
70
73
|
Component: ComponentType<ModalStepComponentProps<S>>;
|
|
@@ -75,7 +78,7 @@ export type ModalStepInfo<S extends FunCheckoutStep> = {
|
|
|
75
78
|
onNext(state: CheckoutModalState<S>, payload: NextPayload<S>): CheckoutModalState;
|
|
76
79
|
showFullHeight?: boolean;
|
|
77
80
|
/** Defaults to checkoutItem.initSettings.config.modalTitle (returning undefined uses default) */
|
|
78
|
-
title?(textCustomizations: FunkitTextCustomizationsConfig): string | undefined;
|
|
81
|
+
title?(textCustomizations: FunkitTextCustomizationsConfig, isDefiMode: boolean): string | undefined;
|
|
79
82
|
/** If title is not defined in config nor with the title() function, this is used instead. Defaults to 'Checkout' */
|
|
80
83
|
fallbackTitle?: string;
|
|
81
84
|
};
|
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
import { type CheckoutQuoteResponse } from '@funkit/utils';
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { type Hex } from 'viem';
|
|
4
|
-
import type { Address } from 'viem';
|
|
5
3
|
import type { FunkitActiveWithdrawalItem, FunkitWithdrawalConfig } from '~/providers/FunkitCheckoutContext';
|
|
6
|
-
|
|
7
|
-
destinationAddress: Address;
|
|
8
|
-
amount: string;
|
|
9
|
-
token: string;
|
|
10
|
-
chainId: number;
|
|
11
|
-
quote: CheckoutQuoteResponse;
|
|
12
|
-
};
|
|
4
|
+
import { type WithdrawalFormData } from './useWithdrawal';
|
|
13
5
|
interface WithdrawContentProps {
|
|
14
6
|
onContinue: (withdrawal: WithdrawalFormData, txHash: Hex) => void;
|
|
15
7
|
config: FunkitWithdrawalConfig;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { Address } from 'viem';
|
|
2
3
|
interface WithdrawSuccessProps {
|
|
4
|
+
depositAddress: Address;
|
|
3
5
|
amount: number;
|
|
4
6
|
token: string;
|
|
5
7
|
tokenIconSrc: string;
|
|
@@ -9,5 +11,5 @@ interface WithdrawSuccessProps {
|
|
|
9
11
|
onNewWithdrawal: () => void;
|
|
10
12
|
onClose: () => void;
|
|
11
13
|
}
|
|
12
|
-
export declare const WithdrawSuccess: ({
|
|
14
|
+
export declare const WithdrawSuccess: ({ depositAddress, bottomBarId, onNewWithdrawal, onClose, }: WithdrawSuccessProps) => React.JSX.Element;
|
|
13
15
|
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Address, Hex } from 'viem';
|
|
2
|
+
import type { FunkitCheckoutQuoteResult } from '~/domains/quote';
|
|
3
|
+
import { type FunkitActiveWithdrawalItem } from '~/providers/FunkitCheckoutContext';
|
|
4
|
+
import type { WithdrawalClient } from '~/wallets/Wallet';
|
|
5
|
+
import { type CheckoutConfirmationError } from '../CheckoutModal/ConfirmationStep/useCheckoutConfirmation';
|
|
6
|
+
interface UseWithdrawalResult {
|
|
7
|
+
handleWithdrawal: (withdrawal: WithdrawalFormData) => Promise<void>;
|
|
8
|
+
isWithdrawing: boolean;
|
|
9
|
+
withdrawalError: CheckoutConfirmationError | null;
|
|
10
|
+
stepMessage: string | null;
|
|
11
|
+
}
|
|
12
|
+
export type WithdrawalFormData = {
|
|
13
|
+
destinationAddress: Address;
|
|
14
|
+
amount: string;
|
|
15
|
+
token: string;
|
|
16
|
+
chainId: number;
|
|
17
|
+
quote: FunkitCheckoutQuoteResult;
|
|
18
|
+
};
|
|
19
|
+
export declare function useWithdrawal({ withdrawalWallet, withdrawalItem, onSuccess, }: {
|
|
20
|
+
withdrawalWallet: WithdrawalClient;
|
|
21
|
+
withdrawalItem: FunkitActiveWithdrawalItem | null;
|
|
22
|
+
onSuccess: (withdrawal: WithdrawalFormData, txHash: Hex) => void;
|
|
23
|
+
}): UseWithdrawalResult;
|
|
24
|
+
export {};
|
|
@@ -39,6 +39,8 @@ export interface FunkitCheckoutConfig extends Omit<ApiFunkitCheckoutConfig, 'gen
|
|
|
39
39
|
checkoutItemAmount?: number;
|
|
40
40
|
/** amount of source token. it is not baseUnit **/
|
|
41
41
|
withdrawalSourceTokenBalance?: () => number;
|
|
42
|
+
/** Whether checkout should be started in Defi mode, which has various flow implications (most importantly targetAssetAmount must be set and is not editable throughout the checkout) */
|
|
43
|
+
isDefiMode?: boolean;
|
|
42
44
|
/** *****************************
|
|
43
45
|
* Miscellaneous configurations *
|
|
44
46
|
********************************/
|
|
@@ -132,6 +134,7 @@ export interface FunkitActiveCheckoutItem extends Omit<ApiCheckoutClientMetadata
|
|
|
132
134
|
};
|
|
133
135
|
/** Time of completion of the active checkout item. For frontend use only. **/
|
|
134
136
|
completedTimestampMs: number | null;
|
|
137
|
+
sourceAssetAmount: number | null;
|
|
135
138
|
}
|
|
136
139
|
export interface FunkitActiveWithdrawalItem {
|
|
137
140
|
/** Unique identifier for frontend use only. */
|
|
@@ -154,13 +157,15 @@ interface FunkitCheckoutContextInterface {
|
|
|
154
157
|
iconSrc: string | undefined;
|
|
155
158
|
}): void;
|
|
156
159
|
updateSelectedPaymentMethodInfo(newPaymentMethodInfo: PaymentMethodInfo): void;
|
|
157
|
-
|
|
160
|
+
updateCustomRecipient: (recipient: Address) => void;
|
|
161
|
+
confirmCheckout(shouldBatchOpBypassInit: boolean, quote: FunkitCheckoutQuoteResult, stepMessageSetter: (m: string) => void, withdrawalClient?: WithdrawalClient): Promise<Address>;
|
|
158
162
|
cancelCheckout(depositAddress: Address): Promise<boolean>;
|
|
159
163
|
/** @deprecated to be removed after quote migration is finished (historically named setCheckoutQuote) */
|
|
160
164
|
setCheckout: (checkout: FunkitActiveCheckoutItem) => void;
|
|
161
165
|
setCompletedTimestamp(timestampMs: number): void;
|
|
162
166
|
withdrawalItem: FunkitActiveWithdrawalItem | null;
|
|
163
167
|
initNewWithdrawal(initSettings: Partial<UseFunkitCheckoutPropsWithFullConfig>): string;
|
|
168
|
+
updateWithdrawalSourceAssetAmount(newSourceAmount: number): void;
|
|
164
169
|
}
|
|
165
170
|
export declare function FunkitCheckoutProvider({ children }: {
|
|
166
171
|
children: ReactNode;
|
package/dist/themes/darkTheme.js
CHANGED
package/dist/utils/assets.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext';
|
|
2
2
|
export type { AssetHoldingsItem, AssetHoldingsMap, KnownAssetHoldingsItem, } from '~/domains/wallet';
|
|
3
|
-
export declare const ASSETS_LOW_VALUE_THRESHOLD = 0.1;
|
|
4
3
|
export declare const getNormalizedTokenBalance: (tokenBalance: bigint | number | string, decimals: number) => number;
|
|
5
4
|
/**
|
|
6
5
|
*
|
|
@@ -207,38 +207,45 @@ export declare const flagConfig: {
|
|
|
207
207
|
help_tutorial_url: {
|
|
208
208
|
type: "string";
|
|
209
209
|
default_value: string;
|
|
210
|
-
overrides:
|
|
211
|
-
if_any: {
|
|
212
|
-
key: "apiKey";
|
|
213
|
-
type: "isAnyOf";
|
|
214
|
-
values: string[];
|
|
215
|
-
}[];
|
|
216
|
-
value: string;
|
|
217
|
-
}[];
|
|
210
|
+
overrides: never[];
|
|
218
211
|
};
|
|
219
212
|
enable_card: {
|
|
220
213
|
type: "boolean";
|
|
221
214
|
default_value: true;
|
|
222
|
-
overrides: {
|
|
215
|
+
overrides: ({
|
|
216
|
+
if_any: {
|
|
217
|
+
key: "userId";
|
|
218
|
+
type: "isAnyOf";
|
|
219
|
+
values: string[];
|
|
220
|
+
}[];
|
|
221
|
+
value: true;
|
|
222
|
+
} | {
|
|
223
223
|
if_any: {
|
|
224
224
|
key: "apiKey";
|
|
225
225
|
type: "isAnyOf";
|
|
226
226
|
values: string[];
|
|
227
227
|
}[];
|
|
228
228
|
value: false;
|
|
229
|
-
}[];
|
|
229
|
+
})[];
|
|
230
230
|
};
|
|
231
231
|
enable_brokerage: {
|
|
232
232
|
type: "boolean";
|
|
233
233
|
default_value: true;
|
|
234
|
-
overrides: {
|
|
234
|
+
overrides: ({
|
|
235
|
+
if_any: {
|
|
236
|
+
key: "userId";
|
|
237
|
+
type: "isAnyOf";
|
|
238
|
+
values: string[];
|
|
239
|
+
}[];
|
|
240
|
+
value: true;
|
|
241
|
+
} | {
|
|
235
242
|
if_any: {
|
|
236
243
|
key: "apiKey";
|
|
237
244
|
type: "isAnyOf";
|
|
238
245
|
values: string[];
|
|
239
246
|
}[];
|
|
240
247
|
value: false;
|
|
241
|
-
}[];
|
|
248
|
+
})[];
|
|
242
249
|
};
|
|
243
250
|
enable_meld_payment: {
|
|
244
251
|
type: "boolean";
|
package/dist/utils/moonpay.d.ts
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
export declare const MINIMUM_MOONPAY_DEPOSIT_AMOUNT_USD = 35;
|
|
2
2
|
export declare const MAXIMUM_MOONPAY_DEPOSIT_AMOUNT_USD = 10000;
|
|
3
3
|
export declare const generateMoonpayCurrencyCode: (tokenSymbol: string, chainId: string) => string;
|
|
4
|
-
export declare function checkAmountForMoonpay(amountUsd: number): {
|
|
4
|
+
export declare function checkAmountForMoonpay(amountUsd: number, isDefiMode?: boolean): {
|
|
5
5
|
readonly isInvalid: true;
|
|
6
|
-
readonly message:
|
|
7
|
-
} | {
|
|
8
|
-
readonly isInvalid: true;
|
|
9
|
-
readonly message: "$10000 maximum exceeded for the selected payment method.";
|
|
6
|
+
readonly message: string;
|
|
10
7
|
} | {
|
|
11
8
|
readonly isInvalid: false;
|
|
12
9
|
readonly message?: undefined;
|
|
@@ -1,76 +1,76 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import {
|
|
6
|
-
walletConnectWallet
|
|
7
|
-
} from "./chunk-NP5QGWNL.js";
|
|
3
|
+
xdefiWallet
|
|
4
|
+
} from "./chunk-NO7XMBB5.js";
|
|
8
5
|
import {
|
|
9
6
|
zealWallet
|
|
10
7
|
} from "./chunk-JROWU5BP.js";
|
|
8
|
+
import {
|
|
9
|
+
zerionWallet
|
|
10
|
+
} from "./chunk-AXWP3GD4.js";
|
|
11
11
|
import {
|
|
12
12
|
subWallet
|
|
13
13
|
} from "./chunk-AD2KIJB6.js";
|
|
14
|
+
import {
|
|
15
|
+
talismanWallet
|
|
16
|
+
} from "./chunk-ABFSXBE6.js";
|
|
14
17
|
import {
|
|
15
18
|
tahoWallet
|
|
16
19
|
} from "./chunk-6P2EMPZI.js";
|
|
17
20
|
import {
|
|
18
|
-
|
|
19
|
-
} from "./chunk-
|
|
21
|
+
tokenaryWallet
|
|
22
|
+
} from "./chunk-SLOIIJGP.js";
|
|
20
23
|
import {
|
|
21
24
|
tokenPocketWallet
|
|
22
25
|
} from "./chunk-IDKVN5CF.js";
|
|
23
26
|
import {
|
|
24
27
|
trustWallet
|
|
25
28
|
} from "./chunk-ISIBREBO.js";
|
|
26
|
-
import {
|
|
27
|
-
tokenaryWallet
|
|
28
|
-
} from "./chunk-SLOIIJGP.js";
|
|
29
29
|
import {
|
|
30
30
|
uniswapWallet
|
|
31
31
|
} from "./chunk-LH7BMNFZ.js";
|
|
32
32
|
import {
|
|
33
|
-
|
|
34
|
-
} from "./chunk-
|
|
33
|
+
walletConnectWallet
|
|
34
|
+
} from "./chunk-NP5QGWNL.js";
|
|
35
35
|
import {
|
|
36
36
|
phantomWallet
|
|
37
37
|
} from "./chunk-ZSVTX6EK.js";
|
|
38
38
|
import {
|
|
39
39
|
rabbyWallet
|
|
40
40
|
} from "./chunk-BVX4XGNP.js";
|
|
41
|
-
import {
|
|
42
|
-
ramperWallet
|
|
43
|
-
} from "./chunk-PIUNLQJG.js";
|
|
44
41
|
import {
|
|
45
42
|
rainbowWallet
|
|
46
43
|
} from "./chunk-2UCNRD7H.js";
|
|
44
|
+
import {
|
|
45
|
+
ramperWallet
|
|
46
|
+
} from "./chunk-PIUNLQJG.js";
|
|
47
47
|
import {
|
|
48
48
|
roninWallet
|
|
49
49
|
} from "./chunk-63YLN6R5.js";
|
|
50
|
+
import {
|
|
51
|
+
safeWallet
|
|
52
|
+
} from "./chunk-BQQQL6UD.js";
|
|
50
53
|
import {
|
|
51
54
|
safeheronWallet
|
|
52
55
|
} from "./chunk-R6RWZRFF.js";
|
|
53
56
|
import {
|
|
54
57
|
safepalWallet
|
|
55
58
|
} from "./chunk-MSFKSQBY.js";
|
|
56
|
-
import {
|
|
57
|
-
safeWallet
|
|
58
|
-
} from "./chunk-BQQQL6UD.js";
|
|
59
|
-
import {
|
|
60
|
-
imTokenWallet
|
|
61
|
-
} from "./chunk-COZ7MIQS.js";
|
|
62
59
|
import {
|
|
63
60
|
metaMaskWallet
|
|
64
61
|
} from "./chunk-G73C6P5P.js";
|
|
62
|
+
import {
|
|
63
|
+
ledgerWallet
|
|
64
|
+
} from "./chunk-BRBKM4PW.js";
|
|
65
65
|
import {
|
|
66
66
|
mewWallet
|
|
67
67
|
} from "./chunk-V57WLZEE.js";
|
|
68
|
-
import {
|
|
69
|
-
okxWallet
|
|
70
|
-
} from "./chunk-4WEHDI4Y.js";
|
|
71
68
|
import {
|
|
72
69
|
oktoWallet
|
|
73
70
|
} from "./chunk-ADIXAKUL.js";
|
|
71
|
+
import {
|
|
72
|
+
okxWallet
|
|
73
|
+
} from "./chunk-4WEHDI4Y.js";
|
|
74
74
|
import {
|
|
75
75
|
omniWallet
|
|
76
76
|
} from "./chunk-7CUY5G6R.js";
|
|
@@ -80,63 +80,63 @@ import {
|
|
|
80
80
|
import {
|
|
81
81
|
oneKeyWallet
|
|
82
82
|
} from "./chunk-4AD7VI2P.js";
|
|
83
|
-
import {
|
|
84
|
-
enkryptWallet
|
|
85
|
-
} from "./chunk-SJTXS4ZW.js";
|
|
86
83
|
import {
|
|
87
84
|
foxWallet
|
|
88
85
|
} from "./chunk-LMZMXEXL.js";
|
|
86
|
+
import {
|
|
87
|
+
frameWallet
|
|
88
|
+
} from "./chunk-ZMYVTWDF.js";
|
|
89
|
+
import {
|
|
90
|
+
frontierWallet
|
|
91
|
+
} from "./chunk-3S2U24BJ.js";
|
|
89
92
|
import {
|
|
90
93
|
gateWallet
|
|
91
94
|
} from "./chunk-GSOYKKIS.js";
|
|
92
95
|
import {
|
|
93
|
-
|
|
94
|
-
} from "./chunk-
|
|
96
|
+
imTokenWallet
|
|
97
|
+
} from "./chunk-COZ7MIQS.js";
|
|
95
98
|
import {
|
|
96
99
|
injectedWallet
|
|
97
100
|
} from "./chunk-VCVVV2K7.js";
|
|
98
|
-
import {
|
|
99
|
-
ledgerWallet
|
|
100
|
-
} from "./chunk-BRBKM4PW.js";
|
|
101
101
|
import {
|
|
102
102
|
kresusWallet
|
|
103
103
|
} from "./chunk-MJXPRJZT.js";
|
|
104
104
|
import {
|
|
105
105
|
clvWallet
|
|
106
106
|
} from "./chunk-KR6JBW5E.js";
|
|
107
|
-
import {
|
|
108
|
-
coin98Wallet
|
|
109
|
-
} from "./chunk-DTRYS3MO.js";
|
|
110
107
|
import {
|
|
111
108
|
bybitWallet
|
|
112
109
|
} from "./chunk-6ONTSPEY.js";
|
|
113
110
|
import {
|
|
114
|
-
|
|
115
|
-
} from "./chunk-
|
|
111
|
+
coin98Wallet
|
|
112
|
+
} from "./chunk-DTRYS3MO.js";
|
|
116
113
|
import {
|
|
117
114
|
coinbaseWallet
|
|
118
115
|
} from "./chunk-H4IRCEZN.js";
|
|
119
116
|
import {
|
|
120
|
-
|
|
121
|
-
} from "./chunk-
|
|
117
|
+
coreWallet
|
|
118
|
+
} from "./chunk-HBA36GW3.js";
|
|
122
119
|
import {
|
|
123
120
|
desigWallet
|
|
124
121
|
} from "./chunk-CTU6JCOK.js";
|
|
125
122
|
import {
|
|
126
|
-
|
|
127
|
-
} from "./chunk-
|
|
123
|
+
dawnWallet
|
|
124
|
+
} from "./chunk-LN7OD5EC.js";
|
|
125
|
+
import {
|
|
126
|
+
enkryptWallet
|
|
127
|
+
} from "./chunk-SJTXS4ZW.js";
|
|
128
128
|
import {
|
|
129
129
|
argentWallet
|
|
130
130
|
} from "./chunk-WSQ2YJO2.js";
|
|
131
|
-
import {
|
|
132
|
-
bitgetWallet
|
|
133
|
-
} from "./chunk-A5APNTGL.js";
|
|
134
131
|
import {
|
|
135
132
|
bitskiWallet
|
|
136
133
|
} from "./chunk-P74YPRF6.js";
|
|
137
134
|
import {
|
|
138
135
|
bifrostWallet
|
|
139
136
|
} from "./chunk-W6N74MS3.js";
|
|
137
|
+
import {
|
|
138
|
+
bitgetWallet
|
|
139
|
+
} from "./chunk-A5APNTGL.js";
|
|
140
140
|
import {
|
|
141
141
|
bitverseWallet
|
|
142
142
|
} from "./chunk-3HZRRP4Y.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funkit/connect",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.15",
|
|
4
4
|
"description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -88,12 +88,12 @@
|
|
|
88
88
|
"ua-parser-js": "^1.0.37",
|
|
89
89
|
"use-debounce": "^10.0.5",
|
|
90
90
|
"uuid": "^9.0.1",
|
|
91
|
-
"@funkit/api-base": "1.9.
|
|
92
|
-
"@funkit/chains": "0.3.
|
|
91
|
+
"@funkit/api-base": "1.9.7",
|
|
92
|
+
"@funkit/chains": "0.3.3",
|
|
93
|
+
"@funkit/core": "2.3.29",
|
|
93
94
|
"@funkit/fun-relay": "0.1.9",
|
|
94
|
-
"@funkit/
|
|
95
|
-
"@funkit/
|
|
96
|
-
"@funkit/core": "2.3.27"
|
|
95
|
+
"@funkit/wagmi-tools": "3.0.51",
|
|
96
|
+
"@funkit/utils": "1.1.5"
|
|
97
97
|
},
|
|
98
98
|
"repository": {
|
|
99
99
|
"type": "git",
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Hex } from 'viem';
|
|
2
|
-
import type { WithdrawalFormData } from '~/components/Withdraw/WithdrawContent';
|
|
3
|
-
import type { FunkitActiveWithdrawalItem } from '~/providers/FunkitCheckoutContext';
|
|
4
|
-
import type { WithdrawalClient } from '~/wallets/Wallet';
|
|
5
|
-
interface UseWithdrawalResult {
|
|
6
|
-
handleWithdrawal: (withdrawal: WithdrawalFormData) => Promise<void>;
|
|
7
|
-
isWithdrawing: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare function useWithdrawal({ withdrawalWallet, withdrawalItem, onSuccess, onError, }: {
|
|
10
|
-
withdrawalWallet: WithdrawalClient;
|
|
11
|
-
withdrawalItem: FunkitActiveWithdrawalItem | null;
|
|
12
|
-
onSuccess: (withdrawal: WithdrawalFormData, txHash: Hex) => void;
|
|
13
|
-
onError: (error: Error) => void;
|
|
14
|
-
}): UseWithdrawalResult;
|
|
15
|
-
export {};
|
|
@@ -81,8 +81,8 @@ var darkTheme = ({
|
|
|
81
81
|
buttonTextTertiary: "#FFF",
|
|
82
82
|
buttonTextDisabledTertiary: "rgba(255, 255, 255, 0.65)",
|
|
83
83
|
buttonBackground: "#FFF",
|
|
84
|
-
buttonBackgroundPressed: "#FFF",
|
|
85
84
|
buttonBackgroundHover: "#f2f2f2",
|
|
85
|
+
buttonBackgroundPressed: "#FFF",
|
|
86
86
|
buttonBackgroundDisabled: "rgba(255, 255, 255, 0.65)",
|
|
87
87
|
buttonTextSecondaryDisabled: "rgba(255, 255, 255, 0.65)",
|
|
88
88
|
buttonTextSecondary: "#FFFFFF",
|
|
@@ -81,8 +81,8 @@ var lightTheme = ({
|
|
|
81
81
|
buttonTextTertiary: "#000",
|
|
82
82
|
buttonTextDisabledTertiary: "rgba(0, 0, 0, 0.5)",
|
|
83
83
|
buttonBackground: "#000",
|
|
84
|
-
buttonBackgroundPressed: "#000",
|
|
85
84
|
buttonBackgroundHover: "#333333",
|
|
85
|
+
buttonBackgroundPressed: "#000",
|
|
86
86
|
buttonBackgroundDisabled: "rgba(0, 0, 0, 0.5)",
|
|
87
87
|
buttonTextSecondaryDisabled: "rgba(0, 0, 0, 0.5)",
|
|
88
88
|
buttonTextSecondary: "#000000",
|