thirdweb 5.76.0 → 5.76.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/react/core/hooks/wallets/useAddConnectedWallet.js +1 -1
- package/dist/cjs/react/core/hooks/wallets/useAddConnectedWallet.js.map +1 -1
- package/dist/cjs/react/core/hooks/wallets/useAutoConnect.js +1 -1
- package/dist/cjs/react/core/hooks/wallets/useAutoConnect.js.map +1 -1
- package/dist/cjs/react/core/utils/wallet.js +2 -1
- package/dist/cjs/react/core/utils/wallet.js.map +1 -1
- package/dist/cjs/react/native/hooks/wallets/useLinkProfile.js +14 -4
- package/dist/cjs/react/native/hooks/wallets/useLinkProfile.js.map +1 -1
- package/dist/cjs/react/native/hooks/wallets/useProfiles.js +15 -6
- package/dist/cjs/react/native/hooks/wallets/useProfiles.js.map +1 -1
- package/dist/cjs/react/web/hooks/wallets/useLinkProfile.js +14 -4
- package/dist/cjs/react/web/hooks/wallets/useLinkProfile.js.map +1 -1
- package/dist/cjs/react/web/hooks/wallets/useProfiles.js +15 -6
- package/dist/cjs/react/web/hooks/wallets/useProfiles.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/locale/br.js +120 -0
- package/dist/cjs/react/web/ui/ConnectWallet/locale/br.js.map +1 -0
- package/dist/cjs/react/web/ui/ConnectWallet/locale/getConnectLocale.js +3 -0
- package/dist/cjs/react/web/ui/ConnectWallet/locale/getConnectLocale.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/LinkProfileScreen.js +6 -2
- package/dist/cjs/react/web/ui/ConnectWallet/screens/LinkProfileScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/prebuilt/Account/avatar.js +6 -1
- package/dist/cjs/react/web/ui/prebuilt/Account/avatar.js.map +1 -1
- package/dist/cjs/react/web/ui/prebuilt/Account/blobbie.js +1 -0
- package/dist/cjs/react/web/ui/prebuilt/Account/blobbie.js.map +1 -1
- package/dist/cjs/react/web/ui/prebuilt/Account/name.js +6 -1
- package/dist/cjs/react/web/ui/prebuilt/Account/name.js.map +1 -1
- package/dist/cjs/react/web/ui/prebuilt/Account/provider.js.map +1 -1
- package/dist/cjs/react/web/ui/prebuilt/Chain/icon.js +1 -0
- package/dist/cjs/react/web/ui/prebuilt/Chain/icon.js.map +1 -1
- package/dist/cjs/react/web/ui/prebuilt/NFT/media.js +1 -0
- package/dist/cjs/react/web/ui/prebuilt/NFT/media.js.map +1 -1
- package/dist/cjs/react/web/ui/prebuilt/NFT/name.js +1 -0
- package/dist/cjs/react/web/ui/prebuilt/NFT/name.js.map +1 -1
- package/dist/cjs/react/web/ui/prebuilt/NFT/provider.js +1 -0
- package/dist/cjs/react/web/ui/prebuilt/NFT/provider.js.map +1 -1
- package/dist/cjs/react/web/ui/prebuilt/Token/icon.js +1 -0
- package/dist/cjs/react/web/ui/prebuilt/Token/icon.js.map +1 -1
- package/dist/cjs/react/web/wallets/injected/locale/br.js +27 -0
- package/dist/cjs/react/web/wallets/injected/locale/br.js.map +1 -0
- package/dist/cjs/react/web/wallets/injected/locale/getInjectedWalletLocale.js +3 -0
- package/dist/cjs/react/web/wallets/injected/locale/getInjectedWalletLocale.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/locale/br.js +59 -0
- package/dist/cjs/react/web/wallets/shared/locale/br.js.map +1 -0
- package/dist/cjs/react/web/wallets/shared/locale/getConnectLocale.js +3 -0
- package/dist/cjs/react/web/wallets/shared/locale/getConnectLocale.js.map +1 -1
- package/dist/cjs/react/web/wallets/smartWallet/locale/br.js +13 -0
- package/dist/cjs/react/web/wallets/smartWallet/locale/br.js.map +1 -0
- package/dist/cjs/react/web/wallets/smartWallet/locale/getSmartWalletLocale.js +3 -0
- package/dist/cjs/react/web/wallets/smartWallet/locale/getSmartWalletLocale.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/wallets/manager/index.js +3 -2
- package/dist/cjs/wallets/manager/index.js.map +1 -1
- package/dist/esm/react/core/hooks/wallets/useAddConnectedWallet.js +1 -1
- package/dist/esm/react/core/hooks/wallets/useAddConnectedWallet.js.map +1 -1
- package/dist/esm/react/core/hooks/wallets/useAutoConnect.js +1 -1
- package/dist/esm/react/core/hooks/wallets/useAutoConnect.js.map +1 -1
- package/dist/esm/react/core/utils/wallet.js +2 -1
- package/dist/esm/react/core/utils/wallet.js.map +1 -1
- package/dist/esm/react/native/hooks/wallets/useLinkProfile.js +15 -5
- package/dist/esm/react/native/hooks/wallets/useLinkProfile.js.map +1 -1
- package/dist/esm/react/native/hooks/wallets/useProfiles.js +15 -6
- package/dist/esm/react/native/hooks/wallets/useProfiles.js.map +1 -1
- package/dist/esm/react/web/hooks/wallets/useLinkProfile.js +15 -5
- package/dist/esm/react/web/hooks/wallets/useLinkProfile.js.map +1 -1
- package/dist/esm/react/web/hooks/wallets/useProfiles.js +15 -6
- package/dist/esm/react/web/hooks/wallets/useProfiles.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/locale/br.js +118 -0
- package/dist/esm/react/web/ui/ConnectWallet/locale/br.js.map +1 -0
- package/dist/esm/react/web/ui/ConnectWallet/locale/getConnectLocale.js +3 -0
- package/dist/esm/react/web/ui/ConnectWallet/locale/getConnectLocale.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/LinkProfileScreen.js +6 -2
- package/dist/esm/react/web/ui/ConnectWallet/screens/LinkProfileScreen.js.map +1 -1
- package/dist/esm/react/web/ui/prebuilt/Account/avatar.js +6 -1
- package/dist/esm/react/web/ui/prebuilt/Account/avatar.js.map +1 -1
- package/dist/esm/react/web/ui/prebuilt/Account/blobbie.js +1 -0
- package/dist/esm/react/web/ui/prebuilt/Account/blobbie.js.map +1 -1
- package/dist/esm/react/web/ui/prebuilt/Account/name.js +6 -1
- package/dist/esm/react/web/ui/prebuilt/Account/name.js.map +1 -1
- package/dist/esm/react/web/ui/prebuilt/Account/provider.js.map +1 -1
- package/dist/esm/react/web/ui/prebuilt/Chain/icon.js +1 -0
- package/dist/esm/react/web/ui/prebuilt/Chain/icon.js.map +1 -1
- package/dist/esm/react/web/ui/prebuilt/NFT/media.js +1 -0
- package/dist/esm/react/web/ui/prebuilt/NFT/media.js.map +1 -1
- package/dist/esm/react/web/ui/prebuilt/NFT/name.js +1 -0
- package/dist/esm/react/web/ui/prebuilt/NFT/name.js.map +1 -1
- package/dist/esm/react/web/ui/prebuilt/NFT/provider.js +1 -0
- package/dist/esm/react/web/ui/prebuilt/NFT/provider.js.map +1 -1
- package/dist/esm/react/web/ui/prebuilt/Token/icon.js +1 -0
- package/dist/esm/react/web/ui/prebuilt/Token/icon.js.map +1 -1
- package/dist/esm/react/web/wallets/injected/locale/br.js +25 -0
- package/dist/esm/react/web/wallets/injected/locale/br.js.map +1 -0
- package/dist/esm/react/web/wallets/injected/locale/getInjectedWalletLocale.js +3 -0
- package/dist/esm/react/web/wallets/injected/locale/getInjectedWalletLocale.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/locale/br.js +57 -0
- package/dist/esm/react/web/wallets/shared/locale/br.js.map +1 -0
- package/dist/esm/react/web/wallets/shared/locale/getConnectLocale.js +3 -0
- package/dist/esm/react/web/wallets/shared/locale/getConnectLocale.js.map +1 -1
- package/dist/esm/react/web/wallets/smartWallet/locale/br.js +11 -0
- package/dist/esm/react/web/wallets/smartWallet/locale/br.js.map +1 -0
- package/dist/esm/react/web/wallets/smartWallet/locale/getSmartWalletLocale.js +3 -0
- package/dist/esm/react/web/wallets/smartWallet/locale/getSmartWalletLocale.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/wallets/manager/index.js +3 -2
- package/dist/esm/wallets/manager/index.js.map +1 -1
- package/dist/types/react/core/hooks/wallets/useAddConnectedWallet.d.ts +1 -1
- package/dist/types/react/core/hooks/wallets/useAddConnectedWallet.d.ts.map +1 -1
- package/dist/types/react/core/utils/wallet.d.ts.map +1 -1
- package/dist/types/react/native/hooks/wallets/useLinkProfile.d.ts +1 -1
- package/dist/types/react/native/hooks/wallets/useLinkProfile.d.ts.map +1 -1
- package/dist/types/react/native/hooks/wallets/useProfiles.d.ts.map +1 -1
- package/dist/types/react/web/hooks/wallets/useLinkProfile.d.ts.map +1 -1
- package/dist/types/react/web/hooks/wallets/useProfiles.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/Modal/ConnectEmbed.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/WalletEntryButton.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/locale/br.d.ts +4 -0
- package/dist/types/react/web/ui/ConnectWallet/locale/br.d.ts.map +1 -0
- package/dist/types/react/web/ui/ConnectWallet/locale/getConnectLocale.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/LinkProfileScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/Drawer.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/FadeIn.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/Modal.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/Overlay.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/basic.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/buttons.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/formElements.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/modalElements.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/text.d.ts.map +1 -1
- package/dist/types/react/web/ui/design-system/animations.d.ts +18 -3
- package/dist/types/react/web/ui/design-system/animations.d.ts.map +1 -1
- package/dist/types/react/web/ui/design-system/elements.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/blobbie.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/Account/name.d.ts +1 -1
- package/dist/types/react/web/ui/prebuilt/Account/name.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/Account/provider.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/Chain/icon.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/NFT/media.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/NFT/name.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/NFT/provider.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/Token/icon.d.ts.map +1 -1
- package/dist/types/react/web/ui/types.d.ts +1 -1
- package/dist/types/react/web/ui/types.d.ts.map +1 -1
- package/dist/types/react/web/wallets/injected/locale/br.d.ts +7 -0
- package/dist/types/react/web/wallets/injected/locale/br.d.ts.map +1 -0
- package/dist/types/react/web/wallets/injected/locale/getInjectedWalletLocale.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/locale/br.d.ts +58 -0
- package/dist/types/react/web/wallets/shared/locale/br.d.ts.map +1 -0
- package/dist/types/react/web/wallets/shared/locale/getConnectLocale.d.ts.map +1 -1
- package/dist/types/react/web/wallets/smartWallet/locale/br.d.ts +4 -0
- package/dist/types/react/web/wallets/smartWallet/locale/br.d.ts.map +1 -0
- package/dist/types/react/web/wallets/smartWallet/locale/getSmartWalletLocale.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/wallets/manager/index.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/react/core/hooks/wallets/useAddConnectedWallet.ts +1 -1
- package/src/react/core/hooks/wallets/useAutoConnect.ts +1 -1
- package/src/react/core/utils/wallet.test.ts +77 -0
- package/src/react/core/utils/wallet.ts +2 -1
- package/src/react/native/hooks/wallets/useLinkProfile.ts +17 -8
- package/src/react/native/hooks/wallets/useProfiles.ts +17 -8
- package/src/react/web/hooks/wallets/useLinkProfile.ts +16 -7
- package/src/react/web/hooks/wallets/useProfiles.ts +17 -8
- package/src/react/web/ui/ConnectWallet/locale/br.ts +124 -0
- package/src/react/web/ui/ConnectWallet/locale/getConnectLocale.ts +3 -0
- package/src/react/web/ui/ConnectWallet/screens/LinkProfileScreen.tsx +6 -2
- package/src/react/web/ui/prebuilt/Account/avatar.tsx +6 -1
- package/src/react/web/ui/prebuilt/Account/blobbie.tsx +2 -0
- package/src/react/web/ui/prebuilt/Account/name.tsx +7 -2
- package/src/react/web/ui/prebuilt/Account/provider.tsx +1 -0
- package/src/react/web/ui/prebuilt/Chain/icon.tsx +2 -0
- package/src/react/web/ui/prebuilt/NFT/media.tsx +2 -0
- package/src/react/web/ui/prebuilt/NFT/name.tsx +2 -0
- package/src/react/web/ui/prebuilt/NFT/provider.tsx +2 -0
- package/src/react/web/ui/prebuilt/Token/icon.tsx +2 -0
- package/src/react/web/ui/types.ts +2 -1
- package/src/react/web/wallets/injected/locale/br.ts +27 -0
- package/src/react/web/wallets/injected/locale/getInjectedWalletLocale.ts +3 -0
- package/src/react/web/wallets/shared/locale/br.ts +62 -0
- package/src/react/web/wallets/shared/locale/getConnectLocale.ts +3 -0
- package/src/react/web/wallets/smartWallet/locale/br.ts +13 -0
- package/src/react/web/wallets/smartWallet/locale/getSmartWalletLocale.ts +3 -0
- package/src/version.ts +1 -1
- package/src/wallets/manager/index.ts +6 -2
@@ -1,9 +1,9 @@
|
|
1
|
-
import { useMutation } from "@tanstack/react-query";
|
1
|
+
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
2
2
|
import { isEcosystemWallet } from "../../../../wallets/ecosystem/is-ecosystem-wallet.js";
|
3
3
|
import type { AuthArgsType } from "../../../../wallets/in-app/core/authentication/types.js";
|
4
4
|
import type { Ecosystem } from "../../../../wallets/in-app/core/wallet/types.js";
|
5
5
|
import { linkProfile } from "../../../../wallets/in-app/web/lib/auth/index.js";
|
6
|
-
import {
|
6
|
+
import { useConnectedWallets } from "../../../core/hooks/wallets/useConnectedWallets.js";
|
7
7
|
|
8
8
|
/**
|
9
9
|
* Links a web2 or web3 profile to the connected in-app or ecosystem account.
|
@@ -77,16 +77,25 @@ import { useAdminWallet } from "../../../core/hooks/wallets/useAdminWallet.js";
|
|
77
77
|
* @wallet
|
78
78
|
*/
|
79
79
|
export function useLinkProfile() {
|
80
|
-
const
|
80
|
+
const wallets = useConnectedWallets();
|
81
|
+
const queryClient = useQueryClient();
|
81
82
|
return useMutation({
|
82
83
|
mutationKey: ["profiles"],
|
83
|
-
mutationFn: async (options:
|
84
|
-
const
|
85
|
-
|
86
|
-
|
87
|
-
|
84
|
+
mutationFn: async (options: AuthArgsType) => {
|
85
|
+
const ecosystemWallet = wallets.find((w) => isEcosystemWallet(w));
|
86
|
+
const ecosystem: Ecosystem | undefined = ecosystemWallet
|
87
|
+
? {
|
88
|
+
id: ecosystemWallet.id,
|
89
|
+
partnerId: ecosystemWallet.getConfig()?.partnerId,
|
90
|
+
}
|
91
|
+
: undefined;
|
88
92
|
const optionsWithEcosystem = { ...options, ecosystem } as AuthArgsType;
|
89
93
|
return linkProfile(optionsWithEcosystem);
|
90
94
|
},
|
95
|
+
onSuccess() {
|
96
|
+
setTimeout(() => {
|
97
|
+
queryClient.invalidateQueries({ queryKey: ["profiles"] });
|
98
|
+
}, 500);
|
99
|
+
},
|
91
100
|
});
|
92
101
|
}
|
@@ -4,7 +4,7 @@ import { isEcosystemWallet } from "../../../../wallets/ecosystem/is-ecosystem-wa
|
|
4
4
|
import type { Profile } from "../../../../wallets/in-app/core/authentication/types.js";
|
5
5
|
import type { Ecosystem } from "../../../../wallets/in-app/core/wallet/types.js";
|
6
6
|
import { getProfiles } from "../../../../wallets/in-app/web/lib/auth/index.js";
|
7
|
-
import {
|
7
|
+
import { useConnectedWallets } from "../../../core/hooks/wallets/useConnectedWallets.js";
|
8
8
|
|
9
9
|
/**
|
10
10
|
* Retrieves all linked profiles of the connected in-app or ecosystem account.
|
@@ -29,15 +29,24 @@ import { useAdminWallet } from "../../../core/hooks/wallets/useAdminWallet.js";
|
|
29
29
|
export function useProfiles(args: {
|
30
30
|
client: ThirdwebClient;
|
31
31
|
}): UseQueryResult<Profile[]> {
|
32
|
-
const
|
32
|
+
const wallets = useConnectedWallets();
|
33
|
+
const enabled =
|
34
|
+
wallets.length > 0 &&
|
35
|
+
wallets.some((w) => w.id === "inApp" || isEcosystemWallet(w));
|
33
36
|
return useQuery({
|
34
|
-
queryKey: [
|
35
|
-
|
37
|
+
queryKey: [
|
38
|
+
"profiles",
|
39
|
+
wallets.map((w) => `${w.id}-${w.getAccount()?.address}`),
|
40
|
+
],
|
41
|
+
enabled,
|
36
42
|
queryFn: async () => {
|
37
|
-
const
|
38
|
-
|
39
|
-
|
40
|
-
|
43
|
+
const ecosystemWallet = wallets.find((w) => isEcosystemWallet(w));
|
44
|
+
const ecosystem: Ecosystem | undefined = ecosystemWallet
|
45
|
+
? {
|
46
|
+
id: ecosystemWallet.id,
|
47
|
+
partnerId: ecosystemWallet.getConfig()?.partnerId,
|
48
|
+
}
|
49
|
+
: undefined;
|
41
50
|
return getProfiles({
|
42
51
|
client: args.client,
|
43
52
|
ecosystem,
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { useMutation } from "@tanstack/react-query";
|
1
|
+
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
2
2
|
import { isEcosystemWallet } from "../../../../wallets/ecosystem/is-ecosystem-wallet.js";
|
3
3
|
import type { AuthArgsType } from "../../../../wallets/in-app/core/authentication/types.js";
|
4
4
|
import type { Ecosystem } from "../../../../wallets/in-app/core/wallet/types.js";
|
5
5
|
import { linkProfile } from "../../../../wallets/in-app/web/lib/auth/index.js";
|
6
|
-
import {
|
6
|
+
import { useConnectedWallets } from "../../../core/hooks/wallets/useConnectedWallets.js";
|
7
7
|
|
8
8
|
/**
|
9
9
|
* Links a web2 or web3 profile to the connected in-app or ecosystem account.
|
@@ -76,16 +76,25 @@ import { useAdminWallet } from "../../../core/hooks/wallets/useAdminWallet.js";
|
|
76
76
|
* @wallet
|
77
77
|
*/
|
78
78
|
export function useLinkProfile() {
|
79
|
-
const
|
79
|
+
const wallets = useConnectedWallets();
|
80
|
+
const queryClient = useQueryClient();
|
80
81
|
return useMutation({
|
81
82
|
mutationKey: ["profiles"],
|
82
83
|
mutationFn: async (options: AuthArgsType) => {
|
83
|
-
const
|
84
|
-
|
85
|
-
|
86
|
-
|
84
|
+
const ecosystemWallet = wallets.find((w) => isEcosystemWallet(w));
|
85
|
+
const ecosystem: Ecosystem | undefined = ecosystemWallet
|
86
|
+
? {
|
87
|
+
id: ecosystemWallet.id,
|
88
|
+
partnerId: ecosystemWallet.getConfig()?.partnerId,
|
89
|
+
}
|
90
|
+
: undefined;
|
87
91
|
const optionsWithEcosystem = { ...options, ecosystem } as AuthArgsType;
|
88
92
|
return linkProfile(optionsWithEcosystem);
|
89
93
|
},
|
94
|
+
onSuccess() {
|
95
|
+
setTimeout(() => {
|
96
|
+
queryClient.invalidateQueries({ queryKey: ["profiles"] });
|
97
|
+
}, 500);
|
98
|
+
},
|
90
99
|
});
|
91
100
|
}
|
@@ -4,7 +4,7 @@ import { isEcosystemWallet } from "../../../../wallets/ecosystem/is-ecosystem-wa
|
|
4
4
|
import type { Profile } from "../../../../wallets/in-app/core/authentication/types.js";
|
5
5
|
import type { Ecosystem } from "../../../../wallets/in-app/core/wallet/types.js";
|
6
6
|
import { getProfiles } from "../../../../wallets/in-app/web/lib/auth/index.js";
|
7
|
-
import {
|
7
|
+
import { useConnectedWallets } from "../../../core/hooks/wallets/useConnectedWallets.js";
|
8
8
|
|
9
9
|
/**
|
10
10
|
* Retrieves all linked profiles of the connected in-app or ecosystem account.
|
@@ -29,15 +29,24 @@ import { useAdminWallet } from "../../../core/hooks/wallets/useAdminWallet.js";
|
|
29
29
|
export function useProfiles(args: {
|
30
30
|
client: ThirdwebClient;
|
31
31
|
}): UseQueryResult<Profile[]> {
|
32
|
-
const
|
32
|
+
const wallets = useConnectedWallets();
|
33
|
+
const enabled =
|
34
|
+
wallets.length > 0 &&
|
35
|
+
wallets.some((w) => w.id === "inApp" || isEcosystemWallet(w));
|
33
36
|
return useQuery({
|
34
|
-
queryKey: [
|
35
|
-
|
37
|
+
queryKey: [
|
38
|
+
"profiles",
|
39
|
+
wallets.map((w) => `${w.id}-${w.getAccount()?.address}`),
|
40
|
+
],
|
41
|
+
enabled,
|
36
42
|
queryFn: async () => {
|
37
|
-
const
|
38
|
-
|
39
|
-
|
40
|
-
|
43
|
+
const ecosystemWallet = wallets.find((w) => isEcosystemWallet(w));
|
44
|
+
const ecosystem: Ecosystem | undefined = ecosystemWallet
|
45
|
+
? {
|
46
|
+
id: ecosystemWallet.id,
|
47
|
+
partnerId: ecosystemWallet.getConfig()?.partnerId,
|
48
|
+
}
|
49
|
+
: undefined;
|
41
50
|
return getProfiles({
|
42
51
|
client: args.client,
|
43
52
|
ecosystem,
|
@@ -0,0 +1,124 @@
|
|
1
|
+
import type { ConnectLocale } from "./types.js";
|
2
|
+
|
3
|
+
const connectWalletLocalPtBr: ConnectLocale = {
|
4
|
+
id: "pt_BR",
|
5
|
+
signIn: "Entrar",
|
6
|
+
defaultButtonTitle: "Conectar carteira",
|
7
|
+
connecting: "Conectando",
|
8
|
+
switchNetwork: "Trocar de rede",
|
9
|
+
switchingNetwork: "Trocando de rede",
|
10
|
+
defaultModalTitle: "Conectar",
|
11
|
+
recommended: "Recomendado",
|
12
|
+
installed: "Instalado",
|
13
|
+
continueAsGuest: "Continuar como convidado",
|
14
|
+
connectAWallet: "Conectar uma carteira",
|
15
|
+
newToWallets: "Novo em carteiras?",
|
16
|
+
getStarted: "Começar",
|
17
|
+
guest: "Convidado",
|
18
|
+
send: "Enviar",
|
19
|
+
receive: "Receber",
|
20
|
+
buy: "Comprar",
|
21
|
+
transactions: "Transações",
|
22
|
+
payTransactions: "Transações Fiat",
|
23
|
+
walletTransactions: "Transações de Carteira",
|
24
|
+
viewAllTransactions: "Ver todas as transações",
|
25
|
+
currentNetwork: "Rede atual",
|
26
|
+
switchAccount: "Trocar conta",
|
27
|
+
requestTestnetFunds: "Solicitar fundos para Testnet",
|
28
|
+
backupWallet: "Fazer backup da carteira",
|
29
|
+
guestWalletWarning:
|
30
|
+
"Esta é uma carteira de convidado temporária. Faça um backup se não quiser perder o acesso a ela",
|
31
|
+
switchTo: "Trocar para",
|
32
|
+
connectedToSmartWallet: "carteira inteligente",
|
33
|
+
confirmInWallet: "Confirmar na carteira",
|
34
|
+
disconnectWallet: "Desconectar carteira",
|
35
|
+
copyAddress: "Copiar endereço",
|
36
|
+
personalWallet: "Carteira pessoal",
|
37
|
+
smartWallet: "Carteira inteligente",
|
38
|
+
or: "Ou",
|
39
|
+
goBackButton: "Voltar",
|
40
|
+
passkeys: {
|
41
|
+
title: "Chave de acesso",
|
42
|
+
linkPasskey: "Vincular uma chave de acesso",
|
43
|
+
},
|
44
|
+
welcomeScreen: {
|
45
|
+
defaultTitle: "Sua porta de entrada para o mundo descentralizado",
|
46
|
+
defaultSubtitle: "Conecte uma carteira para começar",
|
47
|
+
},
|
48
|
+
agreement: {
|
49
|
+
prefix: "Ao conectar, você aceita os",
|
50
|
+
termsOfService: "Termos de serviço",
|
51
|
+
and: "e",
|
52
|
+
privacyPolicy: "Política de privacidade",
|
53
|
+
},
|
54
|
+
networkSelector: {
|
55
|
+
title: "Selecionar rede",
|
56
|
+
mainnets: "Redes principais",
|
57
|
+
testnets: "Redes de teste",
|
58
|
+
allNetworks: "Todas",
|
59
|
+
addCustomNetwork: "Adicionar rede personalizada",
|
60
|
+
inputPlaceholder: "Buscar rede ou ID da cadeia",
|
61
|
+
categoryLabel: {
|
62
|
+
recentlyUsed: "Usadas recentemente",
|
63
|
+
popular: "Populares",
|
64
|
+
others: "Outras redes",
|
65
|
+
},
|
66
|
+
loading: "Carregando",
|
67
|
+
failedToSwitch: "Erro ao trocar de rede",
|
68
|
+
},
|
69
|
+
receiveFundsScreen: {
|
70
|
+
title: "Receber fundos",
|
71
|
+
instruction:
|
72
|
+
"Copie o endereço da carteira para enviar fundos para esta carteira",
|
73
|
+
},
|
74
|
+
sendFundsScreen: {
|
75
|
+
title: "Enviar fundos",
|
76
|
+
submitButton: "Enviar",
|
77
|
+
token: "Token",
|
78
|
+
sendTo: "Enviar para",
|
79
|
+
amount: "Quantidade",
|
80
|
+
successMessage: "Transação bem-sucedida",
|
81
|
+
invalidAddress: "Endereço inválido",
|
82
|
+
noTokensFound: "Nenhum token encontrado",
|
83
|
+
searchToken: "Buscar ou colar o endereço do token",
|
84
|
+
transactionFailed: "Transação falhou",
|
85
|
+
transactionRejected: "Transação rejeitada",
|
86
|
+
insufficientFunds: "Fundos insuficientes",
|
87
|
+
selectTokenTitle: "Selecione um Token",
|
88
|
+
sending: "Enviando",
|
89
|
+
},
|
90
|
+
signatureScreen: {
|
91
|
+
instructionScreen: {
|
92
|
+
title: "Entrar",
|
93
|
+
instruction:
|
94
|
+
"Por favor, assine a solicitação de mensagem na sua carteira para continuar",
|
95
|
+
signInButton: "Entrar",
|
96
|
+
disconnectWallet: "Desconectar carteira",
|
97
|
+
},
|
98
|
+
signingScreen: {
|
99
|
+
title: "Entrando",
|
100
|
+
prompt: "Assine a solicitação de assinatura na sua carteira",
|
101
|
+
promptForSafe:
|
102
|
+
"Assine a solicitação de assinatura na sua carteira e aprove a transação no Safe",
|
103
|
+
approveTransactionInSafe: "Aprovar transação no Safe",
|
104
|
+
tryAgain: "Tentar novamente",
|
105
|
+
failedToSignIn: "Erro ao entrar",
|
106
|
+
inProgress: "Aguardando confirmação",
|
107
|
+
},
|
108
|
+
},
|
109
|
+
manageWallet: {
|
110
|
+
title: "Gerenciar Carteira",
|
111
|
+
linkedProfiles: "Perfis vinculados",
|
112
|
+
linkProfile: "Vincular um perfil",
|
113
|
+
connectAnApp: "Conectar um Aplicativo",
|
114
|
+
exportPrivateKey: "Exportar chave privada",
|
115
|
+
},
|
116
|
+
viewFunds: {
|
117
|
+
title: "Ver Fundos",
|
118
|
+
viewNFTs: "Ver NFTs",
|
119
|
+
viewTokens: "Ver Tokens",
|
120
|
+
viewAssets: "Ver Ativos",
|
121
|
+
},
|
122
|
+
};
|
123
|
+
|
124
|
+
export default connectWalletLocalPtBr;
|
@@ -24,6 +24,9 @@ export async function getConnectLocale(localeId: LocaleId) {
|
|
24
24
|
case "fr_FR": {
|
25
25
|
return (await import("./fr.js")).default;
|
26
26
|
}
|
27
|
+
case "pt_BR": {
|
28
|
+
return (await import("./br.js")).default;
|
29
|
+
}
|
27
30
|
default: {
|
28
31
|
return (await import("./en.js")).default;
|
29
32
|
}
|
@@ -43,7 +43,9 @@ export function LinkProfileScreen(props: {
|
|
43
43
|
walletConnect={props.walletConnect}
|
44
44
|
wallet={activeWallet as Wallet<"inApp">}
|
45
45
|
done={() => {
|
46
|
-
|
46
|
+
setTimeout(() => {
|
47
|
+
queryClient.invalidateQueries({ queryKey: ["profiles"] });
|
48
|
+
}, 500);
|
47
49
|
props.onBack();
|
48
50
|
}}
|
49
51
|
connectLocale={props.locale}
|
@@ -67,7 +69,9 @@ export function LinkProfileScreen(props: {
|
|
67
69
|
<EcosystemWalletConnectUI
|
68
70
|
wallet={activeWallet as Wallet<EcosystemWalletId>}
|
69
71
|
done={() => {
|
70
|
-
|
72
|
+
setTimeout(() => {
|
73
|
+
queryClient.invalidateQueries({ queryKey: ["profiles"] });
|
74
|
+
}, 500);
|
71
75
|
props.onBack();
|
72
76
|
}}
|
73
77
|
connectLocale={props.locale}
|
@@ -164,7 +164,12 @@ export function AccountAvatar({
|
|
164
164
|
}: AccountAvatarProps) {
|
165
165
|
const { address, client } = useAccountContext();
|
166
166
|
const avatarQuery = useQuery({
|
167
|
-
queryKey: [
|
167
|
+
queryKey: [
|
168
|
+
"account-avatar",
|
169
|
+
address,
|
170
|
+
{ socialType },
|
171
|
+
{ resolverAddress, resolverChain },
|
172
|
+
],
|
168
173
|
queryFn: async (): Promise<string> => {
|
169
174
|
const [socialData, ensName] = await Promise.all([
|
170
175
|
getSocialProfiles({ address, client }),
|
@@ -57,7 +57,7 @@ export interface AccountNameProps
|
|
57
57
|
/**
|
58
58
|
* Optional `useQuery` params
|
59
59
|
*/
|
60
|
-
queryOptions?: Omit<UseQueryOptions<string>, "
|
60
|
+
queryOptions?: Omit<UseQueryOptions<string>, "queryFn" | "queryKey">;
|
61
61
|
}
|
62
62
|
|
63
63
|
/**
|
@@ -138,7 +138,12 @@ export function AccountName({
|
|
138
138
|
}: AccountNameProps) {
|
139
139
|
const { address, client } = useAccountContext();
|
140
140
|
const nameQuery = useQuery({
|
141
|
-
queryKey: [
|
141
|
+
queryKey: [
|
142
|
+
"account-name",
|
143
|
+
address,
|
144
|
+
{ socialType },
|
145
|
+
{ resolverAddress, resolverChain },
|
146
|
+
],
|
142
147
|
queryFn: async () => {
|
143
148
|
const [socialData, ensName] = await Promise.all([
|
144
149
|
getSocialProfiles({ address, client }),
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import type { InjectedWalletLocale } from "./types.js";
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @internal
|
5
|
+
*/
|
6
|
+
const injectedWalletLocalePtBr = (wallet: string): InjectedWalletLocale => ({
|
7
|
+
connectionScreen: {
|
8
|
+
inProgress: "Aguardando Confirmação",
|
9
|
+
failed: "Falha na conexão",
|
10
|
+
instruction: `Aceite a solicitação de conexão no ${wallet}`,
|
11
|
+
retry: "Tentar novamente",
|
12
|
+
},
|
13
|
+
getStartedScreen: {
|
14
|
+
instruction: `Escaneie o código QR para baixar o aplicativo ${wallet}`,
|
15
|
+
},
|
16
|
+
scanScreen: {
|
17
|
+
instruction: `Escaneie o código QR com o aplicativo ${wallet} para conectar`,
|
18
|
+
},
|
19
|
+
getStartedLink: `Não tem o ${wallet}?`,
|
20
|
+
download: {
|
21
|
+
chrome: "Baixar extensão para Chrome",
|
22
|
+
android: "Baixar no Google Play",
|
23
|
+
iOS: "Baixar na App Store",
|
24
|
+
},
|
25
|
+
});
|
26
|
+
|
27
|
+
export default injectedWalletLocalePtBr;
|
@@ -22,6 +22,9 @@ export async function getInjectedWalletLocale(
|
|
22
22
|
return (await import("./kr.js")).default;
|
23
23
|
case "fr_FR":
|
24
24
|
return (await import("./fr.js")).default;
|
25
|
+
case "pt_BR": {
|
26
|
+
return (await import("./br.js")).default;
|
27
|
+
}
|
25
28
|
default:
|
26
29
|
return (await import("./en.js")).default;
|
27
30
|
}
|
@@ -0,0 +1,62 @@
|
|
1
|
+
import type { InAppWalletLocale } from "./types.js";
|
2
|
+
|
3
|
+
export default {
|
4
|
+
signInWithGoogle: "Google",
|
5
|
+
signInWithFacebook: "Facebook",
|
6
|
+
signInWithApple: "Apple",
|
7
|
+
signInWithDiscord: "Discord",
|
8
|
+
emailPlaceholder: "Endereço de e-mail",
|
9
|
+
submitEmail: "Continuar",
|
10
|
+
signIn: "Entrar",
|
11
|
+
or: "ou",
|
12
|
+
emailRequired: "Endereço de e-mail é obrigatório",
|
13
|
+
invalidEmail: "Endereço de e-mail inválido",
|
14
|
+
maxAccountsExceeded:
|
15
|
+
"Número máximo de contas excedido. Por favor, notifique o desenvolvedor do aplicativo.",
|
16
|
+
socialLoginScreen: {
|
17
|
+
title: "Entrar",
|
18
|
+
instruction: "Faça login na sua conta no pop-up",
|
19
|
+
failed: "Falha ao entrar",
|
20
|
+
retry: "Tentar novamente",
|
21
|
+
},
|
22
|
+
emailLoginScreen: {
|
23
|
+
title: "Entrar",
|
24
|
+
enterCodeSendTo: "Digite o código de verificação enviado para",
|
25
|
+
newDeviceDetected: "Novo dispositivo detectado",
|
26
|
+
enterRecoveryCode:
|
27
|
+
"Digite o código de recuperação enviado por e-mail quando você se cadastrou",
|
28
|
+
invalidCode: "Código de verificação inválido",
|
29
|
+
invalidCodeOrRecoveryCode:
|
30
|
+
"Código de verificação ou código de recuperação inválido",
|
31
|
+
verify: "Verificar",
|
32
|
+
failedToSendCode: "Falha ao enviar código de verificação",
|
33
|
+
sendingCode: "Enviando código de verificação",
|
34
|
+
resendCode: "Reenviar código de verificação",
|
35
|
+
},
|
36
|
+
createPassword: {
|
37
|
+
title: "Criar senha",
|
38
|
+
instruction:
|
39
|
+
"Defina uma senha para sua conta. Você precisará dessa senha ao conectar-se de um novo dispositivo.",
|
40
|
+
saveInstruction: "Certifique-se de salvá-la",
|
41
|
+
inputPlaceholder: "Digite sua senha",
|
42
|
+
confirmation: "Eu salvei minha senha",
|
43
|
+
submitButton: "Definir senha",
|
44
|
+
failedToSetPassword: "Falha ao definir senha",
|
45
|
+
},
|
46
|
+
enterPassword: {
|
47
|
+
title: "Digite a senha",
|
48
|
+
instruction: "Digite a senha da sua conta",
|
49
|
+
inputPlaceholder: "Digite sua senha",
|
50
|
+
submitButton: "Verificar",
|
51
|
+
wrongPassword: "Senha incorreta",
|
52
|
+
},
|
53
|
+
signInWithEmail: "Entrar com e-mail",
|
54
|
+
invalidPhone: "Número de telefone inválido",
|
55
|
+
phonePlaceholder: "Número de telefone",
|
56
|
+
signInWithPhone: "Entrar com número de telefone",
|
57
|
+
phoneRequired: "Número de telefone é obrigatório",
|
58
|
+
passkey: "Chave de acesso",
|
59
|
+
signInWithWallet: "Entrar com carteira",
|
60
|
+
linkWallet: "Vincular uma carteira",
|
61
|
+
loginAsGuest: "Continuar como convidado",
|
62
|
+
} satisfies InAppWalletLocale;
|
@@ -22,6 +22,9 @@ export async function getInAppWalletLocale(
|
|
22
22
|
return (await import("./kr.js")).default;
|
23
23
|
case "fr_FR":
|
24
24
|
return (await import("./fr.js")).default;
|
25
|
+
case "pt_BR": {
|
26
|
+
return (await import("./br.js")).default;
|
27
|
+
}
|
25
28
|
default:
|
26
29
|
return (await import("./en.js")).default;
|
27
30
|
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import type { SmartWalletLocale } from "./types.js";
|
2
|
+
|
3
|
+
const smartWalletLocalePtBr: SmartWalletLocale = {
|
4
|
+
connecting: "Conectando à Conta Inteligente",
|
5
|
+
failedToConnect: "Falha ao conectar à Conta Inteligente",
|
6
|
+
wrongNetworkScreen: {
|
7
|
+
title: "Rede Incorreta",
|
8
|
+
subtitle: "Sua carteira não está conectada à rede requerida",
|
9
|
+
failedToSwitch: "Falha ao mudar de rede",
|
10
|
+
},
|
11
|
+
};
|
12
|
+
|
13
|
+
export default smartWalletLocalePtBr;
|
@@ -22,6 +22,9 @@ export async function getSmartWalletLocale(
|
|
22
22
|
return (await import("./kr.js")).default;
|
23
23
|
case "fr_FR":
|
24
24
|
return (await import("./fr.js")).default;
|
25
|
+
case "pt_BR": {
|
26
|
+
return (await import("./br.js")).default;
|
27
|
+
}
|
25
28
|
default:
|
26
29
|
return (await import("./en.js")).default;
|
27
30
|
}
|
package/src/version.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const version = "5.76.
|
1
|
+
export const version = "5.76.1";
|
@@ -230,11 +230,15 @@ export function createConnectionManager(storage: AsyncStorage) {
|
|
230
230
|
|
231
231
|
// save last connected wallet ids to storage
|
232
232
|
effect(
|
233
|
-
() => {
|
233
|
+
async () => {
|
234
|
+
const prevAccounts = (await getStoredConnectedWalletIds(storage)) || [];
|
234
235
|
const accounts = connectedWallets.getValue();
|
235
236
|
const ids = accounts.map((acc) => acc?.id).filter((c) => !!c) as string[];
|
236
237
|
|
237
|
-
storage.setItem(
|
238
|
+
storage.setItem(
|
239
|
+
CONNECTED_WALLET_IDS,
|
240
|
+
stringify(Array.from(new Set([...prevAccounts, ...ids]))),
|
241
|
+
);
|
238
242
|
},
|
239
243
|
[connectedWallets],
|
240
244
|
false,
|