From 4f695953d3e42f42586a258e0670a147caee07aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E4=B8=81?= Date: Wed, 5 Aug 2026 20:59:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E9=92=B1=E5=8C=85?= =?UTF-8?q?=E7=99=BB=E5=BD=95=20SIWE=20statement=20=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E5=9B=BA=E5=AE=9A=20ASCII=EF=BC=8C=E9=81=BF=E5=85=8D=E9=9D=9E?= =?UTF-8?q?=E8=8B=B1=E6=96=87=E8=AF=AD=E8=A8=80=E8=A7=A3=E6=9E=90=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- src/locales/en.json | 3 +-- src/locales/ja.json | 3 +-- src/locales/ko.json | 3 +-- src/locales/zh-CN.json | 3 +-- src/locales/zh-TW.json | 3 +-- src/views/Login.vue | 5 ++++- 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index 3cb84aa..21f9fe5 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -160,8 +160,7 @@ "loginFailed": "Sign in failed. Please check your credentials and try again.", "credentialsRequired": "Please enter username and password.", "captchaRequired": "Please enter the captcha.", - "captchaLoadFailed": "Failed to load captcha. Please refresh and try again.", - "siweStatement": "Sign in to FuturePulse" + "captchaLoadFailed": "Failed to load captcha. Please refresh and try again." }, "register": { "title": "Sign Up", diff --git a/src/locales/ja.json b/src/locales/ja.json index 52472ae..30620ec 100644 --- a/src/locales/ja.json +++ b/src/locales/ja.json @@ -160,8 +160,7 @@ "loginFailed": "サインインに失敗しました。認証情報を確認してください。", "credentialsRequired": "ユーザー名とパスワードを入力してください。", "captchaRequired": "認証コードを入力してください。", - "captchaLoadFailed": "認証コードの読み込みに失敗しました。更新して再試行してください。", - "siweStatement": "FuturePulse にサインイン" + "captchaLoadFailed": "認証コードの読み込みに失敗しました。更新して再試行してください。" }, "register": { "title": "新規登録", diff --git a/src/locales/ko.json b/src/locales/ko.json index c68ca5a..5d633f7 100644 --- a/src/locales/ko.json +++ b/src/locales/ko.json @@ -160,8 +160,7 @@ "loginFailed": "로그인에 실패했습니다. 계정 정보를 확인해 주세요.", "credentialsRequired": "사용자 이름과 비밀번호를 입력해 주세요.", "captchaRequired": "인증 코드를 입력해 주세요.", - "captchaLoadFailed": "인증 코드를 불러오지 못했습니다. 새로고침 후 다시 시도해 주세요.", - "siweStatement": "FuturePulse 로그인" + "captchaLoadFailed": "인증 코드를 불러오지 못했습니다. 새로고침 후 다시 시도해 주세요." }, "register": { "title": "회원가입", diff --git a/src/locales/zh-CN.json b/src/locales/zh-CN.json index 19874d2..ac60a8a 100644 --- a/src/locales/zh-CN.json +++ b/src/locales/zh-CN.json @@ -160,8 +160,7 @@ "loginFailed": "登录失败,请检查账号密码后重试。", "credentialsRequired": "请输入用户名和密码。", "captchaRequired": "请输入验证码。", - "captchaLoadFailed": "验证码加载失败,请刷新后重试。", - "siweStatement": "登录 FuturePulse" + "captchaLoadFailed": "验证码加载失败,请刷新后重试。" }, "register": { "title": "注册", diff --git a/src/locales/zh-TW.json b/src/locales/zh-TW.json index a170694..27d13cf 100644 --- a/src/locales/zh-TW.json +++ b/src/locales/zh-TW.json @@ -160,8 +160,7 @@ "loginFailed": "登入失敗,請檢查帳號密碼後重試。", "credentialsRequired": "請輸入使用者名稱和密碼。", "captchaRequired": "請輸入驗證碼。", - "captchaLoadFailed": "驗證碼載入失敗,請刷新後重試。", - "siweStatement": "登入 FuturePulse" + "captchaLoadFailed": "驗證碼載入失敗,請刷新後重試。" }, "register": { "title": "註冊", diff --git a/src/views/Login.vue b/src/views/Login.vue index d81ebe2..ab1cac6 100644 --- a/src/views/Login.vue +++ b/src/views/Login.vue @@ -106,6 +106,9 @@ import { useUserStore } from '@/stores/user' import { post } from '@/api/request' import { getCaptcha, loginByPassword, parseLoginResponse, type LoginResponseData } from '@/api/auth' +// EIP-4361 只允许可打印 US-ASCII 的 statement,不能本地化 +const SIWE_STATEMENT = 'Sign in to FuturePulse' + const router = useRouter() const { t } = useI18n() const userStore = useUserStore() @@ -213,7 +216,7 @@ const connectWithWallet = async () => { scheme, domain, address: signer.address, - statement: t('login.siweStatement'), + statement: SIWE_STATEMENT, uri: origin, version: '1', chainId: chainId,