@funkit/connect 7.1.0-next.5 → 7.1.0-next.8

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 CHANGED
@@ -1,5 +1,43 @@
1
1
  # @funkit/connect
2
2
 
3
+ ## 7.1.0-next.8
4
+
5
+ ### Patch Changes
6
+
7
+ - 40bf6f4: reorganize file location
8
+ - c289ca6: feat(fun-relay): require api key for relay to prevent rate limiting
9
+ feat(connect): pass pseudo api key to fun-relay
10
+ - 18ce29c: deprecate some unused code
11
+ - 437a9f2: refactor(connect): swap out 2FA input for fun 2FA component on brokerage flow
12
+ - 62a8860: remove unused data
13
+ - 5a8fe96: fix(connect): normalize feebreakdown response
14
+ - ae172d8: move file around
15
+ - Updated dependencies [c289ca6]
16
+ - Updated dependencies [fd5fe29]
17
+ - Updated dependencies [c463492]
18
+ - Updated dependencies [aa767b0]
19
+ - @funkit/fun-relay@2.2.0-next.3
20
+ - @funkit/utils@1.1.22-next.1
21
+ - @funkit/api-base@1.12.22-next.2
22
+
23
+ ## 7.1.0-next.7
24
+
25
+ ### Patch Changes
26
+
27
+ - 656587e: fix(connect): disable withdrawal quote for blacklisted withdrawal addresses
28
+
29
+ ## 7.1.0-next.6
30
+
31
+ ### Patch Changes
32
+
33
+ - f07bdfb: refactor(connect): cleanup remaining mesh references in bluvo screens
34
+ - 652c5c2: feat(connect): add blacklisted withdrawal address to statsig
35
+ - d336735: feat: add tron chain object
36
+ - 3df0c66: feat(connect): add insufficient gas error during execution
37
+ - 29b449c: Use ETH as source amount on input screen instead of USD for Lighter ETH Spot
38
+ - Updated dependencies [d336735]
39
+ - @funkit/chains@0.5.2-next.1
40
+
3
41
  ## 7.1.0-next.5
4
42
 
5
43
  ### Patch Changes
@@ -5,6 +5,27 @@ declare const _default: {
5
5
  readonly array_of_strings: {
6
6
  readonly value: readonly [];
7
7
  };
8
+ readonly blacklistedwithdrawaladdress: {
9
+ readonly value: {
10
+ readonly '0x2791bca1f2de4661ed88a30c99a7a9449aa84174': "USDC.e - Polygon";
11
+ readonly '0xff970a61a04b1ca14834a43f5de4533ebddb5cc8': "USDC.e - Arbitrum";
12
+ readonly '0x7f5c764cbc14f9669b88837ca1490cca17c31607': "USDC.e - Optimism";
13
+ readonly '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48': "USDC - Ethereum";
14
+ readonly '0x66a9893cC07D91D95644AEDD05D03f95e1dBA8Af': "Uniswap V4 Router - Etheruem";
15
+ readonly '0x1095692A6237d83C6a72F3F5eFEdb9A670C49223': "Uniswap V4 Router - Polygon";
16
+ readonly '0x0000000000000000000000000000000000000000': "Zero/Null Address";
17
+ readonly '0x000000000000000000000000000000000000dEaD': "Burn Address";
18
+ readonly '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D': "Uniswap V2 Router";
19
+ readonly '0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45': "Uniswap V3: Old Deployer";
20
+ readonly '0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD': "Uniswap Universal Router";
21
+ readonly '0xE592427A0AEce92De3Edee1F18E0157C05861564': "Uniswap V3 Router";
22
+ readonly '0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F': "SushiSwap Router";
23
+ readonly '0xDEF1C0ded9bec7F1a1670819833240f027b25EfF': "0x Exchange Proxy";
24
+ readonly '0x1111111254EEB25477B68fb85Ed929f73A960582': "1inch V5 Router";
25
+ readonly '0x881D40237659C251811CEC9c364ef91dC08D300C': "Metamask Swap Router";
26
+ readonly '0x07d82CD44cd598ACf355Af8c8089b30b2a13B088': "Polymarket Withdrawal Block";
27
+ };
28
+ };
8
29
  readonly blockedcountries: {
9
30
  readonly value: readonly ["AF", "BY", "MM", "CF", "CU", "CD", "IR", "LB", "LY", "NI", "KP", "UA", "SO", "SS", "SY", "VE"];
10
31
  };
@@ -133,6 +154,23 @@ declare const _default: {
133
154
  readonly enabletokentransfer: {
134
155
  readonly value: true;
135
156
  };
157
+ readonly enabletokentransfertest: {
158
+ readonly variants: readonly [{
159
+ readonly conditions: {
160
+ readonly all: readonly [{
161
+ readonly type: "allowedCountries";
162
+ readonly countries: readonly ["SG", "DE"];
163
+ }];
164
+ };
165
+ readonly value: true;
166
+ }];
167
+ readonly value: false;
168
+ };
169
+ readonly ismexico: {
170
+ readonly value: {
171
+ readonly mexico: false;
172
+ };
173
+ };
136
174
  readonly isrelaybypassenabled: {
137
175
  readonly value: true;
138
176
  };
@@ -174,16 +212,44 @@ declare const _default: {
174
212
  readonly params: {
175
213
  readonly targetChain: "3586256";
176
214
  readonly targetAsset: "0x0000000000000000000000000000000000000001";
177
- readonly targetAssetTicker: "ETH (Spot)";
215
+ readonly targetAssetTicker: "ETH";
216
+ readonly iconSrc: "https://sdk-cdn.fun.xyz/images/eth.svg";
217
+ readonly qrcodeActionType: "LIGHTER_SPOT";
218
+ readonly defaultChainId: "1";
219
+ readonly defaultTokenSymbol: "ETH";
220
+ };
221
+ }, {
222
+ readonly dynamicRoutingId: "LIGHTER_ETH_SPOT_NEW_USER";
223
+ readonly params: {
224
+ readonly targetChain: "1";
225
+ readonly targetAsset: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2";
226
+ readonly targetAssetTicker: "ETH";
178
227
  readonly iconSrc: "https://sdk-cdn.fun.xyz/images/eth.svg";
228
+ readonly qrcodeActionType: "LIGHTER_SPOT";
229
+ readonly defaultChainId: "1";
230
+ readonly defaultTokenSymbol: "ETH";
179
231
  };
180
232
  }, {
181
233
  readonly dynamicRoutingId: "LIGHTER_USDC_PERPS";
182
234
  readonly params: {
183
235
  readonly targetChain: "3586256";
184
236
  readonly targetAsset: "0x0000000000000000000000000000000000000000";
185
- readonly targetAssetTicker: "USDC (Perps)";
237
+ readonly targetAssetTicker: "USDC";
238
+ readonly iconSrc: "https://sdk-cdn.fun.xyz/images/usdc.svg";
239
+ readonly qrcodeActionType: "LIGHTER_PERPS";
240
+ readonly defaultChainId: "42161";
241
+ readonly defaultTokenSymbol: "USDC";
242
+ };
243
+ }, {
244
+ readonly dynamicRoutingId: "LIGHTER_USDC_PERPS_NEW_USER";
245
+ readonly params: {
246
+ readonly targetChain: "1";
247
+ readonly targetAsset: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48";
248
+ readonly targetAssetTicker: "USDC";
186
249
  readonly iconSrc: "https://sdk-cdn.fun.xyz/images/usdc.svg";
250
+ readonly qrcodeActionType: "LIGHTER_PERPS";
251
+ readonly defaultChainId: "42161";
252
+ readonly defaultTokenSymbol: "USDC";
187
253
  };
188
254
  }];
189
255
  };
@@ -5,15 +5,16 @@ export declare function PaymentMethodIcon({ paymentIcon, keyIconSize, }: {
5
5
  paymentIcon: ReactNode;
6
6
  keyIconSize: number;
7
7
  }): React.JSX.Element;
8
- interface ConnectedMeshPaymentMethodItemProps extends ConnectedPaymentMethodItemProps {
8
+ interface ConnectedBluvoPaymentMethodItemProps extends ConnectedPaymentMethodItemProps {
9
9
  paymentMethodInfo: PaymentMethodBrokerageInfo;
10
10
  onBrokerageError?: () => void;
11
11
  }
12
- /** it is different from BrokeragePaymentMethodItem
13
- * this component is for connected mesh brokerage like robinhood
14
- * the other one is for connecting new brokerage button
15
- * */
16
- export declare const ConnectedMeshPaymentMethodItem: ({ paymentMethodInfo, isSelected, onSelect, onBrokerageError, showSelectedCheckmark, }: ConnectedMeshPaymentMethodItemProps) => React.JSX.Element;
12
+ /**
13
+ * Note: This is different from `BrokeragePaymentMethodItem`, which is used as a
14
+ * button to initiate connecting a new brokerage account.
15
+ * This is for connected Bluvo brokerage like coinbase etc.
16
+ */
17
+ export declare const ConnectedBluvoPaymentMethodItem: ({ paymentMethodInfo, isSelected, onSelect, onBrokerageError, showSelectedCheckmark, }: ConnectedBluvoPaymentMethodItemProps) => React.JSX.Element;
17
18
  interface ConnectedPaymentMethodItemProps {
18
19
  isSelected: boolean;
19
20
  showSelectedCheckmark?: boolean;
@@ -28,8 +28,4 @@ export declare const isAssetUsableToPayForCheckout: ({ config, payerAddress, pay
28
28
  minUsdRequired?: number;
29
29
  };
30
30
  export declare function getUsdAvailableAmount(targetChainId: string, assetChainId: string | undefined, assetUsdAmount: number | null | undefined, paymentMethod: PaymentMethod | undefined): number | null;
31
- /**
32
- * Attempt to safeguard user from irrecoverable losses
33
- */
34
- export declare function isBlacklistedWithdrawAddress(address: string): boolean;
35
31
  export {};
@@ -22,7 +22,7 @@ export interface CheckedAssetAmount {
22
22
  maxTargetAssetAmount?: number;
23
23
  minTargetAssetAmount?: number;
24
24
  }
25
- export declare function checkAssetAmount(checkoutItem: FunkitActiveCheckoutItem, newPaymentMethodInfo: PaymentMethodInfo, finalEstimation: FunkitCheckoutQuoteResult, wagmiConfig: Config, walletAddress: Address, brokerage?: BrokerageDetails): Promise<CheckedAssetAmount>;
25
+ export declare function checkAssetAmount(checkoutItem: FunkitActiveCheckoutItem, finalEstimation: FunkitCheckoutQuoteResult, wagmiConfig: Config, walletAddress: Address, brokerage?: BrokerageDetails): Promise<CheckedAssetAmount>;
26
26
  export interface CheckoutQuoteParams {
27
27
  checkoutItem: FunkitActiveCheckoutItem;
28
28
  userId: string;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Attempt to safeguard user from irrecoverable losses
3
+ */
4
+ export declare function useIsBlacklistedWithdrawalAddress(address: string): boolean;
@@ -1,4 +1,4 @@
1
- import { type AssetHoldingsMap } from '../../utils/assets';
1
+ import { type AssetHoldingsMap } from '../utils/assets';
2
2
  interface UseWalletAssetHoldingsResponse {
3
3
  data: AssetHoldingsMap | undefined;
4
4
  isLoading: boolean;