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 {
|
.maxButton {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: var(--spacing-sm);
|
right: var(--spacing-sm);
|
||||||
top: 36px;
|
bottom: var(--spacing-sm);
|
||||||
background: var(--primary-color);
|
background: var(--primary-color);
|
||||||
color: white;
|
color: white;
|
||||||
border: none;
|
border: none;
|
||||||
|
|
@ -133,6 +133,11 @@
|
||||||
padding: var(--spacing-xs) var(--spacing-sm);
|
padding: var(--spacing-xs) var(--spacing-sm);
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.amountInput {
|
||||||
|
padding-right: 60px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.maxButton:hover {
|
.maxButton:hover {
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,8 @@ export default function Transfer() {
|
||||||
// 表单输入
|
// 表单输入
|
||||||
const [toAddress, setToAddress] = useState('');
|
const [toAddress, setToAddress] = useState('');
|
||||||
const [amount, setAmount] = useState('');
|
const [amount, setAmount] = useState('');
|
||||||
const [password, setPassword] = useState('');
|
// 当前系统不使用密码,硬编码为空
|
||||||
|
const password = '';
|
||||||
|
|
||||||
// 交易信息
|
// 交易信息
|
||||||
const [txParams, setTxParams] = useState<TransactionParams | null>(null);
|
const [txParams, setTxParams] = useState<TransactionParams | null>(null);
|
||||||
|
|
@ -321,15 +322,21 @@ export default function Transfer() {
|
||||||
<div className={styles.formGroup}>
|
<div className={styles.formGroup}>
|
||||||
<label className={styles.label}>转账金额 (KAVA)</label>
|
<label className={styles.label}>转账金额 (KAVA)</label>
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="text"
|
||||||
className={styles.input}
|
inputMode="decimal"
|
||||||
|
className={`${styles.input} ${styles.amountInput}`}
|
||||||
placeholder="0.0"
|
placeholder="0.0"
|
||||||
value={amount}
|
value={amount}
|
||||||
onChange={(e) => setAmount(e.target.value)}
|
onChange={(e) => {
|
||||||
step="0.000001"
|
// 只允许数字和小数点
|
||||||
min="0"
|
const val = e.target.value;
|
||||||
|
if (val === '' || /^\d*\.?\d*$/.test(val)) {
|
||||||
|
setAmount(val);
|
||||||
|
}
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
|
type="button"
|
||||||
className={styles.maxButton}
|
className={styles.maxButton}
|
||||||
onClick={() => setAmount(share?.balance || '0')}
|
onClick={() => setAmount(share?.balance || '0')}
|
||||||
>
|
>
|
||||||
|
|
@ -337,17 +344,6 @@ export default function Transfer() {
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</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>}
|
{error && <div className={styles.error}>{error}</div>}
|
||||||
|
|
||||||
<button
|
<button
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue