Skip to content

Commit a462d13

Browse files
jungcome7claude
andcommitted
fix: 프로토타입 i18n 완전 일치 + 투어/가이드 9스텝 재설계
- KNOWN_SELECTORS 15개 메소드명 한/영 번역 적용 - 수수료 모달 텍스트 한/영 번역 (Low→느림, Average→보통, High→빠름) - 투어 9스텝 재설계: A1-A4 (업/다운) + B1-B5 (배치 서명) - 가이드 오버레이 동일 9스텝 반영 - 다운그레이드 확인 스텝 신규 추가 - 수수료 모달 스텝 신규 추가 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 009a21c commit a462d13

File tree

4 files changed

+331
-299
lines changed

4 files changed

+331
-299
lines changed

apps/web/src/smart-account-prototype/components/mock-calls-list.tsx

Lines changed: 47 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,51 @@ import styled from "styled-components";
99
import { DSColor, DSTypography } from "@keplr-wallet/design-system";
1010

1111
const KNOWN_SELECTORS: Record<string, string> = {
12-
"0xa9059cbb": "Transfer",
13-
"0x095ea7b3": "Approve",
14-
"0x23b872dd": "Transfer From",
15-
"0x42842e0e": "Safe Transfer From",
16-
"0x38ed1739": "Swap Tokens",
17-
"0x7ff36ab5": "Swap ETH for Tokens",
18-
"0x18cbafe5": "Swap Tokens for ETH",
19-
"0x5c11d795": "Swap Exact Tokens",
20-
"0xfb3bdb41": "Swap ETH for Exact Tokens",
21-
"0x3593564c": "Execute (Universal Router)",
22-
"0x04e45aaf": "Exact Input Single",
23-
"0xb858183f": "Exact Input",
24-
"0x414bf389": "Exact Input Single (V3)",
25-
"0xd0e30db0": "Deposit (Wrap)",
26-
"0x2e1a7d4d": "Withdraw (Unwrap)",
12+
"0xa9059cbb": "transfer",
13+
"0x095ea7b3": "approve",
14+
"0x23b872dd": "transfer-from",
15+
"0x42842e0e": "safe-transfer-from",
16+
"0x38ed1739": "swap-tokens",
17+
"0x7ff36ab5": "swap-eth-for-tokens",
18+
"0x18cbafe5": "swap-tokens-for-eth",
19+
"0x5c11d795": "swap-exact-tokens",
20+
"0xfb3bdb41": "swap-eth-for-exact-tokens",
21+
"0x3593564c": "execute-universal-router",
22+
"0x04e45aaf": "exact-input-single",
23+
"0xb858183f": "exact-input",
24+
"0x414bf389": "exact-input-single-v3",
25+
"0xd0e30db0": "deposit-wrap",
26+
"0x2e1a7d4d": "withdraw-unwrap",
2727
};
2828

29-
function decodeMethodName(data: string | undefined): string | null {
29+
const METHOD_NAMES: Record<string, { ko: string; en: string }> = {
30+
transfer: { ko: "전송", en: "Transfer" },
31+
approve: { ko: "승인", en: "Approve" },
32+
"transfer-from": { ko: "전송 (대리)", en: "Transfer From" },
33+
"safe-transfer-from": { ko: "안전 전송 (대리)", en: "Safe Transfer From" },
34+
"swap-tokens": { ko: "토큰 스왑", en: "Swap Tokens" },
35+
"swap-eth-for-tokens": { ko: "ETH → 토큰 스왑", en: "Swap ETH for Tokens" },
36+
"swap-tokens-for-eth": { ko: "토큰 → ETH 스왑", en: "Swap Tokens for ETH" },
37+
"swap-exact-tokens": { ko: "정확한 토큰 스왑", en: "Swap Exact Tokens" },
38+
"swap-eth-for-exact-tokens": {
39+
ko: "ETH → 정확한 토큰 스왑",
40+
en: "Swap ETH for Exact Tokens",
41+
},
42+
"execute-universal-router": {
43+
ko: "실행 (유니버설 라우터)",
44+
en: "Execute (Universal Router)",
45+
},
46+
"exact-input-single": { ko: "단일 정확 입력", en: "Exact Input Single" },
47+
"exact-input": { ko: "정확 입력", en: "Exact Input" },
48+
"exact-input-single-v3": {
49+
ko: "단일 정확 입력 (V3)",
50+
en: "Exact Input Single (V3)",
51+
},
52+
"deposit-wrap": { ko: "예치 (래핑)", en: "Deposit (Wrap)" },
53+
"withdraw-unwrap": { ko: "인출 (언래핑)", en: "Withdraw (Unwrap)" },
54+
};
55+
56+
function decodeMethodKey(data: string | undefined): string | null {
3057
if (!data || data === "0x" || data.length < 10) return null;
3158
const selector = data.slice(0, 10).toLowerCase();
3259
return KNOWN_SELECTORS[selector] ?? null;
@@ -63,7 +90,10 @@ const CallCard: FunctionComponent<{
6390
}
6491
})();
6592

66-
const methodName = decodeMethodName(call.data);
93+
const methodKey = decodeMethodKey(call.data);
94+
const methodName = methodKey
95+
? t(METHOD_NAMES[methodKey].ko, METHOD_NAMES[methodKey].en)
96+
: null;
6797
const dataPreview =
6898
call.data && call.data !== "0x" ? call.data.slice(0, 10) : null;
6999

apps/web/src/smart-account-prototype/components/mock-transaction-fee-modal.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,11 @@ export const MockTransactionFeeModal: FunctionComponent<{
104104
$mode={mode}
105105
onClick={() => setSelectedFee(option)}
106106
>
107-
{option}
107+
{option === "Low"
108+
? t("느림", "Low")
109+
: option === "Average"
110+
? t("보통", "Average")
111+
: t("빠름", "High")}
108112
</FeeOptionButton>
109113
))}
110114
</XAxis>

0 commit comments

Comments
 (0)