@orderly.network/wallet-connector-privy 2.7.1 → 2.7.2-alpha.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/dist/index.mjs CHANGED
@@ -3,7 +3,7 @@ import * as viemExport from 'viem';
3
3
  import { defineChain } from 'viem';
4
4
  import { mainnet, abstract, abstractTestnet } from 'viem/chains';
5
5
  import { useWalletConnector, useAccount, useSWR, fetcher, WalletConnectorContext, useTrack, useStorageLedgerAddress, useLocalStorage, useStorageChain } from '@orderly.network/hooks';
6
- import { SOLANA_TESTNET_CHAINID, SOLANA_MAINNET_CHAINID, ChainNamespace, TesntTokenFallback, ArbitrumSepoliaTokenInfo, SolanaDevnetTokenInfo, ABSTRACT_CHAIN_ID_MAP, AccountStatusEnum, ABSTRACT_TESTNET_CHAINID, ABSTRACT_MAINNET_CHAINID, SolanaChains as SolanaChains$1, AbstractChains, ArbitrumSepoliaChainInfo, SolanaDevnetChainInfo, AbstractTestnetChainInfo, EMPTY_OBJECT, TrackerEventName, ConnectorKey } from '@orderly.network/types';
6
+ import { SOLANA_TESTNET_CHAINID, SOLANA_MAINNET_CHAINID, ChainNamespace, TesntTokenFallback, ArbitrumSepoliaTokenInfo, SolanaDevnetTokenInfo, ABSTRACT_CHAIN_ID_MAP, AccountStatusEnum, ABSTRACT_TESTNET_CHAINID, ABSTRACT_MAINNET_CHAINID, SolanaChains as SolanaChains$1, AbstractChains, ArbitrumSepoliaChainInfo, SolanaDevnetChainInfo, EMPTY_OBJECT, TrackerEventName, ConnectorKey } from '@orderly.network/types';
7
7
  import { modal, useModal, SimpleSheet, SheetHeader, Text, Flex, Divider, cn, installExtension, ExtensionPositionEnum, useScreen, formatAddress, Button, SimpleDialog, TooltipProvider, CloseIcon, ScrollArea, ExclamationFillIcon, Tooltip, CopyIcon, Checkbox, toast, DropdownMenuRoot, DropdownMenuTrigger, DropdownMenuPortal, DropdownMenuContent, DropdownMenuItem, ChevronDownIcon, ChevronUpIcon, Grid, ChainIcon, Popover } from '@orderly.network/ui';
8
8
  import { useTranslation, Trans } from '@orderly.network/i18n';
9
9
  import { AbstractWalletProvider as AbstractWalletProvider$1, useLoginWithAbstract, useAbstractClient, useGlobalWalletSignerAccount } from '@abstract-foundation/agw-react';
@@ -1398,22 +1398,7 @@ var PrivyConnectAreaDesktop = ({
1398
1398
  const { t } = useTranslation();
1399
1399
  const { connectorWalletType, privyConfig } = useWalletConnectorPrivy();
1400
1400
  const loginMethods = privyConfig.loginMethods;
1401
- return /* @__PURE__ */ React19.createElement(Flex, { direction: "column", gap: 2, itemAlign: "start", className: "oui-w-full" }, /* @__PURE__ */ React19.createElement(
1402
- "div",
1403
- {
1404
- className: cn(
1405
- "oui-flex oui-items-center oui-justify-between",
1406
- "oui-mb-3 oui-text-sm oui-font-semibold oui-text-base-contrast-80"
1407
- )
1408
- },
1409
- t("connector.privy.loginIn")
1410
- ), /* @__PURE__ */ React19.createElement(Grid, { cols: 1, gap: 2, className: "oui-w-full" }, /* @__PURE__ */ React19.createElement(RenderLoginMethodsDom, { connect, loginMethods })), /* @__PURE__ */ React19.createElement("div", { className: "oui-mt-4 oui-flex oui-h-3 oui-justify-center" }, /* @__PURE__ */ React19.createElement(
1411
- "img",
1412
- {
1413
- src: "https://oss.orderly.network/static/sdk/privy/privy-logo.png",
1414
- className: " oui-h-[10px]"
1415
- }
1416
- )), (!connectorWalletType.disableWagmi || !connectorWalletType.disableSolana) && /* @__PURE__ */ React19.createElement("div", { className: "oui-mt-4 oui-h-px oui-w-full oui-bg-line md:oui-mt-5" }));
1401
+ return /* @__PURE__ */ React19.createElement(Flex, { direction: "column", itemAlign: "start", className: "oui-w-full" }, /* @__PURE__ */ React19.createElement(Grid, { cols: 1, gap: 2, className: "oui-w-full" }, /* @__PURE__ */ React19.createElement(RenderLoginMethodsDom, { connect, loginMethods })), (!connectorWalletType.disableWagmi || !connectorWalletType.disableSolana) && /* @__PURE__ */ React19.createElement("div", { className: "oui-mt-4 oui-h-px oui-w-full oui-bg-line md:oui-mt-5" }));
1417
1402
  };
1418
1403
  function PrivyConnectArea({
1419
1404
  connect
@@ -3094,7 +3079,7 @@ var commonSwrOpts = {
3094
3079
  // don't duplicate a request with the same key for 1hr
3095
3080
  dedupingInterval: 36e5
3096
3081
  };
3097
- var testnetTokenFallback = TesntTokenFallback([
3082
+ TesntTokenFallback([
3098
3083
  ArbitrumSepoliaTokenInfo,
3099
3084
  SolanaDevnetTokenInfo
3100
3085
  ]);
@@ -3235,10 +3220,7 @@ function WalletConnectorPrivyProvider(props) {
3235
3220
  const { data: mainnetChainInfos } = useSWR(
3236
3221
  !props.customChains ? "https://api.orderly.org/v1/public/chain_info" : null,
3237
3222
  fetcher,
3238
- {
3239
- ...commonSwrOpts,
3240
- fallbackData: testnetTokenFallback
3241
- }
3223
+ commonSwrOpts
3242
3224
  );
3243
3225
  const { data: testChainInfos } = useSWR(
3244
3226
  !props.customChains ? "https://testnet-api.orderly.org/v1/public/chain_info" : null,
@@ -3340,7 +3322,6 @@ function WalletConnectorPrivyProvider(props) {
3340
3322
  let mainnetChainsList = [];
3341
3323
  try {
3342
3324
  testChainsList = testChainInfos;
3343
- testChainsList.push(AbstractTestnetChainInfo);
3344
3325
  mainnetChainsList = mainnetChainInfos;
3345
3326
  const testChains = processChainInfo(testChainsList);
3346
3327
  const mainnetChains2 = processChainInfo(mainnetChainsList);