thirdweb 5.48.0-nightly-cbd6fd87d0120c6013ef354fe8ff22293e4c08e2-20240820000346 → 5.48.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/cjs/adapters/ethers5.js +87 -1
- package/dist/cjs/adapters/ethers5.js.map +1 -1
- package/dist/cjs/adapters/ethers6.js +85 -15
- package/dist/cjs/adapters/ethers6.js.map +1 -1
- package/dist/cjs/adapters/viem.js +117 -43
- package/dist/cjs/adapters/viem.js.map +1 -1
- package/dist/cjs/contract/actions/compiler-metadata.js.map +1 -1
- package/dist/cjs/react/core/design-system/index.js +1 -0
- package/dist/cjs/react/core/design-system/index.js.map +1 -1
- package/dist/cjs/react/core/hooks/transaction/useSendTransaction.js +56 -8
- package/dist/cjs/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Details.js +61 -52
- package/dist/cjs/react/web/ui/ConnectWallet/Details.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/MenuButton.js +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/MenuButton.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/WalletSelectorButton.js +1 -2
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/WalletSelectorButton.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatFlow.js +9 -9
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatFlow.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Details/WalletManagerScreen.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Details/WalletManagerScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/LinkedProfilesScreen.js +7 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/LinkedProfilesScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/components/ChainIcon.js +3 -2
- package/dist/cjs/react/web/ui/components/ChainIcon.js.map +1 -1
- package/dist/cjs/react/web/ui/components/CopyAddress.js +22 -0
- package/dist/cjs/react/web/ui/components/CopyAddress.js.map +1 -0
- package/dist/cjs/react/web/ui/components/IconContainer.js +25 -0
- package/dist/cjs/react/web/ui/components/IconContainer.js.map +1 -0
- package/dist/cjs/react/web/ui/components/Modal.js +1 -1
- package/dist/cjs/react/web/ui/components/Modal.js.map +1 -1
- package/dist/cjs/react/web/ui/components/WalletImage.js +4 -11
- package/dist/cjs/react/web/ui/components/WalletImage.js.map +1 -1
- package/dist/cjs/react/web/ui/components/formElements.js +3 -3
- package/dist/cjs/react/web/ui/components/formElements.js.map +1 -1
- package/dist/cjs/react/web/wallets/in-app/CountrySelector.js +1 -3
- package/dist/cjs/react/web/wallets/in-app/CountrySelector.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/cjs/wallets/custom/smart/image.js +1 -1
- package/dist/cjs/wallets/custom/smart/image.js.map +1 -1
- package/dist/esm/adapters/ethers5.js +87 -1
- package/dist/esm/adapters/ethers5.js.map +1 -1
- package/dist/esm/adapters/ethers6.js +85 -15
- package/dist/esm/adapters/ethers6.js.map +1 -1
- package/dist/esm/adapters/viem.js +117 -43
- package/dist/esm/adapters/viem.js.map +1 -1
- package/dist/esm/contract/actions/compiler-metadata.js.map +1 -1
- package/dist/esm/react/core/design-system/index.js +1 -0
- package/dist/esm/react/core/design-system/index.js.map +1 -1
- package/dist/esm/react/core/hooks/transaction/useSendTransaction.js +55 -8
- package/dist/esm/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/Details.js +63 -54
- package/dist/esm/react/web/ui/ConnectWallet/Details.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/MenuButton.js +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/MenuButton.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/WalletSelectorButton.js +1 -2
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/WalletSelectorButton.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatFlow.js +9 -9
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatFlow.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Details/WalletManagerScreen.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Details/WalletManagerScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/LinkedProfilesScreen.js +7 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/LinkedProfilesScreen.js.map +1 -1
- package/dist/esm/react/web/ui/components/ChainIcon.js +3 -2
- package/dist/esm/react/web/ui/components/ChainIcon.js.map +1 -1
- package/dist/esm/react/web/ui/components/CopyAddress.js +18 -0
- package/dist/esm/react/web/ui/components/CopyAddress.js.map +1 -0
- package/dist/esm/react/web/ui/components/IconContainer.js +21 -0
- package/dist/esm/react/web/ui/components/IconContainer.js.map +1 -0
- package/dist/esm/react/web/ui/components/Modal.js +1 -1
- package/dist/esm/react/web/ui/components/Modal.js.map +1 -1
- package/dist/esm/react/web/ui/components/WalletImage.js +1 -8
- package/dist/esm/react/web/ui/components/WalletImage.js.map +1 -1
- package/dist/esm/react/web/ui/components/formElements.js +3 -3
- package/dist/esm/react/web/ui/components/formElements.js.map +1 -1
- package/dist/esm/react/web/wallets/in-app/CountrySelector.js +2 -4
- package/dist/esm/react/web/wallets/in-app/CountrySelector.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/esm/wallets/custom/smart/image.js +1 -1
- package/dist/esm/wallets/custom/smart/image.js.map +1 -1
- package/dist/types/adapters/ethers5.d.ts +87 -1
- package/dist/types/adapters/ethers5.d.ts.map +1 -1
- package/dist/types/adapters/ethers6.d.ts +85 -15
- package/dist/types/adapters/ethers6.d.ts.map +1 -1
- package/dist/types/adapters/viem.d.ts +117 -43
- package/dist/types/adapters/viem.d.ts.map +1 -1
- package/dist/types/contract/actions/compiler-metadata.d.ts +7 -1
- package/dist/types/contract/actions/compiler-metadata.d.ts.map +1 -1
- package/dist/types/react/core/design-system/index.d.ts +1 -0
- package/dist/types/react/core/design-system/index.d.ts.map +1 -1
- package/dist/types/react/core/hooks/transaction/useSendTransaction.d.ts +1 -0
- package/dist/types/react/core/hooks/transaction/useSendTransaction.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Details.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/MenuButton.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/WalletSelectorButton.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/LinkedProfilesScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/ChainIcon.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/CopyAddress.d.ts +7 -0
- package/dist/types/react/web/ui/components/CopyAddress.d.ts.map +1 -0
- package/dist/types/react/web/ui/components/IconContainer.d.ts +10 -0
- package/dist/types/react/web/ui/components/IconContainer.d.ts.map +1 -0
- package/dist/types/react/web/ui/components/WalletImage.d.ts.map +1 -1
- package/dist/types/react/web/wallets/in-app/CountrySelector.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/custom/smart/image.d.ts +1 -1
- package/dist/types/wallets/custom/smart/image.d.ts.map +1 -1
- package/dist/types/wallets/in-app/core/authentication/types.d.ts +1 -1
- package/dist/types/wallets/in-app/core/authentication/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/adapters/ethers5.ts +87 -1
- package/src/adapters/ethers6.ts +85 -15
- package/src/adapters/viem.ts +117 -44
- package/src/contract/actions/compiler-metadata.ts +4 -2
- package/src/react/core/design-system/index.ts +1 -0
- package/src/react/core/hooks/transaction/useSendTransaction.ts +65 -8
- package/src/react/web/ui/ConnectWallet/Details.tsx +157 -157
- package/src/react/web/ui/ConnectWallet/MenuButton.tsx +0 -1
- package/src/react/web/ui/ConnectWallet/screens/Buy/WalletSelectorButton.tsx +0 -6
- package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatFlow.tsx +10 -10
- package/src/react/web/ui/ConnectWallet/screens/Details/WalletManagerScreen.tsx +5 -6
- package/src/react/web/ui/ConnectWallet/screens/LinkedProfilesScreen.tsx +21 -7
- package/src/react/web/ui/components/ChainIcon.tsx +4 -3
- package/src/react/web/ui/components/CopyAddress.tsx +34 -0
- package/src/react/web/ui/components/IconContainer.tsx +31 -0
- package/src/react/web/ui/components/Modal.tsx +1 -1
- package/src/react/web/ui/components/WalletImage.tsx +1 -8
- package/src/react/web/ui/components/formElements.tsx +3 -3
- package/src/react/web/wallets/in-app/CountrySelector.tsx +2 -8
- package/src/version.ts +1 -1
- package/src/wallets/custom/smart/image.ts +1 -1
- package/src/wallets/in-app/core/authentication/types.ts +1 -1
@@ -0,0 +1,31 @@
|
|
1
|
+
import type { ReactNode } from "react";
|
2
|
+
import { useCustomTheme } from "../../../core/design-system/CustomThemeProvider.js";
|
3
|
+
|
4
|
+
/**
|
5
|
+
* @internal
|
6
|
+
*/
|
7
|
+
export const IconContainer: React.FC<{
|
8
|
+
children: ReactNode | ReactNode[];
|
9
|
+
padding?: string;
|
10
|
+
style?: React.CSSProperties;
|
11
|
+
}> = (props) => {
|
12
|
+
const theme = useCustomTheme();
|
13
|
+
return (
|
14
|
+
<div
|
15
|
+
style={{
|
16
|
+
position: "relative",
|
17
|
+
overflow: "hidden",
|
18
|
+
display: "flex",
|
19
|
+
justifyItems: "center",
|
20
|
+
flexShrink: 0,
|
21
|
+
alignItems: "center",
|
22
|
+
padding: props.padding ?? "6px",
|
23
|
+
borderRadius: "100%",
|
24
|
+
border: `1px solid ${theme.colors.borderColor}`,
|
25
|
+
...props.style,
|
26
|
+
}}
|
27
|
+
>
|
28
|
+
{props.children}
|
29
|
+
</div>
|
30
|
+
);
|
31
|
+
};
|
@@ -114,7 +114,7 @@ export const Modal: React.FC<{
|
|
114
114
|
{!props.hideCloseIcon && (
|
115
115
|
<CrossContainer>
|
116
116
|
<Dialog.Close asChild>
|
117
|
-
<IconButton type="button" aria-label="Close">
|
117
|
+
<IconButton autoFocus type="button" aria-label="Close">
|
118
118
|
<Cross2Icon
|
119
119
|
width={iconSize.md}
|
120
120
|
height={iconSize.md}
|
@@ -4,7 +4,6 @@ import type { ThirdwebClient } from "../../../../client/client.js";
|
|
4
4
|
import { webLocalStorage } from "../../../../utils/storage/webStorage.js";
|
5
5
|
import { getWalletInfo } from "../../../../wallets/__generated__/getWalletInfo.js";
|
6
6
|
import { getInstalledWalletProviders } from "../../../../wallets/injected/mipdStore.js";
|
7
|
-
import { getStoredActiveWalletId } from "../../../../wallets/manager/index.js";
|
8
7
|
import type { WalletId } from "../../../../wallets/wallet-types.js";
|
9
8
|
import { radius } from "../../../core/design-system/index.js";
|
10
9
|
import { useActiveWallet } from "../../../core/hooks/wallets/useActiveWallet.js";
|
@@ -33,13 +32,7 @@ export function WalletImage(props: {
|
|
33
32
|
// show auth provider icon for in-app wallets
|
34
33
|
// show the admin EOA icon for smart
|
35
34
|
const storage = webLocalStorage;
|
36
|
-
|
37
|
-
if (props.id === "smart") {
|
38
|
-
const storedId = await getStoredActiveWalletId(storage);
|
39
|
-
if (storedId) {
|
40
|
-
activeEOAId = storedId;
|
41
|
-
}
|
42
|
-
}
|
35
|
+
const activeEOAId = props.id;
|
43
36
|
let image: string | undefined;
|
44
37
|
|
45
38
|
if (
|
@@ -110,16 +110,16 @@ export const InputContainer = /* @__PURE__ */ StyledDiv(() => {
|
|
110
110
|
return {
|
111
111
|
display: "flex",
|
112
112
|
borderRadius: radius.md,
|
113
|
-
boxShadow: `0 0 0px
|
113
|
+
boxShadow: `0 0 0px 1px ${theme.colors.borderColor}`,
|
114
114
|
"&:focus-within": {
|
115
|
-
boxShadow: `0 0 0px
|
115
|
+
boxShadow: `0 0 0px 1px ${theme.colors.accentText}`,
|
116
116
|
},
|
117
117
|
"input:focus": {
|
118
118
|
boxShadow: "none",
|
119
119
|
},
|
120
120
|
// show error ring on container instead of input
|
121
121
|
"&[data-error='true']": {
|
122
|
-
boxShadow: `0 0 0px
|
122
|
+
boxShadow: `0 0 0px 1px ${theme.colors.danger}`,
|
123
123
|
},
|
124
124
|
};
|
125
125
|
});
|
@@ -2,11 +2,7 @@
|
|
2
2
|
import { useQuery } from "@tanstack/react-query";
|
3
3
|
import { useRef } from "react";
|
4
4
|
import { useCustomTheme } from "../../../core/design-system/CustomThemeProvider.js";
|
5
|
-
import {
|
6
|
-
fontSize,
|
7
|
-
radius,
|
8
|
-
spacing,
|
9
|
-
} from "../../../core/design-system/index.js";
|
5
|
+
import { radius, spacing } from "../../../core/design-system/index.js";
|
10
6
|
import { StyledOption, StyledSelect } from "../../ui/design-system/elements.js";
|
11
7
|
|
12
8
|
export function CountrySelector({
|
@@ -47,8 +43,7 @@ export function CountrySelector({
|
|
47
43
|
setCountryCode(e.target.value);
|
48
44
|
}}
|
49
45
|
style={{
|
50
|
-
|
51
|
-
paddingRight: "0",
|
46
|
+
padding: `${spacing.sm} ${spacing.md}`,
|
52
47
|
}}
|
53
48
|
>
|
54
49
|
<Option
|
@@ -89,7 +84,6 @@ const Option = /* @__PURE__ */ StyledOption(() => {
|
|
89
84
|
const Select = /* @__PURE__ */ StyledSelect((_) => {
|
90
85
|
const theme = useCustomTheme();
|
91
86
|
return {
|
92
|
-
fontSize: fontSize.sm,
|
93
87
|
display: "block",
|
94
88
|
padding: spacing.sm,
|
95
89
|
boxSizing: "border-box",
|
package/src/version.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const version = "5.48.0
|
1
|
+
export const version = "5.48.0";
|
@@ -1,4 +1,4 @@
|
|
1
1
|
const image =
|
2
|
-
"data:image/svg+xml;base64,
|
2
|
+
"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaW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