fix(service-party-app): remove wallet password input from transfer page
Current system uses empty password for share encryption, so the password input field is unnecessary and confusing for users. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
625f9373a7
commit
44be9c8810
|
|
@ -125,7 +125,7 @@
|
|||
.maxButton {
|
||||
position: absolute;
|
||||
right: var(--spacing-sm);
|
||||
top: 36px;
|
||||
bottom: var(--spacing-sm);
|
||||
background: var(--primary-color);
|
||||
color: white;
|
||||
border: none;
|
||||
|
|
@ -133,6 +133,11 @@
|
|||
padding: var(--spacing-xs) var(--spacing-sm);
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.amountInput {
|
||||
padding-right: 60px !important;
|
||||
}
|
||||
|
||||
.maxButton:hover {
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@ export default function Transfer() {
|
|||
// 表单输入
|
||||
const [toAddress, setToAddress] = useState('');
|
||||
const [amount, setAmount] = useState('');
|
||||
const [password, setPassword] = useState('');
|
||||
// 当前系统不使用密码,硬编码为空
|
||||
const password = '';
|
||||
|
||||
// 交易信息
|
||||
const [txParams, setTxParams] = useState<TransactionParams | null>(null);
|
||||
|
|
@ -321,15 +322,21 @@ export default function Transfer() {
|
|||
<div className={styles.formGroup}>
|
||||
<label className={styles.label}>转账金额 (KAVA)</label>
|
||||
<input
|
||||
type="number"
|
||||
className={styles.input}
|
||||
type="text"
|
||||
inputMode="decimal"
|
||||
className={`${styles.input} ${styles.amountInput}`}
|
||||
placeholder="0.0"
|
||||
value={amount}
|
||||
onChange={(e) => setAmount(e.target.value)}
|
||||
step="0.000001"
|
||||
min="0"
|
||||
onChange={(e) => {
|
||||
// 只允许数字和小数点
|
||||
const val = e.target.value;
|
||||
if (val === '' || /^\d*\.?\d*$/.test(val)) {
|
||||
setAmount(val);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
className={styles.maxButton}
|
||||
onClick={() => setAmount(share?.balance || '0')}
|
||||
>
|
||||
|
|
@ -337,17 +344,6 @@ export default function Transfer() {
|
|||
</button>
|
||||
</div>
|
||||
|
||||
<div className={styles.formGroup}>
|
||||
<label className={styles.label}>钱包密码</label>
|
||||
<input
|
||||
type="password"
|
||||
className={styles.input}
|
||||
placeholder="输入密码以解锁钱包"
|
||||
value={password}
|
||||
onChange={(e) => setPassword(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{error && <div className={styles.error}>{error}</div>}
|
||||
|
||||
<button
|
||||
|
|
|
|||
Loading…
Reference in New Issue