@funkit/connect 6.14.11 → 6.14.12
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 +18 -0
- package/dist/components/FunPayments/FunPaymentMethods.d.ts +1 -1
- package/dist/components/FunSelectBrokerage/FunBrokerageItem.css.d.ts +1 -0
- package/dist/components/FunSelectBrokerage/FunBrokerageItem.d.ts +8 -0
- package/dist/components/FunSelectBrokerage/FunSelectBrokerage.d.ts +9 -0
- package/dist/consts/bluvo.d.ts +15 -0
- package/dist/domains/paymentMethods.d.ts +9 -1
- package/dist/domains/wallet.d.ts +6 -2
- package/dist/hooks/track/useTrack.d.ts +1 -0
- package/dist/hooks/useBluvo.d.ts +24 -0
- package/dist/hooks/useCheckoutAccountBalanceTransfer.d.ts +1 -1
- package/dist/hooks/usePaymentSources.d.ts +1 -0
- package/dist/index.css +18 -10
- package/dist/index.js +2659 -2130
- package/dist/modals/CheckoutModal/Brokerage/SelectBrokerage.d.ts +10 -0
- package/dist/modals/CheckoutModal/FunCheckoutStep.d.ts +2 -1
- package/dist/modals/CheckoutModal/stepTransition.d.ts +3 -0
- package/dist/providers/FunkitBrokerageProvider.d.ts +14 -0
- package/dist/utils/bluvo.d.ts +7 -0
- package/dist/utils/checkout.d.ts +1 -1
- package/dist/utils/flags/config.d.ts +0 -8
- 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 +58 -58
- 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 +8 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @funkit/connect
|
|
2
2
|
|
|
3
|
+
## 6.14.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 3b3fba8: feat: add isMobile flag to statsig log
|
|
8
|
+
- 985dd4c: show send amount in confirmation page
|
|
9
|
+
- 0fdee65: chore: move apiKey to statsig customID for better analytics
|
|
10
|
+
- 5a379cb: add missing function in server config
|
|
11
|
+
- a13f742: feat(connect,fun-relay): handle known Relay errors
|
|
12
|
+
- 2e4c75d: change label from deposit to receive
|
|
13
|
+
- Updated dependencies [a26c8c5]
|
|
14
|
+
- Updated dependencies [a13f742]
|
|
15
|
+
- Updated dependencies [a13f742]
|
|
16
|
+
- @funkit/api-base@1.12.10
|
|
17
|
+
- @funkit/core@2.3.55
|
|
18
|
+
- @funkit/fun-relay@2.1.2
|
|
19
|
+
- @funkit/wagmi-tools@3.0.78
|
|
20
|
+
|
|
3
21
|
## 6.14.11
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -27,7 +27,7 @@ type BasePaymentMethodItemProps = {
|
|
|
27
27
|
export declare function AddPaymentMethodItem({ paymentMethod, isClickable, isActive, onClick, customValueIcon, testId, }: BasePaymentMethodItemProps & {
|
|
28
28
|
paymentMethod: PaymentMethod;
|
|
29
29
|
dynamicLimit?: string;
|
|
30
|
-
}): React.JSX.Element |
|
|
30
|
+
}): React.JSX.Element | undefined;
|
|
31
31
|
export declare function PayPalPaymentMethodItem({ isActive, isClickable, onClick, isLoading, }: BasePaymentMethodItemProps & {
|
|
32
32
|
isLoading: boolean;
|
|
33
33
|
}): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const brokerageItemStyle: string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface FunBrokerageItemProps {
|
|
3
|
+
exchangeName: string;
|
|
4
|
+
exchangeIcon: React.ReactNode;
|
|
5
|
+
fullInfo: boolean;
|
|
6
|
+
hasActiveConnection: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const FunBrokerageItem: ({ exchangeName, exchangeIcon, fullInfo, hasActiveConnection, }: FunBrokerageItemProps) => React.JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { BluvoExchangeType } from '~/consts/bluvo';
|
|
3
|
+
interface FunSelectBrokerageProps {
|
|
4
|
+
isDisabled?: boolean;
|
|
5
|
+
onSelect: (value: BluvoExchangeType) => void;
|
|
6
|
+
selectedValue: BluvoExchangeType | undefined;
|
|
7
|
+
}
|
|
8
|
+
export declare function FunSelectBrokerage({ isDisabled, onSelect, selectedValue, }: FunSelectBrokerageProps): React.JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { UseBluvoFlowHook } from '@bluvo/react';
|
|
2
|
+
export type BluvoQuote = UseBluvoFlowHook['quote'];
|
|
3
|
+
export declare enum BluvoExchangeType {
|
|
4
|
+
Coinbase = "coinbase",
|
|
5
|
+
Gemini = "gemini",
|
|
6
|
+
Kraken = "kraken"
|
|
7
|
+
}
|
|
8
|
+
type BluvoExchangeInfo = {
|
|
9
|
+
icon: (size: number) => JSX.Element | null;
|
|
10
|
+
name: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const BLUVO_EXCHANGES: Readonly<Record<BluvoExchangeType, BluvoExchangeInfo>>;
|
|
13
|
+
export declare function getExchangeIcon(brokerType: BluvoExchangeType, size: number): JSX.Element | null;
|
|
14
|
+
export declare function getExchangeName(brokerType: BluvoExchangeType): string;
|
|
15
|
+
export {};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { BridgeCustomer, BridgeVirtualBankAccount } from '@funkit/api-base';
|
|
2
|
+
import { type BluvoExchangeType } from '~/consts/bluvo';
|
|
3
|
+
import type { BrokerageAssetHoldingsItem } from './wallet';
|
|
2
4
|
/** Supported payment methods in FunkitConnect. **/
|
|
3
5
|
export declare enum PaymentMethod {
|
|
4
6
|
/** Meld - Credit / Debit Card **/
|
|
5
7
|
CARD = "card",
|
|
6
8
|
/** Account Balance **/
|
|
7
9
|
ACCOUNT_BALANCE = "balance",
|
|
8
|
-
/**
|
|
10
|
+
/** Bluvo - Exchange / Brokerage **/
|
|
9
11
|
BROKERAGE = "brokerage",
|
|
10
12
|
TOKEN_TRANSFER = "token_transfer",
|
|
11
13
|
VIRTUAL_BANK = "virtual_bank"
|
|
@@ -21,6 +23,9 @@ export interface PaymentMethodCardInfo extends PaymentMethodInfoBase {
|
|
|
21
23
|
}
|
|
22
24
|
export interface PaymentMethodBrokerageInfo extends PaymentMethodInfoBase {
|
|
23
25
|
paymentMethod: PaymentMethod.BROKERAGE;
|
|
26
|
+
deviceId: string;
|
|
27
|
+
exchange: BluvoExchangeType;
|
|
28
|
+
asset?: Partial<BrokerageAssetHoldingsItem>;
|
|
24
29
|
}
|
|
25
30
|
export interface PaymentMethodAccountInfo extends PaymentMethodInfoBase {
|
|
26
31
|
paymentMethod: PaymentMethod.ACCOUNT_BALANCE;
|
|
@@ -50,6 +55,9 @@ interface AccountPaymentMethodParams {
|
|
|
50
55
|
}
|
|
51
56
|
interface BrokeragePaymentMethodParams {
|
|
52
57
|
paymentMethod: PaymentMethod.BROKERAGE;
|
|
58
|
+
deviceId: string;
|
|
59
|
+
exchange: BluvoExchangeType;
|
|
60
|
+
asset?: Partial<BrokerageAssetHoldingsItem>;
|
|
53
61
|
}
|
|
54
62
|
interface TokenTransferPaymentMethodParams {
|
|
55
63
|
paymentMethod: PaymentMethod.TOKEN_TRANSFER;
|
package/dist/domains/wallet.d.ts
CHANGED
|
@@ -11,8 +11,12 @@ export interface AssetHoldingsItem {
|
|
|
11
11
|
export interface KnownAssetHoldingsItem extends AssetHoldingsItem {
|
|
12
12
|
usdAmount: number;
|
|
13
13
|
}
|
|
14
|
-
export interface
|
|
15
|
-
|
|
14
|
+
export interface BrokerageAssetHoldingsItem extends AssetHoldingsItem {
|
|
15
|
+
maxAmount: string;
|
|
16
|
+
minAmount: string;
|
|
17
|
+
}
|
|
18
|
+
export interface AssetHoldingsMap<T extends AssetHoldingsItem = AssetHoldingsItem> {
|
|
19
|
+
[symbol: string]: T;
|
|
16
20
|
}
|
|
17
21
|
/**
|
|
18
22
|
* @returns formatted max usable USD balance from a given assets map
|
|
@@ -22,6 +22,7 @@ export declare enum CheckoutModalEvent {
|
|
|
22
22
|
NAVIGATE_CREATE_FIAT_ACCOUNT = "fc::navigate::create_fiat_account",
|
|
23
23
|
NAVIGATE_LOADING_ACCOUNT = "fc::navigate::loading_account",
|
|
24
24
|
NAVIGATE_CHECKOUT_HELP = "fc::navigate::checkout_help",
|
|
25
|
+
NAVIGATE_SELECT_BROKERAGE = "fc::navigate::select_brokerage",
|
|
25
26
|
FINAL_QUOTE = "fc::quote::final_quote",
|
|
26
27
|
ACCOUNT_BALANCE_SUCCESS = "fc::success::account_balance",
|
|
27
28
|
TOKEN_TRANSFER_SUCCESS = "fc::success::token_transfer",
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { WithdrawalQuotation } from '@bluvo/sdk-ts';
|
|
2
|
+
import { BluvoExchangeType } from '~/consts/bluvo';
|
|
3
|
+
import type { FunBrokerageItemProps } from '../components/FunSelectBrokerage/FunBrokerageItem';
|
|
4
|
+
type SupportedExchangeOption = FunBrokerageItemProps & {
|
|
5
|
+
exchange: BluvoExchangeType;
|
|
6
|
+
};
|
|
7
|
+
export declare const useBluvoExchangeBalance: ({ exchange, }: {
|
|
8
|
+
exchange: BluvoExchangeType | undefined;
|
|
9
|
+
}) => {
|
|
10
|
+
data: import("../domains/wallet").AssetHoldingsMap<import("../domains/wallet").BrokerageAssetHoldingsItem>;
|
|
11
|
+
totalBalance: number;
|
|
12
|
+
isLoading: boolean;
|
|
13
|
+
isError: boolean;
|
|
14
|
+
};
|
|
15
|
+
export declare const useBluvoCheckoutQuote: () => {
|
|
16
|
+
getBluvoCheckoutQuote: (amount: string) => Promise<WithdrawalQuotation | undefined>;
|
|
17
|
+
};
|
|
18
|
+
export declare const useBluvoSupportedExchanges: ({ fullInfo, iconSize, }: {
|
|
19
|
+
fullInfo?: boolean;
|
|
20
|
+
iconSize?: number;
|
|
21
|
+
}) => {
|
|
22
|
+
exchangeOptions: ReadonlyArray<SupportedExchangeOption>;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -14,7 +14,6 @@ export declare function useCheckoutAccountBalanceTransfer(): {
|
|
|
14
14
|
bypassInit: boolean;
|
|
15
15
|
apiKey?: string;
|
|
16
16
|
nonce?: bigint | undefined;
|
|
17
|
-
logger?: import("@funkit/api-base").Logger | undefined;
|
|
18
17
|
fee?: {
|
|
19
18
|
token?: string;
|
|
20
19
|
amount?: number;
|
|
@@ -22,6 +21,7 @@ export declare function useCheckoutAccountBalanceTransfer(): {
|
|
|
22
21
|
recipient: import("viem").Address;
|
|
23
22
|
} | undefined;
|
|
24
23
|
skipDBAction?: boolean | undefined;
|
|
24
|
+
logger?: import("@funkit/api-base").Logger | undefined;
|
|
25
25
|
};
|
|
26
26
|
} | {
|
|
27
27
|
rFunWallet: null;
|
|
@@ -6,6 +6,7 @@ export declare function usePaymentMethodEnablement({ checkoutConfig, }: {
|
|
|
6
6
|
isFiatEnabled: boolean;
|
|
7
7
|
isTokenTransferEnabled: boolean;
|
|
8
8
|
isCardEnabled: boolean;
|
|
9
|
+
isBrokerageEnabled: boolean;
|
|
9
10
|
};
|
|
10
11
|
export declare const usePaymentSources: (paymentMethodInfo: ConnectablePaymentMethodInfo | null, targetChainId: string, checkoutConfig?: FunkitCheckoutConfig) => {
|
|
11
12
|
preferred: PaymentMethod[] | (import("~/domains/paymentMethods").PaymentMethodBrokerageInfo | import("~/domains/paymentMethods").PaymentMethodAccountInfo | import("~/domains/paymentMethods").PaymentMethodVirtualBankInfo)[];
|
package/dist/index.css
CHANGED
|
@@ -9908,6 +9908,24 @@
|
|
|
9908
9908
|
animation-name: stgjxld;
|
|
9909
9909
|
}
|
|
9910
9910
|
|
|
9911
|
+
/* vanilla-extract-css-ns:src/css/scrollStyles.css.ts.vanilla.css?source=Ll8xNjNlaG1rMDo6LXdlYmtpdC1zY3JvbGxiYXIgewogIGRpc3BsYXk6IG5vbmU7Cn0KLl8xNjNlaG1rMSB7CiAgbWF4LWhlaWdodDogMzYwcHg7CiAgb3ZlcmZsb3cteTogYXV0bzsKICBvdmVyZmxvdy14OiBoaWRkZW47Cn0= */
|
|
9912
|
+
[data-rk] ._163ehmk0::-webkit-scrollbar {
|
|
9913
|
+
display: none;
|
|
9914
|
+
}
|
|
9915
|
+
[data-rk] ._163ehmk1 {
|
|
9916
|
+
max-height: 360px;
|
|
9917
|
+
overflow-y: auto;
|
|
9918
|
+
overflow-x: hidden;
|
|
9919
|
+
}
|
|
9920
|
+
|
|
9921
|
+
/* vanilla-extract-css-ns:src/components/FunSelectBrokerage/FunBrokerageItem.css.ts.vanilla.css?source=LmFuMzR5OTAgewogIGRpc3BsYXk6IGZsZXg7CiAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuOwogIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAgZmxleDogMTsKfQ== */
|
|
9922
|
+
[data-rk] .an34y90 {
|
|
9923
|
+
display: flex;
|
|
9924
|
+
justify-content: space-between;
|
|
9925
|
+
align-items: center;
|
|
9926
|
+
flex: 1;
|
|
9927
|
+
}
|
|
9928
|
+
|
|
9911
9929
|
/* vanilla-extract-css-ns:src/components/FunCheckoutHistory/FunCheckoutHistoryTransaction.css.ts.vanilla.css?source=Lm14dmF0aTAgewogIGN1cnNvcjogcG9pbnRlcjsKfQoubXh2YXRpMDpmb2N1cy12aXNpYmxlIHsKICBvdXRsaW5lOiAxcHggc29saWQ7CiAgb3V0bGluZS1jb2xvcjogdmFyKC0tcmstY29sb3JzLXRlcnRpYXJ5VGV4dCk7Cn0= */
|
|
9912
9930
|
[data-rk] .mxvati0 {
|
|
9913
9931
|
cursor: pointer;
|
|
@@ -9971,16 +9989,6 @@
|
|
|
9971
9989
|
var(--rk-colors-offBackground) 91.45%);
|
|
9972
9990
|
}
|
|
9973
9991
|
|
|
9974
|
-
/* vanilla-extract-css-ns:src/css/scrollStyles.css.ts.vanilla.css?source=Ll8xNjNlaG1rMDo6LXdlYmtpdC1zY3JvbGxiYXIgewogIGRpc3BsYXk6IG5vbmU7Cn0KLl8xNjNlaG1rMSB7CiAgbWF4LWhlaWdodDogMzYwcHg7CiAgb3ZlcmZsb3cteTogYXV0bzsKICBvdmVyZmxvdy14OiBoaWRkZW47Cn0= */
|
|
9975
|
-
[data-rk] ._163ehmk0::-webkit-scrollbar {
|
|
9976
|
-
display: none;
|
|
9977
|
-
}
|
|
9978
|
-
[data-rk] ._163ehmk1 {
|
|
9979
|
-
max-height: 360px;
|
|
9980
|
-
overflow-y: auto;
|
|
9981
|
-
overflow-x: hidden;
|
|
9982
|
-
}
|
|
9983
|
-
|
|
9984
9992
|
/* vanilla-extract-css-ns:src/components/FunPayments/FunPaymentMoonpayType.css.ts.vanilla.css?source=Ll8xa21wZXlmMCB7CiAgaGVpZ2h0OiB1bnNldCAhaW1wb3J0YW50OwogIHdpZHRoOiB1bnNldCAhaW1wb3J0YW50OwogIGZsZXg6IDEgIWltcG9ydGFudDsKfQouXzFrbXBleWYwIGlmcmFtZSB7CiAgYm9yZGVyOiBub25lOwp9Ci5fMWttcGV5ZjEgewogIGRpc3BsYXk6IGZsZXg7CiAgZmxleDogMTsKfQ== */
|
|
9985
9993
|
[data-rk] ._1kmpeyf0 {
|
|
9986
9994
|
height: unset !important;
|