@funkit/connect 9.17.0 → 9.18.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 +20 -0
- package/dist/__generated__/default_configs.d.ts +42 -0
- package/dist/components/AnimatedDollarValue/AnimatedDollarValue.d.ts +1 -1
- package/dist/components/Icons/StatusIcons.d.ts +1 -1
- package/dist/domains/checkoutErrors.d.ts +22 -0
- package/dist/domains/dynamicRouting.d.ts +24 -0
- package/dist/index.css +5 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +311 -211
- package/dist/modals/CheckoutModal/ConfirmationStep/useCheckoutConfirmation.d.ts +1 -22
- package/dist/modals/CheckoutModal/InputAmount/useAaveNativeSupply.d.ts +6 -2
- package/dist/modals/WithdrawalModal/ErrorMessage.d.ts +1 -1
- package/dist/modals/WithdrawalModal/useWithdrawal.d.ts +1 -1
- package/dist/providers/FunkitCheckoutContext/index.d.ts +2 -6
- package/dist/providers/FunkitCheckoutContext/types.d.ts +14 -2
- package/dist/wagmi/actions.d.ts +1 -1
- 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 +33 -33
- 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 +9 -9
- package/dist/wallets/walletConnectors/{chunk-RB3HR4R2.js → chunk-4NV5BYRP.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-YEZM4CK4.js → chunk-AVDUNQUW.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-MIQTHJ6X.js → chunk-GUQM4QSL.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-4T6ZSRJF.js → chunk-IULPZP2Q.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-HNRB7KJU.js → chunk-JPN6TWIT.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-ZNX4EMPB.js → chunk-KCRO2AGO.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-STVVP43G.js → chunk-KI5Y2BBF.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-X6CGV36L.js → chunk-NR2OGDHQ.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-UK7C2JXW.js → chunk-OEEGYENV.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-F5XEEVG6.js → chunk-OX37G4YT.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-RVOY537T.js → chunk-SWFF3TWJ.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-CPI4TD43.js → chunk-TKB2OY6G.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-2VP2F6EK.js → chunk-W2LCLDPX.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-6BW3HLBG.js → chunk-WAHGI5L7.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-HTHAK6XB.js → chunk-WKNQMP4A.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-VTM6EECM.js → chunk-XCNHV3HS.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-CCQV2ZET.js → chunk-YO2K4MBH.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-VAPGUPHO.js → chunk-YQFGVZGR.js} +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @funkit/connect
|
|
2
2
|
|
|
3
|
+
## 9.18.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 8baaa78: Pass the active `dynamicRoutingId` to dynamic `modalTitle` resolvers. The `modalTitle` callback now receives a `ModalTitleContext` (`TokenInfo` + optional `dynamicRoutingId`) instead of just `TokenInfo`, so integrators can key the checkout title by route/action — not only the target token address. This is required when two routes share a target token (e.g. Lighter USDC perps vs spot, which both deposit mainnet USDC for new users). The change is backwards compatible: existing `(asset: TokenInfo) => string` resolvers remain assignable. The `ModalTitleContext` type is now exported from the package root so integrators can annotate their resolver.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- deefef3: Aave native supply USDT zero-reset now reads allowance via the public client (not the wallet client) and waits for the `approve(0)` receipt before the SDK's `approve(amount)`, avoiding nonce collisions on `latest`-based RPCs.
|
|
12
|
+
- c5c0183: Translate Aave native-supply wallet errors into human-readable messages
|
|
13
|
+
- 98b196e: fix(connect): make the post-checkout "Add to wallet" chip readable in dark mode by deriving its background from the `modalBackground` theme token via `color-mix()` (with an opaque fallback) instead of a hardcoded translucent white.
|
|
14
|
+
- 0f4c245: fix: adjust lightning qrcode scannability
|
|
15
|
+
- 30a626e: Freeze the amount input while an Aave native-supply transaction is confirming
|
|
16
|
+
- e42f6b0: feat: add min limit for btc lightning path on input screen
|
|
17
|
+
- b10dd58: test(connect): test useMinDeposit
|
|
18
|
+
- dd1c42b: chore: sort named import members via oxlint sort-imports
|
|
19
|
+
- 453c797: test(connect): test WithdrawAmountInput
|
|
20
|
+
- Updated dependencies [8baaa78]
|
|
21
|
+
- @funkit/fun-relay@2.8.0
|
|
22
|
+
|
|
3
23
|
## 9.17.0
|
|
4
24
|
|
|
5
25
|
### Minor Changes
|
|
@@ -120,6 +120,31 @@ declare const _default: {
|
|
|
120
120
|
readonly path: "RL_TRANSFER";
|
|
121
121
|
};
|
|
122
122
|
}];
|
|
123
|
+
}, {
|
|
124
|
+
readonly routeId: "LIGHTER_USDC_SPOT";
|
|
125
|
+
readonly rules: readonly [{
|
|
126
|
+
readonly when: {
|
|
127
|
+
readonly chainId: "1";
|
|
128
|
+
readonly tokenAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48";
|
|
129
|
+
};
|
|
130
|
+
readonly use: {
|
|
131
|
+
readonly path: "FUN_MAINNET_DEPOSIT";
|
|
132
|
+
readonly badge: "NATIVE";
|
|
133
|
+
};
|
|
134
|
+
}, {
|
|
135
|
+
readonly when: {
|
|
136
|
+
readonly chainId: "1";
|
|
137
|
+
readonly tokenAddress: "*";
|
|
138
|
+
};
|
|
139
|
+
readonly use: {
|
|
140
|
+
readonly path: "FUN_MAINNET_DEPOSIT";
|
|
141
|
+
};
|
|
142
|
+
}, {
|
|
143
|
+
readonly when: "*";
|
|
144
|
+
readonly use: {
|
|
145
|
+
readonly path: "RL_TRANSFER";
|
|
146
|
+
};
|
|
147
|
+
}];
|
|
123
148
|
}, {
|
|
124
149
|
readonly routeId: "LIGHTER_USDC_PERPS_NEW_USER";
|
|
125
150
|
readonly rules: readonly [{
|
|
@@ -137,6 +162,23 @@ declare const _default: {
|
|
|
137
162
|
readonly path: "FUN_MAINNET_DEPOSIT";
|
|
138
163
|
};
|
|
139
164
|
}];
|
|
165
|
+
}, {
|
|
166
|
+
readonly routeId: "LIGHTER_USDC_SPOT_NEW_USER";
|
|
167
|
+
readonly rules: readonly [{
|
|
168
|
+
readonly when: {
|
|
169
|
+
readonly chainId: "1";
|
|
170
|
+
readonly tokenAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48";
|
|
171
|
+
};
|
|
172
|
+
readonly use: {
|
|
173
|
+
readonly path: "FUN_MAINNET_DEPOSIT";
|
|
174
|
+
readonly badge: "NATIVE";
|
|
175
|
+
};
|
|
176
|
+
}, {
|
|
177
|
+
readonly when: "*";
|
|
178
|
+
readonly use: {
|
|
179
|
+
readonly path: "FUN_MAINNET_DEPOSIT";
|
|
180
|
+
};
|
|
181
|
+
}];
|
|
140
182
|
}, {
|
|
141
183
|
readonly routeId: "LIGHTER_ETH_SPOT_NEW_USER";
|
|
142
184
|
readonly rules: readonly [{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type NumberFlowElement, type NumberFlowProps } from '@number-flow/react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
type AnimatedDollarValueProps = Omit<NumberFlowProps, 'format'> & {
|
|
4
4
|
ref?: React.Ref<NumberFlowElement>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { type
|
|
1
|
+
import React, { type RefObject, type SVGAttributes } from 'react';
|
|
2
2
|
export declare function CompletedStatusIcon(props: StatusIconProps): React.JSX.Element;
|
|
3
3
|
export declare function FailedStatusIcon(props: StatusIconProps): React.JSX.Element;
|
|
4
4
|
export declare function DelayedStatusIcon(props: StatusIconProps): React.JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { TFunction } from 'i18next';
|
|
2
|
+
import type { ErrorNotification } from '../components/FunNotification/FunNotification';
|
|
3
|
+
import type { Config, Connector } from '../wagmi/hooks';
|
|
4
|
+
export interface CheckoutConfirmationError extends ErrorNotification {
|
|
5
|
+
durationMs?: number;
|
|
6
|
+
code: ConfirmationErrorCode;
|
|
7
|
+
}
|
|
8
|
+
export declare enum ConfirmationErrorCode {
|
|
9
|
+
QUOTE_EXPIRED = "QUOTE_EXPIRED",
|
|
10
|
+
GENERIC_ERROR = "GENERIC_ERROR",
|
|
11
|
+
WITHDRAWAL_RATE_LIMIT_EXCEEDED = "WITHDRAWAL_RATE_LIMIT_EXCEEDED",
|
|
12
|
+
RISK_ERROR = "RISK_ERROR",
|
|
13
|
+
SIGNATURE_DENIED = "SIGNATURE_DENIED",
|
|
14
|
+
SWITCH_CHAIN_ERROR = "SWITCH_CHAIN_ERROR",
|
|
15
|
+
WALLET_CLIENT_UNDEFINED = "WALLET_CLIENT_UNDEFINED",
|
|
16
|
+
INSUFFICIENT_GAS = "INSUFFICIENT_GAS",
|
|
17
|
+
POLYGON_RPC_ERROR = "POLYGON_RPC_ERROR"
|
|
18
|
+
}
|
|
19
|
+
export declare function toCheckoutConfirmationError(t: TFunction, error: unknown, wagmiConfig: Config, options?: {
|
|
20
|
+
fromChainId?: string;
|
|
21
|
+
connector?: Connector;
|
|
22
|
+
}): Promise<CheckoutConfirmationError>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { DynamicRoutePath } from '@funkit/fun-relay';
|
|
2
|
+
import type { FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext';
|
|
3
|
+
/**
|
|
4
|
+
* The path shape accepted by {@link mergeDynamicRoutingIntoConfig} /
|
|
5
|
+
* `applyDynamicRouting`. It is a {@link DynamicRoutePath} with the
|
|
6
|
+
* already-bound callbacks (`customRecipient`, `generateActionsParams`) and
|
|
7
|
+
* optional routing context layered on top.
|
|
8
|
+
*/
|
|
9
|
+
export type ApplyDynamicRoutingPath = Omit<DynamicRoutePath, 'getCustomRecipient' | 'generateActionsParams'> & {
|
|
10
|
+
customRecipient?: FunkitCheckoutConfig['customRecipient'];
|
|
11
|
+
generateActionsParams?: FunkitCheckoutConfig['generateActionsParams'];
|
|
12
|
+
bridgeOverride?: FunkitCheckoutConfig['bridgeOverride'];
|
|
13
|
+
dynamicRoutingId?: FunkitCheckoutConfig['dynamicRoutingId'];
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Merge a resolved dynamic-routing path into a checkout config.
|
|
17
|
+
*
|
|
18
|
+
* The `dynamicRoutingId` is kept in lockstep with the target it selects: when
|
|
19
|
+
* the path carries one it wins, otherwise the config's existing id is
|
|
20
|
+
* preserved. This is what guarantees that anything keyed off
|
|
21
|
+
* `dynamicRoutingId` (e.g. the modal title) can't drift away from the active
|
|
22
|
+
* route when the target asset/chain is rebound.
|
|
23
|
+
*/
|
|
24
|
+
export declare function mergeDynamicRoutingIntoConfig(config: FunkitCheckoutConfig, path: ApplyDynamicRoutingPath): FunkitCheckoutConfig;
|
package/dist/index.css
CHANGED
|
@@ -15346,12 +15346,14 @@
|
|
|
15346
15346
|
border-top-width: 0;
|
|
15347
15347
|
}
|
|
15348
15348
|
|
|
15349
|
-
/* vanilla-extract-css-ns:src/components/FunCheckoutHistory/AddTokenToWalletButton.css.ts.vanilla.css?source=
|
|
15349
|
+
/* vanilla-extract-css-ns:src/components/FunCheckoutHistory/AddTokenToWalletButton.css.ts.vanilla.css?source=Ll8xc3R1dWtyMCB7CiAgYmFja2dyb3VuZDogdmFyKC0tcmstY29sb3JzLW1vZGFsQmFja2dyb3VuZCk7CiAgYmFja2dyb3VuZDogY29sb3ItbWl4KGluIHNyZ2IsIHZhcigtLXJrLWNvbG9ycy1tb2RhbEJhY2tncm91bmQpIDcwJSwgdHJhbnNwYXJlbnQpOwp9Ci5fMXN0dXVrcjA6aG92ZXIgewogIGJhY2tncm91bmQ6IHZhcigtLXJrLWNvbG9ycy1tb2RhbEJhY2tncm91bmQpOwogIGJhY2tncm91bmQ6IGNvbG9yLW1peChpbiBzcmdiLCB2YXIoLS1yay1jb2xvcnMtbW9kYWxCYWNrZ3JvdW5kKSA5MCUsIHRyYW5zcGFyZW50KTsKfQ== */
|
|
15350
15350
|
[data-rk] ._1stuukr0 {
|
|
15351
|
-
background:
|
|
15351
|
+
background: var(--rk-colors-modalBackground);
|
|
15352
|
+
background: color-mix(in srgb, var(--rk-colors-modalBackground) 70%, transparent);
|
|
15352
15353
|
}
|
|
15353
15354
|
[data-rk] ._1stuukr0:hover {
|
|
15354
|
-
background:
|
|
15355
|
+
background: var(--rk-colors-modalBackground);
|
|
15356
|
+
background: color-mix(in srgb, var(--rk-colors-modalBackground) 90%, transparent);
|
|
15355
15357
|
}
|
|
15356
15358
|
|
|
15357
15359
|
/* vanilla-extract-css-ns:src/components/FunCheckoutHistory/FunCheckoutHistoryTransaction.css.ts.vanilla.css?source=Lm14dmF0aTAgewogIGN1cnNvcjogcG9pbnRlcjsKfQoubXh2YXRpMDpmb2N1cy12aXNpYmxlIHsKICBvdXRsaW5lOiAxcHggc29saWQ7CiAgb3V0bGluZS1jb2xvcjogdmFyKC0tcmstY29sb3JzLXRlcnRpYXJ5VGV4dCk7Cn0= */
|
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, UseFunkitCheckoutPropsWithFullConfig, UseFunkitCheckoutProps, FunkitCheckoutValidationResult, FunkitCheckoutResult, DynamicTargetAssetCandidate, AddToWalletToken, TokenInfo, } from './providers/FunkitCheckoutContext';
|
|
23
|
+
export type { FunkitCheckoutActionParams, FunkitCheckoutConfig, FunkitCheckoutOnCloseResult, FunkitWithdrawalConfig, WalletWithdrawalConfig, CustomWithdrawalConfig, MultiMethodWithdrawalConfig, WithdrawalMethodOption, WithdrawalParam, UseFunkitCheckoutPropsWithFullConfig, UseFunkitCheckoutProps, FunkitCheckoutValidationResult, FunkitCheckoutResult, DynamicTargetAssetCandidate, AddToWalletToken, TokenInfo, ModalTitleContext, } 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';
|