@web3auth/modal 11.0.0-beta.0 → 11.0.0-beta.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/lib.cjs/packages/modal/src/account-linking/index.js +12 -0
- package/dist/lib.cjs/packages/modal/src/account-linking/react.js +22 -0
- package/dist/lib.cjs/packages/modal/src/account-linking/vue.js +22 -0
- package/dist/lib.cjs/packages/modal/src/config.js +1 -1
- package/dist/lib.cjs/packages/modal/src/modalManager.js +446 -26
- package/dist/lib.cjs/packages/modal/src/react/index.js +7 -3
- package/dist/lib.cjs/packages/modal/src/react/wagmi/provider.js +27 -12
- package/dist/lib.cjs/packages/modal/src/ui/components/BottomSheet/BottomSheet.js +13 -13
- package/dist/lib.cjs/packages/modal/src/ui/components/Button/ButtonSocial/ButtonSocial.js +4 -4
- package/dist/lib.cjs/packages/modal/src/ui/components/Button/ButtonWallet/ButtonWallet.js +10 -10
- package/dist/lib.cjs/packages/modal/src/ui/components/Footer/Footer.js +7 -7
- package/dist/lib.cjs/packages/modal/src/ui/components/Image/Image.js +4 -4
- package/dist/lib.cjs/packages/modal/src/ui/components/Loader/Loader.js +28 -28
- package/dist/lib.cjs/packages/modal/src/ui/components/LoginHint/LoginHint.js +3 -3
- package/dist/lib.cjs/packages/modal/src/ui/components/Modal/Modal.js +19 -19
- package/dist/lib.cjs/packages/modal/src/ui/components/Otp/Otp.js +10 -10
- package/dist/lib.cjs/packages/modal/src/ui/components/PulseLoader/PulseLoader.js +4 -4
- package/dist/lib.cjs/packages/modal/src/ui/components/SocialLoginList/SocialLoginList.js +21 -21
- package/dist/lib.cjs/packages/modal/src/ui/components/SpinnerLoader/SpinnerLoader.js +1 -1
- package/dist/lib.cjs/packages/modal/src/ui/components/Toast/Toast.js +11 -11
- package/dist/lib.cjs/packages/modal/src/ui/containers/AccountLinking/AccountLinking.js +109 -0
- package/dist/lib.cjs/packages/modal/src/ui/containers/ConnectWallet/ConnectWallet.js +14 -3
- package/dist/lib.cjs/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletChainFilter/ConnectWalletChainFilter.js +7 -7
- package/dist/lib.cjs/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletChainNamespaceSelect/ConnectWalletChainNamespaceSelect.js +9 -9
- package/dist/lib.cjs/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletHeader/ConnectWalletHeader.js +9 -8
- package/dist/lib.cjs/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletList/ConnectWalletList.js +19 -19
- package/dist/lib.cjs/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletQrCode/ConnectWalletQrCode.js +8 -8
- package/dist/lib.cjs/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletSearch/ConnectWalletSearch.js +5 -5
- package/dist/lib.cjs/packages/modal/src/ui/containers/Embed/Embed.js +11 -11
- package/dist/lib.cjs/packages/modal/src/ui/containers/Login/Login.js +45 -41
- package/dist/lib.cjs/packages/modal/src/ui/containers/Login/LoginOtp/LoginOtp.js +11 -11
- package/dist/lib.cjs/packages/modal/src/ui/containers/Login/LoginPasswordLess/LoginPasswordLess.js +13 -13
- package/dist/lib.cjs/packages/modal/src/ui/containers/Root/Root.js +24 -9
- package/dist/lib.cjs/packages/modal/src/ui/containers/Root/RootBodySheets/RootBodySheets.js +16 -16
- package/dist/lib.cjs/packages/modal/src/ui/containers/Widget/Widget.js +6 -2
- package/dist/lib.cjs/packages/modal/src/ui/context/ModalStateContext.js +1 -0
- package/dist/lib.cjs/packages/modal/src/ui/css/index.css.js +1 -1
- package/dist/lib.cjs/packages/modal/src/ui/i18n/dutch.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/english.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/french.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/german.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/japanese.json.js +26 -12
- package/dist/lib.cjs/packages/modal/src/ui/i18n/korean.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/mandarin.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/portuguese.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/spanish.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/turkish.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/interfaces.js +26 -0
- package/dist/lib.cjs/packages/modal/src/ui/loginModal.js +113 -4
- package/dist/lib.cjs/packages/modal/src/vue/index.js +7 -3
- package/dist/lib.cjs/packages/modal/src/vue/wagmi/provider.js +27 -14
- package/dist/lib.cjs/types/account-linking/index.d.ts +1 -0
- package/dist/lib.cjs/types/account-linking/react.d.ts +2 -0
- package/dist/lib.cjs/types/account-linking/vue.d.ts +2 -0
- package/dist/lib.cjs/types/modalManager.d.ts +40 -2
- package/dist/lib.cjs/types/react/hooks/index.d.ts +1 -0
- package/dist/lib.cjs/types/react/hooks/useWallets.d.ts +2 -0
- package/dist/lib.cjs/types/ui/containers/AccountLinking/AccountLinking.d.ts +6 -0
- package/dist/lib.cjs/types/ui/containers/AccountLinking/index.d.ts +1 -0
- package/dist/lib.cjs/types/ui/containers/ConnectWallet/ConnectWalletHeader/ConnectWalletHeader.type.d.ts +1 -0
- package/dist/lib.cjs/types/ui/containers/Root/Root.d.ts +1 -1
- package/dist/lib.cjs/types/ui/interfaces.d.ts +43 -8
- package/dist/lib.cjs/types/ui/loginModal.d.ts +27 -2
- package/dist/lib.cjs/types/ui/utils.d.ts +1 -1
- package/dist/lib.cjs/types/vue/composables/index.d.ts +1 -0
- package/dist/lib.cjs/types/vue/composables/useWallets.d.ts +2 -0
- package/dist/lib.esm/packages/modal/src/account-linking/index.js +1 -0
- package/dist/lib.esm/packages/modal/src/account-linking/react.js +1 -0
- package/dist/lib.esm/packages/modal/src/account-linking/vue.js +1 -0
- package/dist/lib.esm/packages/modal/src/config.js +1 -1
- package/dist/lib.esm/packages/modal/src/modalManager.js +451 -28
- package/dist/lib.esm/packages/modal/src/react/index.js +1 -1
- package/dist/lib.esm/packages/modal/src/react/wagmi/provider.js +28 -13
- package/dist/lib.esm/packages/modal/src/ui/components/BottomSheet/BottomSheet.js +13 -13
- package/dist/lib.esm/packages/modal/src/ui/components/Button/ButtonSocial/ButtonSocial.js +4 -4
- package/dist/lib.esm/packages/modal/src/ui/components/Button/ButtonWallet/ButtonWallet.js +10 -10
- package/dist/lib.esm/packages/modal/src/ui/components/Footer/Footer.js +7 -7
- package/dist/lib.esm/packages/modal/src/ui/components/Image/Image.js +4 -4
- package/dist/lib.esm/packages/modal/src/ui/components/Loader/Loader.js +28 -28
- package/dist/lib.esm/packages/modal/src/ui/components/LoginHint/LoginHint.js +3 -3
- package/dist/lib.esm/packages/modal/src/ui/components/Modal/Modal.js +19 -19
- package/dist/lib.esm/packages/modal/src/ui/components/Otp/Otp.js +10 -10
- package/dist/lib.esm/packages/modal/src/ui/components/PulseLoader/PulseLoader.js +4 -4
- package/dist/lib.esm/packages/modal/src/ui/components/SocialLoginList/SocialLoginList.js +21 -21
- package/dist/lib.esm/packages/modal/src/ui/components/SpinnerLoader/SpinnerLoader.js +1 -1
- package/dist/lib.esm/packages/modal/src/ui/components/Toast/Toast.js +11 -11
- package/dist/lib.esm/packages/modal/src/ui/containers/AccountLinking/AccountLinking.js +107 -0
- package/dist/lib.esm/packages/modal/src/ui/containers/ConnectWallet/ConnectWallet.js +14 -3
- package/dist/lib.esm/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletChainFilter/ConnectWalletChainFilter.js +7 -7
- package/dist/lib.esm/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletChainNamespaceSelect/ConnectWalletChainNamespaceSelect.js +9 -9
- package/dist/lib.esm/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletHeader/ConnectWalletHeader.js +9 -8
- package/dist/lib.esm/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletList/ConnectWalletList.js +19 -19
- package/dist/lib.esm/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletQrCode/ConnectWalletQrCode.js +8 -8
- package/dist/lib.esm/packages/modal/src/ui/containers/ConnectWallet/ConnectWalletSearch/ConnectWalletSearch.js +5 -5
- package/dist/lib.esm/packages/modal/src/ui/containers/Embed/Embed.js +11 -11
- package/dist/lib.esm/packages/modal/src/ui/containers/Login/Login.js +46 -42
- package/dist/lib.esm/packages/modal/src/ui/containers/Login/LoginOtp/LoginOtp.js +11 -11
- package/dist/lib.esm/packages/modal/src/ui/containers/Login/LoginPasswordLess/LoginPasswordLess.js +13 -13
- package/dist/lib.esm/packages/modal/src/ui/containers/Root/Root.js +24 -9
- package/dist/lib.esm/packages/modal/src/ui/containers/Root/RootBodySheets/RootBodySheets.js +16 -16
- package/dist/lib.esm/packages/modal/src/ui/containers/Widget/Widget.js +6 -2
- package/dist/lib.esm/packages/modal/src/ui/context/ModalStateContext.js +2 -1
- package/dist/lib.esm/packages/modal/src/ui/css/index.css.js +1 -1
- package/dist/lib.esm/packages/modal/src/ui/i18n/dutch.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/english.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/french.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/german.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/japanese.json.js +26 -12
- package/dist/lib.esm/packages/modal/src/ui/i18n/korean.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/mandarin.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/portuguese.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/spanish.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/turkish.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/interfaces.js +24 -1
- package/dist/lib.esm/packages/modal/src/ui/loginModal.js +115 -6
- package/dist/lib.esm/packages/modal/src/vue/index.js +1 -1
- package/dist/lib.esm/packages/modal/src/vue/wagmi/provider.js +28 -15
- package/package.json +42 -19
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var modal = {
|
|
6
|
+
"account-linking.failed-connect-wallet": "{{wallet}}への接続に失敗しました。",
|
|
7
|
+
"account-linking.failed-switch-wallet": "{{wallet}}でウォレットの切り替えに失敗しました。",
|
|
8
|
+
"account-linking.initializing-wallet": "{{wallet}}を初期化中...",
|
|
9
|
+
"account-linking.linking-wallet": "ウォレットをリンク中...",
|
|
10
|
+
"account-linking.preparing-wallet-qr": "{{wallet}} QRコードを準備中...",
|
|
11
|
+
"account-linking.scan-wallet": "{{wallet}}でQRコードをスキャンしてください。",
|
|
12
|
+
"account-linking.scan-walletconnect": "WalletConnect対応ウォレットでQRコードをスキャンしてください。",
|
|
13
|
+
"account-linking.switching-wallet": "ウォレットを切り替え中...",
|
|
14
|
+
"account-linking.wallet-connected-preparing-linking": "ウォレットが接続されました。アカウントのリンクを準備中...",
|
|
15
|
+
"account-linking.wallet-connected-preparing-switch": "ウォレットが接続されました。アカウント切り替えを準備中...",
|
|
16
|
+
"account-linking.wallet-linked": "ウォレットがリンクされました。",
|
|
17
|
+
"account-linking.wallet-switched": "ウォレットが切り替わりました。",
|
|
6
18
|
"adapter-loader.message": "{{adapter}} アカウントを確認して続行する",
|
|
7
19
|
"adapter-loader.message1": "{{adapter}} を確認する",
|
|
8
20
|
"adapter-loader.message2": "続行するアカウント",
|
|
@@ -15,10 +27,10 @@ var modal = {
|
|
|
15
27
|
"errors-required": "必須",
|
|
16
28
|
"external.all-wallets": "すべてのウォレット",
|
|
17
29
|
"external.back": "戻る",
|
|
18
|
-
"external.connect": "
|
|
30
|
+
"external.connect": "ウォレットで続行",
|
|
19
31
|
"external.connect-wallet": "ウォレットを接続",
|
|
20
|
-
"external.continue": "
|
|
21
|
-
"external.continue-custom": "{{wallet}}
|
|
32
|
+
"external.continue": "外部ウォレットで続行する",
|
|
33
|
+
"external.continue-custom": "{{wallet}}で続行",
|
|
22
34
|
"external.dont-have": "持っていない",
|
|
23
35
|
"external.get": "取得",
|
|
24
36
|
"external.get-wallet": "ウォレットを取得",
|
|
@@ -28,7 +40,7 @@ var modal = {
|
|
|
28
40
|
"external.no-wallets-found": "ウォレットが見つかりません",
|
|
29
41
|
"external.qr-code-copied-to-clipboard": "URIがクリップボードにコピーされました",
|
|
30
42
|
"external.search-subtext": "代わりに検索してみてください",
|
|
31
|
-
"external.search-text": "
|
|
43
|
+
"external.search-text": "ウォレットがありませんか?",
|
|
32
44
|
"external.search-wallet": "{{count}} ウォレットを検索...",
|
|
33
45
|
"external.select-chain": "チェーンを選択",
|
|
34
46
|
"external.select-chain-description": "この {{wallet}} ウォレットは複数のチェーンをサポートしています。接続したいチェーンを選択してください",
|
|
@@ -39,7 +51,7 @@ var modal = {
|
|
|
39
51
|
"footer.and": "および",
|
|
40
52
|
"footer.by-signing-in": "サインインすると、私たちの",
|
|
41
53
|
"footer.message": "自己保管ログイン by",
|
|
42
|
-
"footer.message-new": "
|
|
54
|
+
"footer.message-new": "自己保管ログイン by",
|
|
43
55
|
"footer.policy": "プライバシーポリシー",
|
|
44
56
|
"footer.privacy-policy": "プライバシーポリシー",
|
|
45
57
|
"footer.terms": "利用規約",
|
|
@@ -53,6 +65,7 @@ var modal = {
|
|
|
53
65
|
"header-title": "ログイン",
|
|
54
66
|
"header-tooltip-desc": "ウォレットは、ブロックチェーン上でデジタル資産を保存および管理するためのアカウントとして機能します。",
|
|
55
67
|
"header-tooltip-title": "ウォレット",
|
|
68
|
+
linkYourWallet: "ウォレットをリンク",
|
|
56
69
|
"loader.authorizing-header": "{{connector}}で確認",
|
|
57
70
|
"loader.authorizing-message": "ウォレットにリクエストを送信しました。ウォレットで確認して、このウォレットを所有していることを確認してください。",
|
|
58
71
|
"loader.authorizing-verify-btn": "確認するにはここをクリックしてください",
|
|
@@ -82,12 +95,12 @@ var modal = {
|
|
|
82
95
|
"post-loading.something-wrong": "何かがうまくいかなかった!",
|
|
83
96
|
resendCode: "コードを再送信",
|
|
84
97
|
resendTimer: " {{timer}} 秒後に再送信",
|
|
85
|
-
"social.continue": "
|
|
86
|
-
"social.continueCustom": "{{adapter}}
|
|
98
|
+
"social.continue": "で続行",
|
|
99
|
+
"social.continueCustom": "{{adapter}}で続行",
|
|
87
100
|
"social.email": "Eメール",
|
|
88
101
|
"social.email-continue": "メールで続行",
|
|
89
102
|
"social.email-new": "name@example.com",
|
|
90
|
-
"social.passwordless-cta": "
|
|
103
|
+
"social.passwordless-cta": "続行",
|
|
91
104
|
"social.passwordless-login": "ログイン",
|
|
92
105
|
"social.passwordless-title": "メール/電話",
|
|
93
106
|
"social.phone": "電話",
|
|
@@ -97,18 +110,19 @@ var modal = {
|
|
|
97
110
|
"social.sms-continue": "モバイルで続行",
|
|
98
111
|
"social.sms-invalid-number": "無効な電話番号",
|
|
99
112
|
"social.sms-placeholder-text": "例:",
|
|
100
|
-
"social.view-less": "
|
|
101
|
-
"social.view-less-socials": "
|
|
113
|
+
"social.view-less": "表示を減らす",
|
|
114
|
+
"social.view-less-socials": "Socials の表示を減らす",
|
|
102
115
|
"social.view-more": "もっと見る",
|
|
103
|
-
"social.view-more-socials": "
|
|
116
|
+
"social.view-more-socials": "Socials をもっと見る"
|
|
104
117
|
};
|
|
105
118
|
var passwordless = {
|
|
119
|
+
"captcha-default-error": "検証中に予期しないエラーが発生しました。ページを再読み込みしてください。",
|
|
106
120
|
"error-invalid-link": "無効な検証リンクまたはリンクが期限切れになりました",
|
|
107
121
|
"error-invalid-origin": "何かがうまくいかなかった, エラーコード: E002",
|
|
108
122
|
"error-invalid-otp": "無効なOTP、もう一度やり直してください",
|
|
109
123
|
"error-invalid-params": "パラメーターの欠落または無効なパラメーター",
|
|
110
124
|
"error-invalid-test-account": "無効なテストアカウント",
|
|
111
|
-
"error-max-retry-limit-reached": "
|
|
125
|
+
"error-max-retry-limit-reached": "エラー回数の制限に達しました。確認を完了するには、フローをもう一度再起動してください。",
|
|
112
126
|
"error-new-link-generated-heading": "新しい検証リンクが生成されました",
|
|
113
127
|
"error-no-mail-generated": "メールが生成されていません。最初にパスワードレスフローを開始してください。",
|
|
114
128
|
"error-no-sms-generated": "OTP生成はありません。最初にパスワードレスフローを開始してください。",
|
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var modal = {
|
|
6
|
+
"account-linking.failed-connect-wallet": "{{wallet}}와 연결에 실패했습니다.",
|
|
7
|
+
"account-linking.failed-switch-wallet": "{{wallet}}로 지갑 전환에 실패했습니다.",
|
|
8
|
+
"account-linking.initializing-wallet": "{{wallet}} 초기화 중...",
|
|
9
|
+
"account-linking.linking-wallet": "지갑 연결 중...",
|
|
10
|
+
"account-linking.preparing-wallet-qr": "{{wallet}} QR 코드 준비 중...",
|
|
11
|
+
"account-linking.scan-wallet": "{{wallet}}로 QR 코드를 스캔하세요.",
|
|
12
|
+
"account-linking.scan-walletconnect": "WalletConnect 호환 지갑으로 QR 코드를 스캔하세요.",
|
|
13
|
+
"account-linking.switching-wallet": "지갑 전환 중...",
|
|
14
|
+
"account-linking.wallet-connected-preparing-linking": "지갑이 연결되었습니다. 계정 연결 준비 중...",
|
|
15
|
+
"account-linking.wallet-connected-preparing-switch": "지갑이 연결되었습니다. 계정 전환 준비 중...",
|
|
16
|
+
"account-linking.wallet-linked": "지갑이 연결되었습니다.",
|
|
17
|
+
"account-linking.wallet-switched": "지갑이 전환되었습니다.",
|
|
6
18
|
"adapter-loader.message": "계속하려면 {{adapter}} 계정을 인증하세요",
|
|
7
19
|
"adapter-loader.message1": "{{adapter}}를 인증하세요",
|
|
8
20
|
"adapter-loader.message2": "계속할 계정",
|
|
@@ -53,6 +65,7 @@ var modal = {
|
|
|
53
65
|
"header-title": "로그인",
|
|
54
66
|
"header-tooltip-desc": "이 지갑은 블록체인 상에서 디지털 자산을 보관하고 관리하는 데 사용되는 계정입니다.",
|
|
55
67
|
"header-tooltip-title": "지갑",
|
|
68
|
+
linkYourWallet: "지갑 연결하기",
|
|
56
69
|
"loader.authorizing-header": "{{connector}}로 확인",
|
|
57
70
|
"loader.authorizing-message": "월렛에 요청을 보냈습니다. 월렛에서 확인하여 이 월렛을 소유하고 있는지 확인해주세요.",
|
|
58
71
|
"loader.authorizing-verify-btn": "확인하려면 여기를 클릭하세요",
|
|
@@ -103,6 +116,7 @@ var modal = {
|
|
|
103
116
|
"social.view-more-socials": "Socials 더보기"
|
|
104
117
|
};
|
|
105
118
|
var passwordless = {
|
|
119
|
+
"captcha-default-error": "인증 중 예기치 않은 오류가 발생했습니다. 페이지를 새로 고치세요.",
|
|
106
120
|
"error-invalid-link": "유효하지 않은 인증 링크이거나 링크가 만료되었습니다",
|
|
107
121
|
"error-invalid-origin": "문제가 발생했습니다, 오류 코드: E002",
|
|
108
122
|
"error-invalid-otp": "유효하지 않은 OTP입니다. 다시 시도해 주세요.",
|
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var modal = {
|
|
6
|
+
"account-linking.failed-connect-wallet": "连接{{wallet}}失败。",
|
|
7
|
+
"account-linking.failed-switch-wallet": "使用{{wallet}}切换钱包失败。",
|
|
8
|
+
"account-linking.initializing-wallet": "正在初始化{{wallet}}...",
|
|
9
|
+
"account-linking.linking-wallet": "正在关联钱包...",
|
|
10
|
+
"account-linking.preparing-wallet-qr": "正在准备{{wallet}} QR码...",
|
|
11
|
+
"account-linking.scan-wallet": "使用{{wallet}}扫描QR码。",
|
|
12
|
+
"account-linking.scan-walletconnect": "使用兼容WalletConnect的钱包扫描QR码。",
|
|
13
|
+
"account-linking.switching-wallet": "正在切换钱包...",
|
|
14
|
+
"account-linking.wallet-connected-preparing-linking": "钱包已连接。正在准备账户关联...",
|
|
15
|
+
"account-linking.wallet-connected-preparing-switch": "钱包已连接。正在准备账户切换...",
|
|
16
|
+
"account-linking.wallet-linked": "钱包已关联。",
|
|
17
|
+
"account-linking.wallet-switched": "钱包已切换。",
|
|
6
18
|
"adapter-loader.message": "验证您的{{adapter}}帐户以继续",
|
|
7
19
|
"adapter-loader.message1": "在您的{{adapter}}上验证",
|
|
8
20
|
"adapter-loader.message2": "帐号继续",
|
|
@@ -53,6 +65,7 @@ var modal = {
|
|
|
53
65
|
"header-title": "登录",
|
|
54
66
|
"header-tooltip-desc": "钱包作为一个账户用于在区块链上存储和管理您的数字资产。",
|
|
55
67
|
"header-tooltip-title": "钱包",
|
|
68
|
+
linkYourWallet: "关联您的钱包",
|
|
56
69
|
"loader.authorizing-header": "{{connector}}验证",
|
|
57
70
|
"loader.authorizing-message": "我们已经向您的钱包发送了请求。请在您的钱包上确认,以确认您拥有此钱包。",
|
|
58
71
|
"loader.authorizing-verify-btn": "点击此处进行验证",
|
|
@@ -103,6 +116,7 @@ var modal = {
|
|
|
103
116
|
"social.view-more-socials": "查看更多socials"
|
|
104
117
|
};
|
|
105
118
|
var passwordless = {
|
|
119
|
+
"captcha-default-error": "验证过程中发生意外错误。请重新加载页面。",
|
|
106
120
|
"error-invalid-link": "无效的验证链接或链接已过期",
|
|
107
121
|
"error-invalid-origin": "出问题了, 错误代码: E002",
|
|
108
122
|
"error-invalid-otp": "无效的OTP,请重试",
|
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var modal = {
|
|
6
|
+
"account-linking.failed-connect-wallet": "Falha ao conectar com {{wallet}}.",
|
|
7
|
+
"account-linking.failed-switch-wallet": "Falha ao trocar carteira com {{wallet}}.",
|
|
8
|
+
"account-linking.initializing-wallet": "Inicializando {{wallet}}...",
|
|
9
|
+
"account-linking.linking-wallet": "Vinculando carteira...",
|
|
10
|
+
"account-linking.preparing-wallet-qr": "Preparando código QR do {{wallet}}...",
|
|
11
|
+
"account-linking.scan-wallet": "Digitalize o código QR com {{wallet}}.",
|
|
12
|
+
"account-linking.scan-walletconnect": "Digitalize o código QR com uma carteira compatível com WalletConnect.",
|
|
13
|
+
"account-linking.switching-wallet": "Trocando carteira...",
|
|
14
|
+
"account-linking.wallet-connected-preparing-linking": "Carteira conectada. Preparando vinculação de conta...",
|
|
15
|
+
"account-linking.wallet-connected-preparing-switch": "Carteira conectada. Preparando troca de conta...",
|
|
16
|
+
"account-linking.wallet-linked": "Carteira vinculada.",
|
|
17
|
+
"account-linking.wallet-switched": "Carteira trocada.",
|
|
6
18
|
"adapter-loader.message": "Verifique a sua conta {{adapter}} para continuar",
|
|
7
19
|
"adapter-loader.message1": "Verifique o(a) seu/sua {{adapter}}",
|
|
8
20
|
"adapter-loader.message2": "conta para continuar",
|
|
@@ -53,6 +65,7 @@ var modal = {
|
|
|
53
65
|
"header-title": "Entrar",
|
|
54
66
|
"header-tooltip-desc": "A carteira serve como uma conta para armazenar e gerenciar seus ativos digitais na blockchain.",
|
|
55
67
|
"header-tooltip-title": "Carteira",
|
|
68
|
+
linkYourWallet: "Vincule sua carteira",
|
|
56
69
|
"loader.authorizing-header": "Verificar em {{connector}}",
|
|
57
70
|
"loader.authorizing-message": "Enviamos uma solicitação para seu portfólio. Verifique no seu portfólio para confirmar que você possui este portfólio.",
|
|
58
71
|
"loader.authorizing-verify-btn": "Clique aqui para verificar",
|
|
@@ -103,6 +116,7 @@ var modal = {
|
|
|
103
116
|
"social.view-more-socials": "Ver mais socials"
|
|
104
117
|
};
|
|
105
118
|
var passwordless = {
|
|
119
|
+
"captcha-default-error": "Ocorreu um erro inesperado durante a verificação. Por favor, tente recarregar a página.",
|
|
106
120
|
"error-invalid-link": "Link de verificação inválido ou link expirado",
|
|
107
121
|
"error-invalid-origin": "Algo deu errado, código de erro: E002",
|
|
108
122
|
"error-invalid-otp": "OTP inválido, por favor tente novamente",
|
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var modal = {
|
|
6
|
+
"account-linking.failed-connect-wallet": "Error al conectar con {{wallet}}.",
|
|
7
|
+
"account-linking.failed-switch-wallet": "Error al cambiar la billetera con {{wallet}}.",
|
|
8
|
+
"account-linking.initializing-wallet": "Inicializando {{wallet}}...",
|
|
9
|
+
"account-linking.linking-wallet": "Vinculando billetera...",
|
|
10
|
+
"account-linking.preparing-wallet-qr": "Preparando el código QR de {{wallet}}...",
|
|
11
|
+
"account-linking.scan-wallet": "Escanea el código QR con {{wallet}}.",
|
|
12
|
+
"account-linking.scan-walletconnect": "Escanea el código QR con una billetera compatible con WalletConnect.",
|
|
13
|
+
"account-linking.switching-wallet": "Cambiando billetera...",
|
|
14
|
+
"account-linking.wallet-connected-preparing-linking": "Billetera conectada. Preparando vinculación de cuenta...",
|
|
15
|
+
"account-linking.wallet-connected-preparing-switch": "Billetera conectada. Preparando cambio de cuenta...",
|
|
16
|
+
"account-linking.wallet-linked": "Billetera vinculada.",
|
|
17
|
+
"account-linking.wallet-switched": "Billetera cambiada.",
|
|
6
18
|
"adapter-loader.message": "Verifica tu cuenta {{adapter}} para continuar",
|
|
7
19
|
"adapter-loader.message1": "Verifique su {{adapter}}",
|
|
8
20
|
"adapter-loader.message2": "cuenta para continuar",
|
|
@@ -53,6 +65,7 @@ var modal = {
|
|
|
53
65
|
"header-title": "Iniciar sesión",
|
|
54
66
|
"header-tooltip-desc": "La billetera sirve como una cuenta para almacenar y administrar sus activos digitales en la blockchain.",
|
|
55
67
|
"header-tooltip-title": "Billetera",
|
|
68
|
+
linkYourWallet: "Vincula tu billetera",
|
|
56
69
|
"loader.authorizing-header": "Verificar en {{connector}}",
|
|
57
70
|
"loader.authorizing-message": "Hemos enviado una solicitud a su cartera. Verifique en su cartera para confirmar que posee esta cartera.",
|
|
58
71
|
"loader.authorizing-verify-btn": "Haga clic aquí para verificar",
|
|
@@ -103,6 +116,7 @@ var modal = {
|
|
|
103
116
|
"social.view-more-socials": "Ver más socials"
|
|
104
117
|
};
|
|
105
118
|
var passwordless = {
|
|
119
|
+
"captcha-default-error": "Se ha producido un error inesperado durante la verificación. Por favor, inténtelo de nuevo recargando la página.",
|
|
106
120
|
"error-invalid-link": "El enlace o el enlace de verificación ha expirado",
|
|
107
121
|
"error-invalid-origin": "Algo salió mal, código de error: E002",
|
|
108
122
|
"error-invalid-otp": "OTP no válido, intente nuevamente",
|
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var modal = {
|
|
6
|
+
"account-linking.failed-connect-wallet": "{{wallet}} ile bağlantı kurulamadı.",
|
|
7
|
+
"account-linking.failed-switch-wallet": "{{wallet}} ile cüzdan değiştirme başarısız oldu.",
|
|
8
|
+
"account-linking.initializing-wallet": "{{wallet}} başlatılıyor...",
|
|
9
|
+
"account-linking.linking-wallet": "Cüzdan bağlanıyor...",
|
|
10
|
+
"account-linking.preparing-wallet-qr": "{{wallet}} QR kodu hazırlanıyor...",
|
|
11
|
+
"account-linking.scan-wallet": "QR kodunu {{wallet}} ile tarayın.",
|
|
12
|
+
"account-linking.scan-walletconnect": "QR kodunu WalletConnect uyumlu bir cüzdanla tarayın.",
|
|
13
|
+
"account-linking.switching-wallet": "Cüzdan değiştiriliyor...",
|
|
14
|
+
"account-linking.wallet-connected-preparing-linking": "Cüzdan bağlandı. Hesap bağlantısı hazırlanıyor...",
|
|
15
|
+
"account-linking.wallet-connected-preparing-switch": "Cüzdan bağlandı. Hesap değişimi hazırlanıyor...",
|
|
16
|
+
"account-linking.wallet-linked": "Cüzdan bağlandı.",
|
|
17
|
+
"account-linking.wallet-switched": "Cüzdan değiştirildi.",
|
|
6
18
|
"adapter-loader.message": "Devam etmek için {{adapter}} hesabınızı doğrula",
|
|
7
19
|
"adapter-loader.message1": "{{adapter}} doğrula",
|
|
8
20
|
"adapter-loader.message2": "devam edecek hesap",
|
|
@@ -53,6 +65,7 @@ var modal = {
|
|
|
53
65
|
"header-title": "Giriş yap",
|
|
54
66
|
"header-tooltip-desc": "Cüzdan, dijital varlıklarınızı blockchain'de saklama ve yönetme görevi görür.",
|
|
55
67
|
"header-tooltip-title": "Cüzdan",
|
|
68
|
+
linkYourWallet: "Cüzdanınızı bağlayın",
|
|
56
69
|
"loader.authorizing-header": "{{connector}} ile doğrula",
|
|
57
70
|
"loader.authorizing-message": "Biz size bir istek gönderdik. Bu cüzdanınız olduğunu doğrulamak için cüzdanınızda doğrulayın.",
|
|
58
71
|
"loader.authorizing-verify-btn": "Doğrulamak için buraya tıklayın",
|
|
@@ -103,6 +116,7 @@ var modal = {
|
|
|
103
116
|
"social.view-more-socials": "Daha fazlasını görüntüle socials"
|
|
104
117
|
};
|
|
105
118
|
var passwordless = {
|
|
119
|
+
"captcha-default-error": "Doğrulama sırasında beklenmedik bir hata oluştu. Lütfen sayfayı yeniden yükleyin.",
|
|
106
120
|
"error-invalid-link": "Hatalı ya da süresi geçmiş doğrulama linki",
|
|
107
121
|
"error-invalid-origin": "Bir şeyler ters gitti, hata kodu: E002",
|
|
108
122
|
"error-invalid-otp": "Hatalı OTP, lütfen tekrar deneyin.",
|
|
@@ -12,6 +12,29 @@ const MODAL_STATUS = {
|
|
|
12
12
|
AUTHORIZED: "authorized",
|
|
13
13
|
CONSENT_REQUIRING: "consent_requiring"
|
|
14
14
|
};
|
|
15
|
+
const ACCOUNT_LINKING_STATUS = {
|
|
16
|
+
IDLE: "idle",
|
|
17
|
+
INITIALIZING: "initializing",
|
|
18
|
+
AWAITING_CONNECTION: "awaiting_connection",
|
|
19
|
+
WALLET_CONNECTED: "wallet_connected",
|
|
20
|
+
LINKING: "linking",
|
|
21
|
+
ERRORED: "errored",
|
|
22
|
+
COMPLETED: "completed"
|
|
23
|
+
};
|
|
24
|
+
const ACCOUNT_LINKING_INTENT = {
|
|
25
|
+
LINK: "link",
|
|
26
|
+
SWITCH: "switch"
|
|
27
|
+
};
|
|
28
|
+
const DEFAULT_ACCOUNT_LINKING_STATE = {
|
|
29
|
+
active: false,
|
|
30
|
+
pickerActive: false,
|
|
31
|
+
connectorName: null,
|
|
32
|
+
transportConnectorName: null,
|
|
33
|
+
chainId: null,
|
|
34
|
+
intent: ACCOUNT_LINKING_INTENT.LINK,
|
|
35
|
+
status: ACCOUNT_LINKING_STATUS.IDLE,
|
|
36
|
+
errorMessage: ""
|
|
37
|
+
};
|
|
15
38
|
exports.TOAST_TYPE = void 0;
|
|
16
39
|
(function (TOAST_TYPE) {
|
|
17
40
|
TOAST_TYPE["SUCCESS"] = "success";
|
|
@@ -20,5 +43,8 @@ exports.TOAST_TYPE = void 0;
|
|
|
20
43
|
TOAST_TYPE["INFO"] = "info";
|
|
21
44
|
})(exports.TOAST_TYPE || (exports.TOAST_TYPE = {}));
|
|
22
45
|
|
|
46
|
+
exports.ACCOUNT_LINKING_INTENT = ACCOUNT_LINKING_INTENT;
|
|
47
|
+
exports.ACCOUNT_LINKING_STATUS = ACCOUNT_LINKING_STATUS;
|
|
48
|
+
exports.DEFAULT_ACCOUNT_LINKING_STATE = DEFAULT_ACCOUNT_LINKING_STATE;
|
|
23
49
|
exports.LOGIN_MODAL_EVENTS = LOGIN_MODAL_EVENTS;
|
|
24
50
|
exports.MODAL_STATUS = MODAL_STATUS;
|
|
@@ -44,6 +44,7 @@ class LoginModal {
|
|
|
44
44
|
_defineProperty(this, "externalWalletsConfig", void 0);
|
|
45
45
|
_defineProperty(this, "analytics", void 0);
|
|
46
46
|
_defineProperty(this, "modalStatus", interfaces.MODAL_STATUS.INITIALIZED);
|
|
47
|
+
_defineProperty(this, "accountLinkingState", _objectSpread({}, interfaces.DEFAULT_ACCOUNT_LINKING_STATE));
|
|
47
48
|
_defineProperty(this, "initModal", async () => {
|
|
48
49
|
const useLang = this.uiConfig.defaultLanguage || auth.LANGUAGES.en;
|
|
49
50
|
// Load new language resource
|
|
@@ -195,6 +196,112 @@ class LoginModal {
|
|
|
195
196
|
externalWalletsVisibility: isMMAvailable ? false : !!options.externalWalletsVisibility
|
|
196
197
|
});
|
|
197
198
|
});
|
|
199
|
+
_defineProperty(this, "startAccountLinkingSession", params => {
|
|
200
|
+
var _params$transportConn, _params$intent;
|
|
201
|
+
this.updateAccountLinkingState(_objectSpread(_objectSpread({}, interfaces.DEFAULT_ACCOUNT_LINKING_STATE), {}, {
|
|
202
|
+
active: true,
|
|
203
|
+
connectorName: params.connectorName,
|
|
204
|
+
transportConnectorName: (_params$transportConn = params.transportConnectorName) !== null && _params$transportConn !== void 0 ? _params$transportConn : params.connectorName,
|
|
205
|
+
chainId: params.chainId,
|
|
206
|
+
intent: (_params$intent = params.intent) !== null && _params$intent !== void 0 ? _params$intent : interfaces.ACCOUNT_LINKING_INTENT.LINK,
|
|
207
|
+
status: interfaces.ACCOUNT_LINKING_STATUS.INITIALIZING
|
|
208
|
+
}));
|
|
209
|
+
});
|
|
210
|
+
_defineProperty(this, "updateAccountLinkingState", accountLinking => {
|
|
211
|
+
this.accountLinkingState = _objectSpread(_objectSpread({}, this.accountLinkingState), accountLinking);
|
|
212
|
+
this.setState({
|
|
213
|
+
accountLinking: this.accountLinkingState
|
|
214
|
+
});
|
|
215
|
+
});
|
|
216
|
+
_defineProperty(this, "resetAccountLinkingSession", () => {
|
|
217
|
+
this.accountLinkingState = _objectSpread({}, interfaces.DEFAULT_ACCOUNT_LINKING_STATE);
|
|
218
|
+
this.setState({
|
|
219
|
+
accountLinking: this.accountLinkingState
|
|
220
|
+
});
|
|
221
|
+
});
|
|
222
|
+
_defineProperty(this, "hasActiveAccountLinkingSession", () => {
|
|
223
|
+
return this.accountLinkingState.active;
|
|
224
|
+
});
|
|
225
|
+
_defineProperty(this, "startAccountLinkingPicker", params => {
|
|
226
|
+
this.accountLinkingState = _objectSpread(_objectSpread({}, interfaces.DEFAULT_ACCOUNT_LINKING_STATE), {}, {
|
|
227
|
+
active: true,
|
|
228
|
+
pickerActive: true,
|
|
229
|
+
chainId: params.chainId,
|
|
230
|
+
intent: interfaces.ACCOUNT_LINKING_INTENT.LINK
|
|
231
|
+
});
|
|
232
|
+
this.setState({
|
|
233
|
+
accountLinking: this.accountLinkingState,
|
|
234
|
+
currentPage: constants.PAGES.WALLET_LIST,
|
|
235
|
+
modalVisibility: true,
|
|
236
|
+
status: interfaces.MODAL_STATUS.INITIALIZED
|
|
237
|
+
});
|
|
238
|
+
if (this.callbacks.onModalVisibility) {
|
|
239
|
+
this.callbacks.onModalVisibility(true);
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
_defineProperty(this, "endAccountLinkingPicker", () => {
|
|
243
|
+
this.accountLinkingState = _objectSpread(_objectSpread({}, this.accountLinkingState), {}, {
|
|
244
|
+
pickerActive: false,
|
|
245
|
+
active: false
|
|
246
|
+
});
|
|
247
|
+
this.setState({
|
|
248
|
+
accountLinking: this.accountLinkingState
|
|
249
|
+
});
|
|
250
|
+
});
|
|
251
|
+
_defineProperty(this, "startConnectingLoader", params => {
|
|
252
|
+
this.setState({
|
|
253
|
+
status: interfaces.MODAL_STATUS.CONNECTING,
|
|
254
|
+
modalVisibility: true,
|
|
255
|
+
detailedLoaderConnector: params.connector,
|
|
256
|
+
detailedLoaderConnectorName: params.connectorName
|
|
257
|
+
});
|
|
258
|
+
if (this.callbacks.onModalVisibility) {
|
|
259
|
+
this.callbacks.onModalVisibility(true);
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
_defineProperty(this, "markLoaderAuthorizing", () => {
|
|
263
|
+
this.setState({
|
|
264
|
+
status: interfaces.MODAL_STATUS.AUTHORIZING
|
|
265
|
+
});
|
|
266
|
+
});
|
|
267
|
+
_defineProperty(this, "endConnectingLoader", params => {
|
|
268
|
+
if (params.success) {
|
|
269
|
+
var _params$successMessag;
|
|
270
|
+
if (params.skipSuccessScreen) {
|
|
271
|
+
this.setState({
|
|
272
|
+
modalVisibility: false
|
|
273
|
+
});
|
|
274
|
+
if (this.callbacks.onModalVisibility) {
|
|
275
|
+
this.callbacks.onModalVisibility(false);
|
|
276
|
+
}
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
// Account-linking success is terminal regardless of authentication mode (no signing step),
|
|
280
|
+
// so emit the mode's terminal success status so the Loader renders the success UI and auto-closes:
|
|
281
|
+
// - CONNECT_AND_SIGN expects AUTHORIZED as terminal success.
|
|
282
|
+
// - Other modes expect CONNECTED.
|
|
283
|
+
const isConnectAndSign = this.uiConfig.initialAuthenticationMode === noModal.CONNECTOR_INITIAL_AUTHENTICATION_MODE.CONNECT_AND_SIGN;
|
|
284
|
+
this.setState({
|
|
285
|
+
status: isConnectAndSign ? interfaces.MODAL_STATUS.AUTHORIZED : interfaces.MODAL_STATUS.CONNECTED,
|
|
286
|
+
postLoadingMessage: (_params$successMessag = params.successMessage) !== null && _params$successMessag !== void 0 ? _params$successMessag : "modal.post-loading.connected"
|
|
287
|
+
});
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
if (this.uiConfig.displayErrorsOnModal) {
|
|
291
|
+
this.setState({
|
|
292
|
+
modalVisibility: true,
|
|
293
|
+
status: interfaces.MODAL_STATUS.ERRORED,
|
|
294
|
+
postLoadingMessage: params.errorMessage || "modal.post-loading.something-wrong"
|
|
295
|
+
});
|
|
296
|
+
} else {
|
|
297
|
+
this.setState({
|
|
298
|
+
modalVisibility: false
|
|
299
|
+
});
|
|
300
|
+
if (this.callbacks.onModalVisibility) {
|
|
301
|
+
this.callbacks.onModalVisibility(false);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
});
|
|
198
305
|
_defineProperty(this, "open", () => {
|
|
199
306
|
var _this$analytics, _this$uiConfig$wallet, _this$uiConfig$wallet2;
|
|
200
307
|
this.setState({
|
|
@@ -372,7 +479,8 @@ class LoginModal {
|
|
|
372
479
|
listener.on(noModal.CONNECTOR_EVENTS.AUTHORIZED, () => {
|
|
373
480
|
if (this.modalStatus === interfaces.MODAL_STATUS.CONSENT_REQUIRING) return;
|
|
374
481
|
this.setState({
|
|
375
|
-
status: interfaces.MODAL_STATUS.AUTHORIZED
|
|
482
|
+
status: interfaces.MODAL_STATUS.AUTHORIZED,
|
|
483
|
+
postLoadingMessage: ""
|
|
376
484
|
});
|
|
377
485
|
});
|
|
378
486
|
listener.on(noModal.CONNECTOR_EVENTS.CONSENT_REQUIRING, () => {
|
|
@@ -385,7 +493,8 @@ class LoginModal {
|
|
|
385
493
|
if (this.uiConfig.initialAuthenticationMode === noModal.CONNECTOR_INITIAL_AUTHENTICATION_MODE.CONNECT_AND_SIGN) {
|
|
386
494
|
this.setState({
|
|
387
495
|
status: interfaces.MODAL_STATUS.AUTHORIZED,
|
|
388
|
-
modalVisibility: true
|
|
496
|
+
modalVisibility: true,
|
|
497
|
+
postLoadingMessage: ""
|
|
389
498
|
});
|
|
390
499
|
} else if (!data.reconnected) {
|
|
391
500
|
this.setState({
|
|
@@ -430,8 +539,8 @@ class LoginModal {
|
|
|
430
539
|
this.subscribeCoreEvents(this.uiConfig.connectorListener);
|
|
431
540
|
}
|
|
432
541
|
get consentRequired() {
|
|
433
|
-
|
|
434
|
-
return
|
|
542
|
+
// consent required is true if the consent required is true and the privacy policy and tnc link are set
|
|
543
|
+
return this.uiConfig.consentRequired && Boolean(this.uiConfig.privacyPolicy) && Boolean(this.uiConfig.tncLink) || false;
|
|
435
544
|
}
|
|
436
545
|
get isDark() {
|
|
437
546
|
return this.uiConfig.mode === "dark" || this.uiConfig.mode === "auto" && window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var vue = require('@web3auth/no-modal/vue');
|
|
3
4
|
var useWeb3Auth = require('./composables/useWeb3Auth.js');
|
|
4
5
|
var useWeb3AuthConnect = require('./composables/useWeb3AuthConnect.js');
|
|
5
|
-
var vue = require('@web3auth/no-modal/vue');
|
|
6
6
|
var Web3AuthProvider = require('./Web3AuthProvider.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.useWeb3Auth = useWeb3Auth.useWeb3Auth;
|
|
11
|
-
exports.useWeb3AuthConnect = useWeb3AuthConnect.useWeb3AuthConnect;
|
|
12
10
|
Object.defineProperty(exports, "useAuthTokenInfo", {
|
|
13
11
|
enumerable: true,
|
|
14
12
|
get: function () { return vue.useAuthTokenInfo; }
|
|
@@ -57,6 +55,10 @@ Object.defineProperty(exports, "useWalletUI", {
|
|
|
57
55
|
enumerable: true,
|
|
58
56
|
get: function () { return vue.useWalletUI; }
|
|
59
57
|
});
|
|
58
|
+
Object.defineProperty(exports, "useWallets", {
|
|
59
|
+
enumerable: true,
|
|
60
|
+
get: function () { return vue.useWallets; }
|
|
61
|
+
});
|
|
60
62
|
Object.defineProperty(exports, "useWeb3AuthDisconnect", {
|
|
61
63
|
enumerable: true,
|
|
62
64
|
get: function () { return vue.useWeb3AuthDisconnect; }
|
|
@@ -65,4 +67,6 @@ Object.defineProperty(exports, "useWeb3AuthUser", {
|
|
|
65
67
|
enumerable: true,
|
|
66
68
|
get: function () { return vue.useWeb3AuthUser; }
|
|
67
69
|
});
|
|
70
|
+
exports.useWeb3Auth = useWeb3Auth.useWeb3Auth;
|
|
71
|
+
exports.useWeb3AuthConnect = useWeb3AuthConnect.useWeb3AuthConnect;
|
|
68
72
|
exports.Web3AuthProvider = Web3AuthProvider.Web3AuthProvider;
|
|
@@ -8,8 +8,8 @@ var auth = require('@web3auth/auth');
|
|
|
8
8
|
var noModal = require('@web3auth/no-modal');
|
|
9
9
|
var viem = require('viem');
|
|
10
10
|
var vue = require('vue');
|
|
11
|
-
var useWeb3Auth = require('../composables/useWeb3Auth.js');
|
|
12
11
|
var vue$1 = require('@web3auth/no-modal/vue');
|
|
12
|
+
var useWeb3Auth = require('../composables/useWeb3Auth.js');
|
|
13
13
|
var constants = require('./constants.js');
|
|
14
14
|
|
|
15
15
|
const WEB3AUTH_CONNECTOR_ID = "web3auth";
|
|
@@ -75,7 +75,8 @@ const Web3AuthWagmiProvider = vue.defineComponent({
|
|
|
75
75
|
setup() {
|
|
76
76
|
const {
|
|
77
77
|
isConnected,
|
|
78
|
-
connection
|
|
78
|
+
connection,
|
|
79
|
+
web3Auth
|
|
79
80
|
} = useWeb3Auth.useWeb3Auth();
|
|
80
81
|
const {
|
|
81
82
|
disconnect
|
|
@@ -84,6 +85,7 @@ const Web3AuthWagmiProvider = vue.defineComponent({
|
|
|
84
85
|
const {
|
|
85
86
|
mutate: reconnect
|
|
86
87
|
} = vue$2.useReconnect();
|
|
88
|
+
const lastSyncedWeb3AuthConnection = vue.shallowRef(null);
|
|
87
89
|
vue$2.useConnectionEffect({
|
|
88
90
|
onDisconnect: async () => {
|
|
89
91
|
noModal.log.info("Disconnected from wagmi");
|
|
@@ -97,17 +99,28 @@ const Web3AuthWagmiProvider = vue.defineComponent({
|
|
|
97
99
|
}
|
|
98
100
|
});
|
|
99
101
|
vue.watch([isConnected, connection], async () => {
|
|
100
|
-
var
|
|
102
|
+
var _newConnection$ethere, _web3Auth$value;
|
|
101
103
|
const newIsConnected = isConnected.value;
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
const newConnection = connection.value;
|
|
105
|
+
const newEth = (_newConnection$ethere = newConnection === null || newConnection === void 0 ? void 0 : newConnection.ethereumProvider) !== null && _newConnection$ethere !== void 0 ? _newConnection$ethere : null;
|
|
106
|
+
if (newIsConnected && newConnection && newEth && newConnection.connectorName === ((_web3Auth$value = web3Auth.value) === null || _web3Auth$value === void 0 ? void 0 : _web3Auth$value.primaryConnectorName)) {
|
|
107
|
+
// `ethereumProvider` is a stable proxy (`commonJRPCProvider`) across account switches,
|
|
108
|
+
// so key wagmi resyncs off the Web3Auth connection object instead of provider identity.
|
|
109
|
+
if (lastSyncedWeb3AuthConnection.value !== newConnection) {
|
|
110
|
+
if (getWeb3authConnector(wagmiConfig)) {
|
|
111
|
+
resetConnectorState(wagmiConfig);
|
|
112
|
+
}
|
|
113
|
+
lastSyncedWeb3AuthConnection.value = newConnection;
|
|
114
|
+
const connector = await setupConnector(newEth, wagmiConfig);
|
|
115
|
+
if (!connector) {
|
|
116
|
+
noModal.log.error("Failed to setup vue wagmi connector");
|
|
117
|
+
throw new Error("Failed to setup connector");
|
|
118
|
+
}
|
|
119
|
+
await connectWeb3AuthWithWagmi(connector, wagmiConfig);
|
|
120
|
+
reconnect();
|
|
107
121
|
}
|
|
108
|
-
await connectWeb3AuthWithWagmi(connector, wagmiConfig);
|
|
109
|
-
reconnect();
|
|
110
122
|
} else if (!newIsConnected) {
|
|
123
|
+
lastSyncedWeb3AuthConnection.value = null;
|
|
111
124
|
if (wagmiConfig.state.status === "connected") {
|
|
112
125
|
await disconnectWeb3AuthFromWagmi(wagmiConfig);
|
|
113
126
|
}
|
|
@@ -173,7 +186,7 @@ const WagmiProvider = vue.defineComponent({
|
|
|
173
186
|
return viem.fallback(transports);
|
|
174
187
|
};
|
|
175
188
|
const defineWagmiConfig = () => {
|
|
176
|
-
var _web3Auth$
|
|
189
|
+
var _web3Auth$value2;
|
|
177
190
|
const configParams = _objectSpread(_objectSpread({
|
|
178
191
|
ssr: true
|
|
179
192
|
}, config), {}, {
|
|
@@ -184,7 +197,7 @@ const WagmiProvider = vue.defineComponent({
|
|
|
184
197
|
client: undefined
|
|
185
198
|
});
|
|
186
199
|
const wagmiChains = [];
|
|
187
|
-
if (isInitialized.value && web3Auth !== null && web3Auth !== void 0 && (_web3Auth$
|
|
200
|
+
if (isInitialized.value && web3Auth !== null && web3Auth !== void 0 && (_web3Auth$value2 = web3Auth.value) !== null && _web3Auth$value2 !== void 0 && (_web3Auth$value2 = _web3Auth$value2.coreOptions) !== null && _web3Auth$value2 !== void 0 && _web3Auth$value2.chains) {
|
|
188
201
|
var _web3Auth$value$curre;
|
|
189
202
|
const defaultChainId = (_web3Auth$value$curre = web3Auth.value.currentChain) === null || _web3Auth$value$curre === void 0 ? void 0 : _web3Auth$value$curre.chainId;
|
|
190
203
|
const chains = web3Auth.value.coreOptions.chains.filter(chain => chain.chainNamespace === noModal.CHAIN_NAMESPACES.EIP155);
|
|
@@ -232,8 +245,8 @@ const WagmiProvider = vue.defineComponent({
|
|
|
232
245
|
}
|
|
233
246
|
};
|
|
234
247
|
vue.watch(isInitialized, (newIsInitialized, prevIsInitialized) => {
|
|
235
|
-
var _web3Auth$
|
|
236
|
-
(_web3Auth$
|
|
248
|
+
var _web3Auth$value3;
|
|
249
|
+
(_web3Auth$value3 = web3Auth.value) === null || _web3Auth$value3 === void 0 || _web3Auth$value3.setAnalyticsProperties({
|
|
237
250
|
wagmi_enabled: true
|
|
238
251
|
});
|
|
239
252
|
if (newIsInitialized && !prevIsInitialized) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@web3auth/no-modal/account-linking";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export type { CITADEL_NETWORK, CitadelLinkAccountPayload, IUseLinkAccount, IUseSwitchAccount, LinkAccountParams, LinkAccountResult, LinkedAccountInfo, UnlinkAccountPayload, UnlinkAccountResult, } from "@web3auth/no-modal/account-linking/react";
|
|
2
|
+
export { makeAccountLinkingRequest, makeAccountUnlinkingRequest, useLinkAccount, useSwitchAccount } from "@web3auth/no-modal/account-linking/react";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export type { CITADEL_NETWORK, CitadelLinkAccountPayload, IUseLinkAccount, IUseSwitchAccount, LinkAccountParams, LinkAccountResult, LinkedAccountInfo, UnlinkAccountPayload, UnlinkAccountResult, } from "@web3auth/no-modal/account-linking/vue";
|
|
2
|
+
export { makeAccountLinkingRequest, makeAccountUnlinkingRequest, useLinkAccount, useSwitchAccount } from "@web3auth/no-modal/account-linking/vue";
|