@funkit/connect 1.0.9 → 1.0.11
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 +16 -0
- package/dist/{chunk-SWTU7PBZ.js → chunk-2NNNYGQA.js} +1 -1
- package/dist/{chunk-MQTK22MG.js → chunk-JLKS6NET.js} +1 -1
- package/dist/{chunk-VP4CAK4A.js → chunk-UK5FXGK3.js} +2 -1
- package/dist/components/FunPayments/FunPaymentMoonpayType.d.ts +2 -1
- package/dist/components/FunPayments/FunPaymentSetup.d.ts +2 -1
- package/dist/components/FunTransactionSummary/FunTransactionSummary.d.ts +1 -2
- package/dist/components/FunkitProvider/FunkitCheckoutContext.d.ts +8 -3
- package/dist/consts/checkout.d.ts +18 -0
- package/dist/hooks/useFunListeners.d.ts +1 -0
- package/dist/index.js +129 -58
- package/dist/themes/baseTheme.d.ts +2 -1
- package/dist/themes/baseTheme.js +1 -1
- package/dist/themes/darkTheme.js +2 -2
- package/dist/themes/lightTheme.js +2 -2
- package/dist/wallets/walletConnectors/chunk-AJKRYTH2.js +92 -0
- package/dist/wallets/walletConnectors/chunk-CVGDYGHA.js +60 -0
- package/dist/wallets/walletConnectors/chunk-OKZSWAPF.js +60 -0
- package/dist/wallets/walletConnectors/chunk-OYKWP3N3.js +60 -0
- package/dist/wallets/walletConnectors/chunk-OYW4TIA3.js +81 -0
- package/dist/wallets/walletConnectors/funkitConnectWallet/funkitConnectWallet.js +2 -1
- package/dist/wallets/walletConnectors/index.js +56 -56
- package/package.json +1 -1
- package/dist/wallets/walletConnectors/{chunk-NGXIHASN.js → chunk-2LY3WMXK.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-3WZRNEZH.js → chunk-2XQJ2NQ4.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-O5NKWWEG.js → chunk-DNOEX5NF.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-V45EXW7A.js → chunk-HXYRONSJ.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-7CQPABJG.js → chunk-MCTPLICE.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-6LTLPR2Q.js → chunk-MU35GKP3.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-2UXZAUWT.js → chunk-PPFSHJTA.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-ZNXQ4V6G.js → chunk-RYO26XSK.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-AM4SSLAP.js → chunk-SPLW3CCH.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-Z2DGDHHZ.js → chunk-ZFXXHGAS.js} +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @funkit/connect
|
|
2
2
|
|
|
3
|
+
## 1.0.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e1474bc: feat: custom font family config
|
|
8
|
+
|
|
9
|
+
## 1.0.10
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 17a1f0d: feat: checkout pre and post intermediate messages
|
|
14
|
+
fix: max out inner widths and height
|
|
15
|
+
- fd16517: feat: moonpay additional conditional conversion text
|
|
16
|
+
- 20678a1: refactor: remove tilde on fees for eoa checkouts
|
|
17
|
+
- 82bbc1e: fix: history listener does not start/stop properly in some cases
|
|
18
|
+
|
|
3
19
|
## 1.0.9
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -46,13 +46,14 @@ var blurs = {
|
|
|
46
46
|
var baseTheme = ({
|
|
47
47
|
borderRadius = "large",
|
|
48
48
|
fontStack = "fun",
|
|
49
|
+
customFontFamily = "",
|
|
49
50
|
overlayBlur = "none"
|
|
50
51
|
}) => ({
|
|
51
52
|
blurs: {
|
|
52
53
|
modalOverlay: blurs[overlayBlur].modalOverlay
|
|
53
54
|
},
|
|
54
55
|
fonts: {
|
|
55
|
-
body: fontStacks[fontStack]
|
|
56
|
+
body: customFontFamily || fontStacks[fontStack]
|
|
56
57
|
},
|
|
57
58
|
radii: {
|
|
58
59
|
actionButton: radiusScales[borderRadius].actionButton,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Address } from 'viem';
|
|
3
3
|
import { PaymentFlow } from '../../consts/payment';
|
|
4
|
-
export declare function FunPaymentMoonpayType({ paymentFlow, paymentAddress, depositToken, depositTokenChainId, depositTokenAmount, onBackToHome, backAnimation, redirectToCheckoutHistory, }: {
|
|
4
|
+
export declare function FunPaymentMoonpayType({ paymentFlow, paymentAddress, depositToken, depositTokenChainId, depositTokenAmount, onBackToHome, backAnimation, redirectToCheckoutHistory, finalConvertedAssetName, }: {
|
|
5
5
|
paymentFlow: PaymentFlow;
|
|
6
6
|
paymentAddress: Address;
|
|
7
7
|
depositToken: string;
|
|
@@ -10,4 +10,5 @@ export declare function FunPaymentMoonpayType({ paymentFlow, paymentAddress, dep
|
|
|
10
10
|
onBackToHome: () => void;
|
|
11
11
|
backAnimation?: boolean;
|
|
12
12
|
redirectToCheckoutHistory?: (depositAddress: string) => void;
|
|
13
|
+
finalConvertedAssetName: string;
|
|
13
14
|
}): React.JSX.Element;
|
|
@@ -14,6 +14,7 @@ interface FunPaymentSetupProps {
|
|
|
14
14
|
backAnimation?: boolean;
|
|
15
15
|
redirectToCheckoutHistory?: (depositAddress: string) => void;
|
|
16
16
|
isParentLoading: boolean;
|
|
17
|
+
finalConvertedAssetName?: string;
|
|
17
18
|
}
|
|
18
|
-
export declare function FunPaymentSetup({ paymentFlow, paymentAddress, paymentMethod, onSetup, onSoftHide, onBackToHome, token, tokenChainId, tokenAmountUsd, backAnimation, redirectToCheckoutHistory, isParentLoading, }: FunPaymentSetupProps): React.JSX.Element;
|
|
19
|
+
export declare function FunPaymentSetup({ paymentFlow, paymentAddress, paymentMethod, onSetup, onSoftHide, onBackToHome, token, tokenChainId, tokenAmountUsd, backAnimation, redirectToCheckoutHistory, isParentLoading, finalConvertedAssetName, }: FunPaymentSetupProps): React.JSX.Element;
|
|
19
20
|
export {};
|
|
@@ -8,7 +8,7 @@ export type FeesItem = null | {
|
|
|
8
8
|
platformFeesTokenAmount?: string | number | null;
|
|
9
9
|
platformFeesTokenSymbol?: string | null;
|
|
10
10
|
};
|
|
11
|
-
export declare function FunTransactionSummary({ estFees, estTime, isLoading, hasTotal, total, hasPaymentToken, symbol, paymentTokenString, suffixComponent, errorMessage,
|
|
11
|
+
export declare function FunTransactionSummary({ estFees, estTime, isLoading, hasTotal, total, hasPaymentToken, symbol, paymentTokenString, suffixComponent, errorMessage, }: {
|
|
12
12
|
estFees: FeesItem;
|
|
13
13
|
estTime: string | number | null;
|
|
14
14
|
isLoading?: boolean;
|
|
@@ -19,5 +19,4 @@ export declare function FunTransactionSummary({ estFees, estTime, isLoading, has
|
|
|
19
19
|
total?: string | number | null;
|
|
20
20
|
suffixComponent?: ReactNode;
|
|
21
21
|
errorMessage?: string;
|
|
22
|
-
isEstimatedNetworkFees: boolean;
|
|
23
22
|
}): React.JSX.Element;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
/// <reference types="node" />
|
|
4
|
+
/// <reference types="node" />
|
|
5
|
+
/// <reference types="node" />
|
|
1
6
|
import { CheckoutCoreQuoteResponse, CheckoutHistoryItem } from '@funkit/core';
|
|
2
7
|
import React, { ReactNode } from 'react';
|
|
3
8
|
import { Abi, Address } from 'viem';
|
|
@@ -127,7 +132,7 @@ interface useFunkitPreCheckoutInternalReturn {
|
|
|
127
132
|
updateSourceAsset: (newSourceAsset: Address, newSourceAssetSymbol: string, newSourceAssetChainId: string) => void;
|
|
128
133
|
updateTargetAssetAmount: (newTargetAssetAmount: number, isCheckoutCrFlow: boolean) => void;
|
|
129
134
|
updateSelectedPaymentMethodInfo: (newPaymentMethodInfo: PaymentMethodInfo) => void;
|
|
130
|
-
confirmCheckout: (shouldBatchOpBypassInit: boolean) => Promise<Address>;
|
|
135
|
+
confirmCheckout: (shouldBatchOpBypassInit: boolean, stepMessageSetter: (m: string) => void) => Promise<Address>;
|
|
131
136
|
getCheckoutDraftDollarValue: () => Promise<void>;
|
|
132
137
|
clearCheckoutQuoteMessages: () => void;
|
|
133
138
|
getCheckoutQuote: (sponsorInitialTransferGasLimit: number, newPaymentMethodInfo: PaymentMethodInfo) => Promise<boolean>;
|
|
@@ -151,8 +156,8 @@ export declare const useFunkitAllPostCheckoutsInternal: () => {
|
|
|
151
156
|
checkoutHistoryStateMap: CheckoutHistoryStateMap;
|
|
152
157
|
isCheckoutHistoryInited: boolean;
|
|
153
158
|
isRefreshingCheckoutHistory: boolean;
|
|
154
|
-
startCheckoutHistoryListener: (recipientAddr?: Address | undefined) =>
|
|
155
|
-
stopCheckoutHistoryListener: () => void;
|
|
159
|
+
startCheckoutHistoryListener: (recipientAddr?: Address | undefined) => NodeJS.Timeout;
|
|
160
|
+
stopCheckoutHistoryListener: (cancelIntervalId?: NodeJS.Timeout) => void;
|
|
156
161
|
};
|
|
157
162
|
/**
|
|
158
163
|
* External hook for user to kickstart a checkout in their app
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare enum CheckoutInitStepMessage {
|
|
2
|
+
CONFIRMING = 0,
|
|
3
|
+
PREPARING_DATA = 1
|
|
4
|
+
}
|
|
5
|
+
export declare const CHECKOUT_STEP_MESSAGE_GENERATOR: {
|
|
6
|
+
1: () => string;
|
|
7
|
+
0: () => string;
|
|
8
|
+
};
|
|
9
|
+
export declare enum Web3AccountBalanceMessage {
|
|
10
|
+
SIGN_TX = 0,
|
|
11
|
+
SWITCH_CHAIN = 1,
|
|
12
|
+
APPROVE_TRANSFER = 2
|
|
13
|
+
}
|
|
14
|
+
export declare const WEB3_ACCOUNT_BALANCE_MESSAGE_GENERATOR: {
|
|
15
|
+
0: () => string;
|
|
16
|
+
1: (newChainName: string) => string;
|
|
17
|
+
2: (tokenSymbol: string) => string;
|
|
18
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Address } from 'viem';
|
|
2
2
|
/**
|
|
3
3
|
* Handles the starting and stopping of checkout history listeners based on the calling component's mount/unmount status
|
|
4
|
+
* Each hook will store and track its own intervalId
|
|
4
5
|
*/
|
|
5
6
|
export declare function useCheckoutHistoryListener(activate?: boolean, singleDepositAddr?: Address | undefined): void;
|
|
6
7
|
/**
|