thirdweb 5.86.7-nightly-f5f8a40320d5d768d5866813f53ee4880bdf7851-20250129000319 → 5.87.1
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/cjs/exports/react.js +4 -3
- package/dist/cjs/exports/react.js.map +1 -1
- package/dist/cjs/exports/react.native.js +27 -1
- package/dist/cjs/exports/react.native.js.map +1 -1
- package/dist/cjs/react/{web/ui/prebuilt/Account → core/account}/provider.js +1 -1
- package/dist/cjs/react/core/account/provider.js.map +1 -0
- package/dist/cjs/react/core/utils/account.js +105 -0
- package/dist/cjs/react/core/utils/account.js.map +1 -0
- package/dist/cjs/react/core/utils/walletIcon.js +23 -0
- package/dist/cjs/react/core/utils/walletIcon.js.map +1 -1
- package/dist/cjs/react/core/utils/walletname.js +45 -0
- package/dist/cjs/react/core/utils/walletname.js.map +1 -0
- package/dist/cjs/react/core/wallet/provider.js.map +1 -0
- package/dist/cjs/react/native/ui/prebuilt/Account/address.js +50 -0
- package/dist/cjs/react/native/ui/prebuilt/Account/address.js.map +1 -0
- package/dist/cjs/react/native/ui/prebuilt/Account/avatar.js +151 -0
- package/dist/cjs/react/native/ui/prebuilt/Account/avatar.js.map +1 -0
- package/dist/cjs/react/native/ui/prebuilt/Account/balance.js +130 -0
- package/dist/cjs/react/native/ui/prebuilt/Account/balance.js.map +1 -0
- package/dist/cjs/react/native/ui/prebuilt/Account/blobbie.js +58 -0
- package/dist/cjs/react/native/ui/prebuilt/Account/blobbie.js.map +1 -0
- package/dist/cjs/react/native/ui/prebuilt/Account/name.js +113 -0
- package/dist/cjs/react/native/ui/prebuilt/Account/name.js.map +1 -0
- package/dist/cjs/react/native/ui/prebuilt/Wallet/icon.js +85 -0
- package/dist/cjs/react/native/ui/prebuilt/Wallet/icon.js.map +1 -0
- package/dist/cjs/react/native/ui/prebuilt/Wallet/name.js +66 -0
- package/dist/cjs/react/native/ui/prebuilt/Wallet/name.js.map +1 -0
- package/dist/cjs/react/web/ui/ConnectWallet/Blobbie.js +2 -18
- package/dist/cjs/react/web/ui/ConnectWallet/Blobbie.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/ConnectButton.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/ConnectButton.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Details.js +5 -4
- package/dist/cjs/react/web/ui/ConnectWallet/Details.js.map +1 -1
- package/dist/cjs/react/web/ui/prebuilt/Account/address.js +1 -1
- package/dist/cjs/react/web/ui/prebuilt/Account/address.js.map +1 -1
- package/dist/cjs/react/web/ui/prebuilt/Account/avatar.js +1 -1
- package/dist/cjs/react/web/ui/prebuilt/Account/avatar.js.map +1 -1
- package/dist/cjs/react/web/ui/prebuilt/Account/balance.js +8 -90
- package/dist/cjs/react/web/ui/prebuilt/Account/balance.js.map +1 -1
- package/dist/cjs/react/web/ui/prebuilt/Account/blobbie.js +1 -1
- package/dist/cjs/react/web/ui/prebuilt/Account/blobbie.js.map +1 -1
- package/dist/cjs/react/web/ui/prebuilt/Account/name.js +1 -1
- package/dist/cjs/react/web/ui/prebuilt/Account/name.js.map +1 -1
- package/dist/cjs/react/web/ui/prebuilt/Wallet/icon.js +1 -23
- package/dist/cjs/react/web/ui/prebuilt/Wallet/icon.js.map +1 -1
- package/dist/cjs/react/web/ui/prebuilt/Wallet/name.js +2 -42
- package/dist/cjs/react/web/ui/prebuilt/Wallet/name.js.map +1 -1
- package/dist/cjs/utils/shortenLargeNumber.js +3 -0
- package/dist/cjs/utils/shortenLargeNumber.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/cjs/wallets/manager/index.js +3 -1
- package/dist/cjs/wallets/manager/index.js.map +1 -1
- package/dist/esm/exports/react.js +3 -3
- package/dist/esm/exports/react.js.map +1 -1
- package/dist/esm/exports/react.native.js +15 -0
- package/dist/esm/exports/react.native.js.map +1 -1
- package/dist/esm/react/{web/ui/prebuilt/Account → core/account}/provider.js +1 -1
- package/dist/esm/react/core/account/provider.js.map +1 -0
- package/dist/esm/react/core/utils/account.js +99 -0
- package/dist/esm/react/core/utils/account.js.map +1 -0
- package/dist/esm/react/core/utils/walletIcon.js +21 -0
- package/dist/esm/react/core/utils/walletIcon.js.map +1 -1
- package/dist/esm/react/core/utils/walletname.js +40 -0
- package/dist/esm/react/core/utils/walletname.js.map +1 -0
- package/dist/esm/react/core/wallet/provider.js.map +1 -0
- package/dist/esm/react/native/ui/prebuilt/Account/address.js +47 -0
- package/dist/esm/react/native/ui/prebuilt/Account/address.js.map +1 -0
- package/dist/esm/react/native/ui/prebuilt/Account/avatar.js +148 -0
- package/dist/esm/react/native/ui/prebuilt/Account/avatar.js.map +1 -0
- package/dist/esm/react/native/ui/prebuilt/Account/balance.js +127 -0
- package/dist/esm/react/native/ui/prebuilt/Account/balance.js.map +1 -0
- package/dist/esm/react/native/ui/prebuilt/Account/blobbie.js +54 -0
- package/dist/esm/react/native/ui/prebuilt/Account/blobbie.js.map +1 -0
- package/dist/esm/react/native/ui/prebuilt/Account/name.js +110 -0
- package/dist/esm/react/native/ui/prebuilt/Account/name.js.map +1 -0
- package/dist/esm/react/native/ui/prebuilt/Wallet/icon.js +81 -0
- package/dist/esm/react/native/ui/prebuilt/Wallet/icon.js.map +1 -0
- package/dist/esm/react/native/ui/prebuilt/Wallet/name.js +63 -0
- package/dist/esm/react/native/ui/prebuilt/Wallet/name.js.map +1 -0
- package/dist/esm/react/web/ui/ConnectWallet/Blobbie.js +1 -17
- package/dist/esm/react/web/ui/ConnectWallet/Blobbie.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/ConnectButton.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/ConnectButton.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/Details.js +3 -2
- package/dist/esm/react/web/ui/ConnectWallet/Details.js.map +1 -1
- package/dist/esm/react/web/ui/prebuilt/Account/address.js +1 -1
- package/dist/esm/react/web/ui/prebuilt/Account/address.js.map +1 -1
- package/dist/esm/react/web/ui/prebuilt/Account/avatar.js +1 -1
- package/dist/esm/react/web/ui/prebuilt/Account/avatar.js.map +1 -1
- package/dist/esm/react/web/ui/prebuilt/Account/balance.js +6 -85
- package/dist/esm/react/web/ui/prebuilt/Account/balance.js.map +1 -1
- package/dist/esm/react/web/ui/prebuilt/Account/blobbie.js +1 -1
- package/dist/esm/react/web/ui/prebuilt/Account/blobbie.js.map +1 -1
- package/dist/esm/react/web/ui/prebuilt/Account/name.js +1 -1
- package/dist/esm/react/web/ui/prebuilt/Account/name.js.map +1 -1
- package/dist/esm/react/web/ui/prebuilt/Wallet/icon.js +1 -22
- package/dist/esm/react/web/ui/prebuilt/Wallet/icon.js.map +1 -1
- package/dist/esm/react/web/ui/prebuilt/Wallet/name.js +1 -39
- package/dist/esm/react/web/ui/prebuilt/Wallet/name.js.map +1 -1
- package/dist/esm/utils/shortenLargeNumber.js +3 -0
- package/dist/esm/utils/shortenLargeNumber.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/esm/wallets/manager/index.js +3 -1
- package/dist/esm/wallets/manager/index.js.map +1 -1
- package/dist/types/exports/react.d.ts +5 -4
- package/dist/types/exports/react.d.ts.map +1 -1
- package/dist/types/exports/react.native.d.ts +15 -0
- package/dist/types/exports/react.native.d.ts.map +1 -1
- package/dist/types/react/{web/ui/prebuilt/Account → core/account}/provider.d.ts +3 -4
- package/dist/types/react/core/account/provider.d.ts.map +1 -0
- package/dist/types/react/core/utils/account.d.ts +46 -0
- package/dist/types/react/core/utils/account.d.ts.map +1 -0
- package/dist/types/react/core/utils/walletIcon.d.ts +14 -0
- package/dist/types/react/core/utils/walletIcon.d.ts.map +1 -1
- package/dist/types/react/core/utils/walletname.d.ts +26 -0
- package/dist/types/react/core/utils/walletname.d.ts.map +1 -0
- package/dist/types/react/{web/ui/prebuilt/Wallet → core/wallet}/provider.d.ts +1 -1
- package/dist/types/react/core/wallet/provider.d.ts.map +1 -0
- package/dist/types/react/native/ui/prebuilt/Account/address.d.ts +54 -0
- package/dist/types/react/native/ui/prebuilt/Account/address.d.ts.map +1 -0
- package/dist/types/react/native/ui/prebuilt/Account/avatar.d.ts +141 -0
- package/dist/types/react/native/ui/prebuilt/Account/avatar.d.ts.map +1 -0
- package/dist/types/react/native/ui/prebuilt/Account/balance.d.ts +144 -0
- package/dist/types/react/native/ui/prebuilt/Account/balance.d.ts.map +1 -0
- package/dist/types/react/native/ui/prebuilt/Account/blobbie.d.ts +34 -0
- package/dist/types/react/native/ui/prebuilt/Account/blobbie.d.ts.map +1 -0
- package/dist/types/react/native/ui/prebuilt/Account/name.d.ts +118 -0
- package/dist/types/react/native/ui/prebuilt/Account/name.d.ts.map +1 -0
- package/dist/types/react/native/ui/prebuilt/Wallet/icon.d.ts +100 -0
- package/dist/types/react/native/ui/prebuilt/Wallet/icon.d.ts.map +1 -0
- package/dist/types/react/native/ui/prebuilt/Wallet/name.d.ts +94 -0
- package/dist/types/react/native/ui/prebuilt/Wallet/name.d.ts.map +1 -0
- package/dist/types/react/web/ui/ConnectWallet/Blobbie.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Blobbie.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/ConnectButton.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Details.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Details.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/Account/avatar.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/Account/balance.d.ts +1 -42
- package/dist/types/react/web/ui/prebuilt/Account/balance.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/Account/blobbie.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/Wallet/icon.d.ts +2 -10
- package/dist/types/react/web/ui/prebuilt/Wallet/icon.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/Wallet/name.d.ts +1 -18
- package/dist/types/react/web/ui/prebuilt/Wallet/name.d.ts.map +1 -1
- package/dist/types/utils/shortenLargeNumber.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/version.d.ts.map +1 -1
- package/dist/types/wallets/manager/index.d.ts +1 -0
- package/dist/types/wallets/manager/index.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/exports/react.native.ts +47 -0
- package/src/exports/react.ts +5 -3
- package/src/react/{web/ui/prebuilt/Account → core/account}/provider.test.tsx +1 -1
- package/src/react/{web/ui/prebuilt/Account → core/account}/provider.tsx +3 -5
- package/src/react/core/utils/account.ts +146 -0
- package/src/react/core/utils/walletIcon.ts +28 -0
- package/src/react/core/utils/walletname.ts +53 -0
- package/src/react/{web/ui/prebuilt/Wallet → core/wallet}/provider.tsx +1 -1
- package/src/react/native/ui/prebuilt/Account/address.tsx +65 -0
- package/src/react/native/ui/prebuilt/Account/avatar.tsx +225 -0
- package/src/react/native/ui/prebuilt/Account/balance.tsx +221 -0
- package/src/react/native/ui/prebuilt/Account/blobbie.tsx +94 -0
- package/src/react/native/ui/prebuilt/Account/name.tsx +180 -0
- package/src/react/native/ui/prebuilt/Wallet/icon.tsx +124 -0
- package/src/react/native/ui/prebuilt/Wallet/name.tsx +112 -0
- package/src/react/web/ui/ConnectWallet/Blobbie.tsx +1 -18
- package/src/react/web/ui/ConnectWallet/ConnectButton.tsx +1 -1
- package/src/react/web/ui/ConnectWallet/Details.test.tsx +1 -1
- package/src/react/web/ui/ConnectWallet/Details.tsx +7 -7
- package/src/react/web/ui/prebuilt/Account/address.test.tsx +1 -1
- package/src/react/web/ui/prebuilt/Account/address.tsx +1 -1
- package/src/react/web/ui/prebuilt/Account/avatar.test.tsx +1 -1
- package/src/react/web/ui/prebuilt/Account/avatar.tsx +1 -2
- package/src/react/web/ui/prebuilt/Account/balance.test.tsx +7 -5
- package/src/react/web/ui/prebuilt/Account/balance.tsx +10 -130
- package/src/react/web/ui/prebuilt/Account/blobbie.tsx +1 -1
- package/src/react/web/ui/prebuilt/Account/name.test.tsx +1 -1
- package/src/react/web/ui/prebuilt/Account/name.tsx +1 -1
- package/src/react/web/ui/prebuilt/Wallet/icon.test.tsx +3 -2
- package/src/react/web/ui/prebuilt/Wallet/icon.tsx +6 -30
- package/src/react/web/ui/prebuilt/Wallet/name.test.tsx +6 -2
- package/src/react/web/ui/prebuilt/Wallet/name.tsx +2 -52
- package/src/utils/shortenLargeNumber.ts +3 -0
- package/src/version.ts +1 -1
- package/src/wallets/manager/index.ts +4 -1
- package/dist/cjs/react/web/ui/prebuilt/Account/provider.js.map +0 -1
- package/dist/cjs/react/web/ui/prebuilt/Wallet/provider.js.map +0 -1
- package/dist/esm/react/web/ui/prebuilt/Account/provider.js.map +0 -1
- package/dist/esm/react/web/ui/prebuilt/Wallet/provider.js.map +0 -1
- package/dist/types/react/web/ui/prebuilt/Account/provider.d.ts.map +0 -1
- package/dist/types/react/web/ui/prebuilt/Wallet/provider.d.ts.map +0 -1
- /package/dist/cjs/react/{web/ui/prebuilt/Wallet → core/wallet}/provider.js +0 -0
- /package/dist/esm/react/{web/ui/prebuilt/Wallet → core/wallet}/provider.js +0 -0
- /package/src/react/{web/ui/prebuilt/Wallet → core/wallet}/provider.test.tsx +0 -0
@@ -0,0 +1,112 @@
|
|
1
|
+
"use client";
|
2
|
+
|
3
|
+
import type { UseQueryOptions } from "@tanstack/react-query";
|
4
|
+
import { Text, type TextProps } from "react-native";
|
5
|
+
import { useWalletName } from "../../../../core/utils/walletname.js";
|
6
|
+
/**
|
7
|
+
* Props for the WalletName component
|
8
|
+
* @component
|
9
|
+
* @wallet
|
10
|
+
*/
|
11
|
+
export interface WalletNameProps extends Omit<TextProps, "children"> {
|
12
|
+
/**
|
13
|
+
* This component will be shown while the name of the wallet name is being fetched
|
14
|
+
* If not passed, the component will return `null`.
|
15
|
+
*
|
16
|
+
* You can/should pass a loading sign or spinner to this prop.
|
17
|
+
* @example
|
18
|
+
* ```tsx
|
19
|
+
* <WalletName loadingComponent={<Spinner />} />
|
20
|
+
* ```
|
21
|
+
*/
|
22
|
+
loadingComponent?: React.ComponentType;
|
23
|
+
/**
|
24
|
+
* This component will be shown if the name fails to be retreived
|
25
|
+
* If not passed, the component will return `null`.
|
26
|
+
*
|
27
|
+
* You can/should pass a descriptive text/component to this prop, indicating that the
|
28
|
+
* name was not fetched succesfully
|
29
|
+
* @example
|
30
|
+
* ```tsx
|
31
|
+
* <WalletName fallbackComponent={<span>Failed to load</span>}
|
32
|
+
* />
|
33
|
+
* ```
|
34
|
+
*/
|
35
|
+
fallbackComponent?: React.ComponentType;
|
36
|
+
/**
|
37
|
+
* Optional `useQuery` params
|
38
|
+
*/
|
39
|
+
queryOptions?: Omit<UseQueryOptions<string>, "queryFn" | "queryKey">;
|
40
|
+
/**
|
41
|
+
* A function to format the name's display value
|
42
|
+
* ```tsx
|
43
|
+
* <WalletName formatFn={(str: string) => doSomething()} />
|
44
|
+
* ```
|
45
|
+
*/
|
46
|
+
formatFn?: (str: string) => string;
|
47
|
+
}
|
48
|
+
|
49
|
+
/**
|
50
|
+
* This component fetches then shows the name of a wallet.
|
51
|
+
* It inherits all the attributes of a HTML <span> component, hence you can style it just like how you would style a normal <span>
|
52
|
+
*
|
53
|
+
* @example
|
54
|
+
* ### Basic usage
|
55
|
+
* ```tsx
|
56
|
+
* import { WalletProvider, WalletName } from "thirdweb/react";
|
57
|
+
*
|
58
|
+
* <WalletProvider id="io.metamask">
|
59
|
+
* <WalletName />
|
60
|
+
* </WalletProvider>
|
61
|
+
* ```
|
62
|
+
* Result:
|
63
|
+
* ```html
|
64
|
+
* <span>MetaMask</span>
|
65
|
+
* ```
|
66
|
+
*
|
67
|
+
* ### Show a loading sign when the name is being fetched
|
68
|
+
* ```tsx
|
69
|
+
* import { WalletProvider, WalletName } from "thirdweb/react";
|
70
|
+
*
|
71
|
+
* <WalletProvider {...props}>
|
72
|
+
* <WalletName loadingComponent={<Spinner />} />
|
73
|
+
* </WalletProvider>
|
74
|
+
* ```
|
75
|
+
*
|
76
|
+
* ### Fallback to something when the name fails to resolve
|
77
|
+
* ```tsx
|
78
|
+
* <WalletProvider {...props}>
|
79
|
+
* <WalletName fallbackComponent={<span>Failed to load</span>} />
|
80
|
+
* </WalletProvider>
|
81
|
+
* ```
|
82
|
+
*
|
83
|
+
* ### Custom query options for useQuery
|
84
|
+
* This component uses `@tanstack-query`'s useQuery internally.
|
85
|
+
* You can use the `queryOptions` prop for more fine-grained control
|
86
|
+
* ```tsx
|
87
|
+
* <WalletName
|
88
|
+
* queryOptions={{
|
89
|
+
* enabled: isEnabled,
|
90
|
+
* retry: 4,
|
91
|
+
* }}
|
92
|
+
* />
|
93
|
+
* @component
|
94
|
+
* @beta
|
95
|
+
* @wallet
|
96
|
+
*/
|
97
|
+
export function WalletName({
|
98
|
+
loadingComponent,
|
99
|
+
fallbackComponent,
|
100
|
+
queryOptions,
|
101
|
+
formatFn,
|
102
|
+
...restProps
|
103
|
+
}: WalletNameProps) {
|
104
|
+
const nameQuery = useWalletName({ queryOptions, formatFn });
|
105
|
+
if (nameQuery.isLoading) {
|
106
|
+
return loadingComponent || null;
|
107
|
+
}
|
108
|
+
if (!nameQuery.data) {
|
109
|
+
return fallbackComponent || null;
|
110
|
+
}
|
111
|
+
return <Text {...restProps}>{nameQuery.data}</Text>;
|
112
|
+
}
|
@@ -1,24 +1,7 @@
|
|
1
1
|
"use client";
|
2
2
|
import { hexToNumber } from "@noble/curves/abstract/utils";
|
3
3
|
import { useId, useMemo } from "react";
|
4
|
-
|
5
|
-
const COLOR_OPTIONS = [
|
6
|
-
["#fca5a5", "#b91c1c"],
|
7
|
-
["#fdba74", "#c2410c"],
|
8
|
-
["#fcd34d", "#b45309"],
|
9
|
-
["#fde047", "#a16207"],
|
10
|
-
["#a3e635", "#4d7c0f"],
|
11
|
-
["#86efac", "#15803d"],
|
12
|
-
["#67e8f9", "#0e7490"],
|
13
|
-
["#7dd3fc", "#0369a1"],
|
14
|
-
["#93c5fd", "#1d4ed8"],
|
15
|
-
["#a5b4fc", "#4338ca"],
|
16
|
-
["#c4b5fd", "#6d28d9"],
|
17
|
-
["#d8b4fe", "#7e22ce"],
|
18
|
-
["#f0abfc", "#a21caf"],
|
19
|
-
["#f9a8d4", "#be185d"],
|
20
|
-
["#fda4af", "#be123c"],
|
21
|
-
];
|
4
|
+
import { COLOR_OPTIONS } from "../../../core/utils/account.js";
|
22
5
|
|
23
6
|
/**
|
24
7
|
* Props for the Blobbie component
|
@@ -3,6 +3,7 @@
|
|
3
3
|
import styled from "@emotion/styled";
|
4
4
|
import { useEffect, useMemo, useState } from "react";
|
5
5
|
import { getDefaultWallets } from "../../../../wallets/defaultWallets.js";
|
6
|
+
import { AccountProvider } from "../../../core/account/provider.js";
|
6
7
|
import { iconSize } from "../../../core/design-system/index.js";
|
7
8
|
import { useSiweAuth } from "../../../core/hooks/auth/useSiweAuth.js";
|
8
9
|
import type { ConnectButtonProps } from "../../../core/hooks/connection/ConnectButtonProps.js";
|
@@ -23,7 +24,6 @@ import { Spinner } from "../components/Spinner.js";
|
|
23
24
|
import { Container } from "../components/basic.js";
|
24
25
|
import { Button } from "../components/buttons.js";
|
25
26
|
import { fadeInAnimation } from "../design-system/animations.js";
|
26
|
-
import { AccountProvider } from "../prebuilt/Account/provider.js";
|
27
27
|
import { ConnectedWalletDetails } from "./Details.js";
|
28
28
|
import ConnectModal from "./Modal/ConnectModal.js";
|
29
29
|
import { LockIcon } from "./icons/LockIcon.js";
|
@@ -14,8 +14,8 @@ import { base } from "../../../../chains/chain-definitions/base.js";
|
|
14
14
|
import { ethereum } from "../../../../chains/chain-definitions/ethereum.js";
|
15
15
|
import { useActiveAccount } from "../../../../react/core/hooks/wallets/useActiveAccount.js";
|
16
16
|
import { useActiveWalletChain } from "../../../../react/core/hooks/wallets/useActiveWalletChain.js";
|
17
|
+
import { AccountProvider } from "../../../core/account/provider.js";
|
17
18
|
import { ThirdwebProvider } from "../../providers/thirdweb-provider.js";
|
18
|
-
import { AccountProvider } from "../prebuilt/Account/provider.js";
|
19
19
|
import {
|
20
20
|
ConnectedToSmartWallet,
|
21
21
|
ConnectedWalletDetails,
|
@@ -40,6 +40,7 @@ import type {
|
|
40
40
|
EcosystemWalletId,
|
41
41
|
WalletId,
|
42
42
|
} from "../../../../wallets/wallet-types.js";
|
43
|
+
import { AccountProvider } from "../../../core/account/provider.js";
|
43
44
|
import {
|
44
45
|
CustomThemeProvider,
|
45
46
|
parseTheme,
|
@@ -67,6 +68,11 @@ import { useAdminWallet } from "../../../core/hooks/wallets/useAdminWallet.js";
|
|
67
68
|
import { useDisconnect } from "../../../core/hooks/wallets/useDisconnect.js";
|
68
69
|
import { useSwitchActiveWalletChain } from "../../../core/hooks/wallets/useSwitchActiveWalletChain.js";
|
69
70
|
import { SetRootElementContext } from "../../../core/providers/RootElementContext.js";
|
71
|
+
import {
|
72
|
+
type AccountBalanceInfo,
|
73
|
+
formatAccountFiatBalance,
|
74
|
+
formatAccountTokenBalance,
|
75
|
+
} from "../../../core/utils/account.js";
|
70
76
|
import type {
|
71
77
|
SupportedNFTs,
|
72
78
|
SupportedTokens,
|
@@ -91,15 +97,9 @@ import { fadeInAnimation } from "../design-system/animations.js";
|
|
91
97
|
import { StyledButton } from "../design-system/elements.js";
|
92
98
|
import { AccountAddress } from "../prebuilt/Account/address.js";
|
93
99
|
import { AccountAvatar } from "../prebuilt/Account/avatar.js";
|
94
|
-
import {
|
95
|
-
AccountBalance,
|
96
|
-
type AccountBalanceInfo,
|
97
|
-
formatAccountFiatBalance,
|
98
|
-
formatAccountTokenBalance,
|
99
|
-
} from "../prebuilt/Account/balance.js";
|
100
|
+
import { AccountBalance } from "../prebuilt/Account/balance.js";
|
100
101
|
import { AccountBlobbie } from "../prebuilt/Account/blobbie.js";
|
101
102
|
import { AccountName } from "../prebuilt/Account/name.js";
|
102
|
-
import { AccountProvider } from "../prebuilt/Account/provider.js";
|
103
103
|
import { ChainIcon } from "../prebuilt/Chain/icon.js";
|
104
104
|
import { ChainName } from "../prebuilt/Chain/name.js";
|
105
105
|
import { ChainProvider } from "../prebuilt/Chain/provider.js";
|
@@ -2,8 +2,8 @@ import { describe, expect, it } from "vitest";
|
|
2
2
|
import { render, screen, waitFor } from "~test/react-render.js";
|
3
3
|
import { TEST_CLIENT } from "~test/test-clients.js";
|
4
4
|
import { shortenAddress } from "../../../../../utils/address.js";
|
5
|
+
import { AccountProvider } from "../../../../core/account/provider.js";
|
5
6
|
import { AccountAddress } from "./address.js";
|
6
|
-
import { AccountProvider } from "./provider.js";
|
7
7
|
|
8
8
|
describe.runIf(process.env.TW_SECRET_KEY)("AccountAddress component", () => {
|
9
9
|
it("should format the address properly", () => {
|
@@ -2,8 +2,8 @@ import { describe, expect, it } from "vitest";
|
|
2
2
|
import { render, screen, waitFor } from "~test/react-render.js";
|
3
3
|
import { TEST_CLIENT } from "~test/test-clients.js";
|
4
4
|
import { TEST_ACCOUNT_A } from "~test/test-wallets.js";
|
5
|
+
import { AccountProvider } from "../../../../core/account/provider.js";
|
5
6
|
import { AccountAvatar } from "./avatar.js";
|
6
|
-
import { AccountProvider } from "./provider.js";
|
7
7
|
|
8
8
|
describe.runIf(process.env.TW_SECRET_KEY)("AccountAvatar component", () => {
|
9
9
|
it("should render an image", () => {
|
@@ -11,8 +11,7 @@ import {
|
|
11
11
|
import { getSocialProfiles } from "../../../../../social/profiles.js";
|
12
12
|
import type { SocialProfile } from "../../../../../social/types.js";
|
13
13
|
import { parseAvatarRecord } from "../../../../../utils/ens/avatar.js";
|
14
|
-
import { useAccountContext } from "
|
15
|
-
|
14
|
+
import { useAccountContext } from "../../../../core/account/provider.js";
|
16
15
|
/**
|
17
16
|
* Props for the AccountAvatar component
|
18
17
|
* @component
|
@@ -7,13 +7,13 @@ import { ethereum } from "../../../../../chains/chain-definitions/ethereum.js";
|
|
7
7
|
import { sepolia } from "../../../../../chains/chain-definitions/sepolia.js";
|
8
8
|
import { defineChain } from "../../../../../chains/utils.js";
|
9
9
|
import { NATIVE_TOKEN_ADDRESS } from "../../../../../constants/addresses.js";
|
10
|
+
import { AccountProvider } from "../../../../core/account/provider.js";
|
10
11
|
import {
|
11
|
-
AccountBalance,
|
12
12
|
formatAccountFiatBalance,
|
13
13
|
formatAccountTokenBalance,
|
14
14
|
loadAccountBalance,
|
15
|
-
} from "
|
16
|
-
import {
|
15
|
+
} from "../../../../core/utils/account.js";
|
16
|
+
import { AccountBalance } from "./balance.js";
|
17
17
|
|
18
18
|
const queryClient = new QueryClient();
|
19
19
|
|
@@ -95,7 +95,8 @@ describe.runIf(process.env.TW_SECRET_KEY)("AccountBalance component", () => {
|
|
95
95
|
await expect(() =>
|
96
96
|
loadAccountBalance({
|
97
97
|
client: TEST_CLIENT,
|
98
|
-
|
98
|
+
// biome-ignore lint/suspicious/noExplicitAny: for the test
|
99
|
+
address: "haha" as any,
|
99
100
|
chain: ethereum,
|
100
101
|
}),
|
101
102
|
).rejects.toThrowError("Invalid wallet address. Expected an EVM address");
|
@@ -106,7 +107,8 @@ describe.runIf(process.env.TW_SECRET_KEY)("AccountBalance component", () => {
|
|
106
107
|
loadAccountBalance({
|
107
108
|
client: TEST_CLIENT,
|
108
109
|
address: VITALIK_WALLET,
|
109
|
-
|
110
|
+
// biome-ignore lint/suspicious/noExplicitAny: for the test
|
111
|
+
tokenAddress: "haha" as any,
|
110
112
|
chain: ethereum,
|
111
113
|
}),
|
112
114
|
).rejects.toThrowError(
|
@@ -1,35 +1,19 @@
|
|
1
1
|
"use client";
|
2
2
|
|
3
3
|
import { type UseQueryOptions, useQuery } from "@tanstack/react-query";
|
4
|
-
import type { Address } from "abitype";
|
5
4
|
import type React from "react";
|
6
5
|
import type { JSX } from "react";
|
7
6
|
import type { Chain } from "../../../../../chains/types.js";
|
8
|
-
import type { ThirdwebClient } from "../../../../../client/client.js";
|
9
|
-
import { NATIVE_TOKEN_ADDRESS } from "../../../../../constants/addresses.js";
|
10
|
-
import { convertCryptoToFiat } from "../../../../../exports/pay.js";
|
11
7
|
import type { SupportedFiatCurrency } from "../../../../../pay/convert/type.js";
|
12
8
|
import { useActiveWalletChain } from "../../../../../react/core/hooks/wallets/useActiveWalletChain.js";
|
13
|
-
import {
|
14
|
-
import {
|
15
|
-
import {
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
* @wallet
|
22
|
-
*/
|
23
|
-
export type AccountBalanceInfo = {
|
24
|
-
/**
|
25
|
-
* Represents either token balance or fiat balance.
|
26
|
-
*/
|
27
|
-
balance: number;
|
28
|
-
/**
|
29
|
-
* Represents either token symbol or fiat symbol
|
30
|
-
*/
|
31
|
-
symbol: string;
|
32
|
-
};
|
9
|
+
import { getAddress } from "../../../../../utils/address.js";
|
10
|
+
import { useAccountContext } from "../../../../core/account/provider.js";
|
11
|
+
import {
|
12
|
+
type AccountBalanceInfo,
|
13
|
+
formatAccountFiatBalance,
|
14
|
+
loadAccountBalance,
|
15
|
+
} from "../../../../core/utils/account.js";
|
16
|
+
import { formatAccountTokenBalance } from "../../../../core/utils/account.js";
|
33
17
|
|
34
18
|
/**
|
35
19
|
* Props for the AccountBalance component
|
@@ -199,8 +183,8 @@ export function AccountBalance({
|
|
199
183
|
loadAccountBalance({
|
200
184
|
chain: chainToLoad,
|
201
185
|
client,
|
202
|
-
address,
|
203
|
-
tokenAddress,
|
186
|
+
address: getAddress(address),
|
187
|
+
tokenAddress: tokenAddress ? getAddress(tokenAddress) : undefined,
|
204
188
|
showBalanceInFiat,
|
205
189
|
}),
|
206
190
|
retry: false,
|
@@ -237,107 +221,3 @@ export function AccountBalance({
|
|
237
221
|
</span>
|
238
222
|
);
|
239
223
|
}
|
240
|
-
|
241
|
-
/**
|
242
|
-
* @internal Exported for tests
|
243
|
-
*/
|
244
|
-
export async function loadAccountBalance(props: {
|
245
|
-
chain?: Chain;
|
246
|
-
client: ThirdwebClient;
|
247
|
-
address: Address;
|
248
|
-
tokenAddress?: Address;
|
249
|
-
showBalanceInFiat?: SupportedFiatCurrency;
|
250
|
-
}): Promise<AccountBalanceInfo> {
|
251
|
-
const { chain, client, address, tokenAddress, showBalanceInFiat } = props;
|
252
|
-
if (!chain) {
|
253
|
-
throw new Error("chain is required");
|
254
|
-
}
|
255
|
-
|
256
|
-
if (
|
257
|
-
tokenAddress &&
|
258
|
-
tokenAddress?.toLowerCase() === NATIVE_TOKEN_ADDRESS.toLowerCase()
|
259
|
-
) {
|
260
|
-
throw new Error(`Invalid tokenAddress - cannot be ${NATIVE_TOKEN_ADDRESS}`);
|
261
|
-
}
|
262
|
-
|
263
|
-
if (!isAddress(address)) {
|
264
|
-
throw new Error("Invalid wallet address. Expected an EVM address");
|
265
|
-
}
|
266
|
-
|
267
|
-
if (tokenAddress && !isAddress(tokenAddress)) {
|
268
|
-
throw new Error("Invalid tokenAddress. Expected an EVM contract address");
|
269
|
-
}
|
270
|
-
|
271
|
-
const tokenBalanceData = await getWalletBalance({
|
272
|
-
chain,
|
273
|
-
client,
|
274
|
-
address,
|
275
|
-
tokenAddress,
|
276
|
-
}).catch(() => undefined);
|
277
|
-
|
278
|
-
if (!tokenBalanceData) {
|
279
|
-
throw new Error(
|
280
|
-
`Failed to retrieve ${tokenAddress ? `token: ${tokenAddress}` : "native token"} balance for address: ${address} on chainId:${chain.id}`,
|
281
|
-
);
|
282
|
-
}
|
283
|
-
|
284
|
-
if (showBalanceInFiat) {
|
285
|
-
const fiatData = await convertCryptoToFiat({
|
286
|
-
fromAmount: Number(tokenBalanceData.displayValue),
|
287
|
-
fromTokenAddress: tokenAddress || NATIVE_TOKEN_ADDRESS,
|
288
|
-
to: showBalanceInFiat,
|
289
|
-
chain,
|
290
|
-
client,
|
291
|
-
}).catch(() => undefined);
|
292
|
-
|
293
|
-
if (fiatData === undefined) {
|
294
|
-
throw new Error(
|
295
|
-
`Failed to resolve fiat value for ${tokenAddress ? `token: ${tokenAddress}` : "native token"} on chainId: ${chain.id}`,
|
296
|
-
);
|
297
|
-
}
|
298
|
-
return {
|
299
|
-
balance: fiatData?.result,
|
300
|
-
symbol:
|
301
|
-
new Intl.NumberFormat("en", {
|
302
|
-
style: "currency",
|
303
|
-
currency: showBalanceInFiat,
|
304
|
-
minimumFractionDigits: 0,
|
305
|
-
maximumFractionDigits: 0,
|
306
|
-
})
|
307
|
-
.formatToParts(0)
|
308
|
-
.find((p) => p.type === "currency")?.value ||
|
309
|
-
showBalanceInFiat.toUpperCase(),
|
310
|
-
};
|
311
|
-
}
|
312
|
-
|
313
|
-
return {
|
314
|
-
balance: Number(tokenBalanceData.displayValue),
|
315
|
-
symbol: tokenBalanceData.symbol,
|
316
|
-
};
|
317
|
-
}
|
318
|
-
|
319
|
-
/**
|
320
|
-
* Format the display balance for both crypto and fiat, in the Details button and Modal
|
321
|
-
* If both crypto balance and fiat balance exist, we have to keep the string very short to avoid UI issues.
|
322
|
-
* @internal
|
323
|
-
* Used internally for the Details button and the Details Modal
|
324
|
-
*/
|
325
|
-
export function formatAccountTokenBalance(
|
326
|
-
props: AccountBalanceInfo & { decimals: number },
|
327
|
-
): string {
|
328
|
-
const formattedTokenBalance = formatNumber(props.balance, props.decimals);
|
329
|
-
return `${formattedTokenBalance} ${props.symbol}`;
|
330
|
-
}
|
331
|
-
|
332
|
-
/**
|
333
|
-
* Used internally for the Details button and Details Modal
|
334
|
-
* @internal
|
335
|
-
*/
|
336
|
-
export function formatAccountFiatBalance(
|
337
|
-
props: AccountBalanceInfo & { decimals: number },
|
338
|
-
) {
|
339
|
-
const num = formatNumber(props.balance, props.decimals);
|
340
|
-
// Need to keep them short to avoid UI overflow issues
|
341
|
-
const formattedFiatBalance = shortenLargeNumber(num);
|
342
|
-
return `${props.symbol}${formattedFiatBalance}`;
|
343
|
-
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use client";
|
2
2
|
|
3
|
+
import { useAccountContext } from "../../../../core/account/provider.js";
|
3
4
|
import { Blobbie, type BlobbieProps } from "../../ConnectWallet/Blobbie.js";
|
4
|
-
import { useAccountContext } from "./provider.js";
|
5
5
|
|
6
6
|
/**
|
7
7
|
* A wrapper for the Blobbie component
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
2
2
|
import { render, screen, waitFor } from "~test/react-render.js";
|
3
3
|
import { TEST_CLIENT } from "~test/test-clients.js";
|
4
|
+
import { AccountProvider } from "../../../../core/account/provider.js";
|
4
5
|
import { AccountName } from "./name.js";
|
5
|
-
import { AccountProvider } from "./provider.js";
|
6
6
|
|
7
7
|
describe.runIf(process.env.TW_SECRET_KEY)("AccountName component", () => {
|
8
8
|
it("should return the correct social name", () => {
|
@@ -9,7 +9,7 @@ import {
|
|
9
9
|
} from "../../../../../extensions/ens/resolve-name.js";
|
10
10
|
import { getSocialProfiles } from "../../../../../social/profiles.js";
|
11
11
|
import type { SocialProfile } from "../../../../../social/types.js";
|
12
|
-
import { useAccountContext } from "
|
12
|
+
import { useAccountContext } from "../../../../core/account/provider.js";
|
13
13
|
|
14
14
|
/**
|
15
15
|
* Props for the AccountName component
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
2
2
|
import { render, waitFor } from "~test/react-render.js";
|
3
|
-
import {
|
4
|
-
import { WalletProvider } from "
|
3
|
+
import { fetchWalletImage } from "../../../../core/utils/walletIcon.js";
|
4
|
+
import { WalletProvider } from "../../../../core/wallet/provider.js";
|
5
|
+
import { SocialIcon, WalletIcon } from "./icon.js";
|
5
6
|
|
6
7
|
describe("WalletIcon", () => {
|
7
8
|
it("should fetch wallet image", async () => {
|
@@ -1,12 +1,12 @@
|
|
1
1
|
"use client";
|
2
2
|
|
3
|
-
import {
|
3
|
+
import type { UseQueryOptions } from "@tanstack/react-query";
|
4
4
|
import type { JSX } from "react";
|
5
|
-
import { getWalletInfo } from "../../../../../wallets/__generated__/getWalletInfo.js";
|
6
5
|
import type { AuthOption } from "../../../../../wallets/types.js";
|
7
|
-
import
|
8
|
-
|
9
|
-
|
6
|
+
import {
|
7
|
+
getSocialIcon,
|
8
|
+
useWalletIcon,
|
9
|
+
} from "../../../../core/utils/walletIcon.js";
|
10
10
|
|
11
11
|
export interface WalletIconProps
|
12
12
|
extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, "src"> {
|
@@ -96,31 +96,7 @@ export function WalletIcon({
|
|
96
96
|
return <img src={imageQuery.data} {...restProps} alt={restProps.alt} />;
|
97
97
|
}
|
98
98
|
|
99
|
-
|
100
|
-
* @internal
|
101
|
-
*/
|
102
|
-
function useWalletIcon(props: {
|
103
|
-
queryOptions?: Omit<UseQueryOptions<string>, "queryFn" | "queryKey">;
|
104
|
-
}) {
|
105
|
-
const { id } = useWalletContext();
|
106
|
-
const imageQuery = useQuery({
|
107
|
-
queryKey: ["walletIcon", id],
|
108
|
-
queryFn: async () => fetchWalletImage({ id }),
|
109
|
-
...props.queryOptions,
|
110
|
-
});
|
111
|
-
return imageQuery;
|
112
|
-
}
|
113
|
-
|
114
|
-
/**
|
115
|
-
* @internal Exported for tests only
|
116
|
-
*/
|
117
|
-
export async function fetchWalletImage(props: {
|
118
|
-
id: WalletId;
|
119
|
-
}) {
|
120
|
-
return getWalletInfo(props.id, true);
|
121
|
-
}
|
122
|
-
|
123
|
-
interface SocialIconProps
|
99
|
+
export interface SocialIconProps
|
124
100
|
extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, "src"> {
|
125
101
|
provider: AuthOption | string;
|
126
102
|
}
|
@@ -1,8 +1,12 @@
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
2
2
|
import { render, waitFor } from "~test/react-render.js";
|
3
3
|
import { getFunctionId } from "../../../../../utils/function-id.js";
|
4
|
-
import {
|
5
|
-
|
4
|
+
import {
|
5
|
+
fetchWalletName,
|
6
|
+
getQueryKeys,
|
7
|
+
} from "../../../../core/utils/walletname.js";
|
8
|
+
import { WalletProvider } from "../../../../core/wallet/provider.js";
|
9
|
+
import { WalletName } from "./name.js";
|
6
10
|
|
7
11
|
describe.runIf(process.env.TW_SECRET_KEY)("WalletName", () => {
|
8
12
|
it("fetchWalletName: should fetch wallet name from id", async () => {
|
@@ -1,11 +1,8 @@
|
|
1
1
|
"use client";
|
2
2
|
|
3
|
-
import {
|
3
|
+
import type { UseQueryOptions } from "@tanstack/react-query";
|
4
4
|
import type { JSX } from "react";
|
5
|
-
import {
|
6
|
-
import { getWalletInfo } from "../../../../../wallets/__generated__/getWalletInfo.js";
|
7
|
-
import type { WalletId } from "../../../../../wallets/wallet-types.js";
|
8
|
-
import { useWalletContext } from "./provider.js";
|
5
|
+
import { useWalletName } from "../../../../core/utils/walletname.js";
|
9
6
|
|
10
7
|
/**
|
11
8
|
* Props for the WalletName component
|
@@ -115,50 +112,3 @@ export function WalletName({
|
|
115
112
|
}
|
116
113
|
return <span {...restProps}>{nameQuery.data}</span>;
|
117
114
|
}
|
118
|
-
|
119
|
-
/**
|
120
|
-
* @internal
|
121
|
-
*/
|
122
|
-
function useWalletName(props: {
|
123
|
-
formatFn?: (str: string) => string;
|
124
|
-
queryOptions?: Omit<UseQueryOptions<string>, "queryFn" | "queryKey">;
|
125
|
-
}) {
|
126
|
-
const { id } = useWalletContext();
|
127
|
-
const nameQuery = useQuery({
|
128
|
-
queryKey: getQueryKeys({ id, formatFn: props.formatFn }),
|
129
|
-
queryFn: async () => fetchWalletName({ id, formatFn: props.formatFn }),
|
130
|
-
...props.queryOptions,
|
131
|
-
});
|
132
|
-
return nameQuery;
|
133
|
-
}
|
134
|
-
|
135
|
-
/**
|
136
|
-
* @internal Exported for tests only
|
137
|
-
*/
|
138
|
-
export function getQueryKeys(props: {
|
139
|
-
id: WalletId;
|
140
|
-
formatFn?: (str: string) => string;
|
141
|
-
}) {
|
142
|
-
if (typeof props.formatFn === "function") {
|
143
|
-
return [
|
144
|
-
"walletName",
|
145
|
-
props.id,
|
146
|
-
{ resolver: getFunctionId(props.formatFn) },
|
147
|
-
] as const;
|
148
|
-
}
|
149
|
-
return ["walletName", props.id] as const;
|
150
|
-
}
|
151
|
-
|
152
|
-
/**
|
153
|
-
* @internal Exported for tests only
|
154
|
-
*/
|
155
|
-
export async function fetchWalletName(props: {
|
156
|
-
id: WalletId;
|
157
|
-
formatFn?: (str: string) => string;
|
158
|
-
}) {
|
159
|
-
const info = await getWalletInfo(props.id);
|
160
|
-
if (typeof props.formatFn === "function") {
|
161
|
-
return props.formatFn(info.name);
|
162
|
-
}
|
163
|
-
return info.name;
|
164
|
-
}
|
package/src/version.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const version = "5.
|
1
|
+
export const version = "5.87.1";
|
@@ -24,6 +24,7 @@ export type ConnectionManager = ReturnType<typeof createConnectionManager>;
|
|
24
24
|
export type ConnectManagerOptions = {
|
25
25
|
client: ThirdwebClient;
|
26
26
|
accountAbstraction?: SmartWalletOptions;
|
27
|
+
setWalletAsActive?: boolean;
|
27
28
|
onConnect?: (wallet: Wallet) => void;
|
28
29
|
};
|
29
30
|
|
@@ -146,7 +147,9 @@ export function createConnectionManager(storage: AsyncStorage) {
|
|
146
147
|
// add personal wallet to connected wallets list even if it's not the active one
|
147
148
|
addConnectedWallet(wallet);
|
148
149
|
|
149
|
-
|
150
|
+
if (options?.setWalletAsActive !== false) {
|
151
|
+
handleSetActiveWallet(activeWallet);
|
152
|
+
}
|
150
153
|
|
151
154
|
wallet.subscribe("accountChanged", async () => {
|
152
155
|
// We reimplement connect here to prevent memory leaks
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/prebuilt/Account/provider.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AAgDb,0CAaC;AAKD,8CAQC;;AAtED,iCAAkD;AAmBlD,MAAM,sBAAsB,GAAG,eAAe,CAAC,IAAA,qBAAa,EAE1D,SAAS,CAAC,CAAC;AAEb;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,SAAgB,eAAe,CAC7B,KAAoD;IAEpD,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CACb,iGAAiG,CAClG,CAAC;IACJ,CAAC;IACD,OAAO,CACL,uBAAC,sBAAsB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAC1C,KAAK,CAAC,QAAQ,GACiB,CACnC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAgB,iBAAiB;IAC/B,MAAM,GAAG,GAAG,IAAA,kBAAU,EAAC,sBAAsB,CAAC,CAAC;IAC/C,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CACb,oIAAoI,CACrI,CAAC;IACJ,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/prebuilt/Wallet/provider.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;AA0Cb,wCAQC;AAKD,4CAQC;;AA5DD,iCAAkD;AAYlD;;GAEG;AACU,QAAA,qBAAqB,GAAmB,IAAA,qBAAa,EAEhE,SAAS,CAAC,CAAC;AAEb;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAgB,cAAc,CAC5B,KAAmD;IAEnD,OAAO,CACL,uBAAC,6BAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACzC,KAAK,CAAC,QAAQ,GACgB,CAClC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAgB,gBAAgB;IAC9B,MAAM,GAAG,GAAG,IAAA,kBAAU,EAAC,6BAAqB,CAAC,CAAC;IAC9C,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CACb,6HAA6H,CAC9H,CAAC;IACJ,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|