Skip to content

Commit eb20d19

Browse files
committed
fix: comments
1 parent ccfc08d commit eb20d19

File tree

10 files changed

+28
-26
lines changed

10 files changed

+28
-26
lines changed

packages/neuron-ui/src/components/MultisigAddress/index.tsx

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -205,21 +205,23 @@ const MultisigAddress = () => {
205205
)
206206

207207
const daoDisabledMessage = useMemo(() => {
208-
if (wallet.device) {
209-
if (
210-
(daoDepositAction.depositFromMultisig && daoDepositAction.isDialogOpen) ||
211-
(daoWithdrawAction.withdrawFromMultisig && daoWithdrawAction.isDialogOpen)
212-
) {
213-
const multisigConfig = daoDepositAction.depositFromMultisig || daoWithdrawAction.withdrawFromMultisig
214-
if (!multisigConfig) return ''
215-
const { canSign } = getMultisigSignStatus({
216-
multisigConfig,
217-
addresses,
218-
})
219-
220-
return canSign ? 'dao-ledger-notice' : 'dao-hardware-not-match'
221-
}
208+
if (!wallet.device) return ''
209+
210+
const multisigConfig = daoDepositAction.depositFromMultisig || daoWithdrawAction.withdrawFromMultisig
211+
if (!multisigConfig) return ''
212+
213+
if (
214+
(daoDepositAction.depositFromMultisig && daoDepositAction.isDialogOpen) ||
215+
(daoWithdrawAction.withdrawFromMultisig && daoWithdrawAction.isDialogOpen)
216+
) {
217+
const { canSign } = getMultisigSignStatus({
218+
multisigConfig,
219+
addresses,
220+
})
221+
222+
return canSign ? 'dao-ledger-notice' : 'dao-hardware-not-match'
222223
}
224+
223225
return ''
224226
}, [daoDepositAction, daoWithdrawAction, wallet.device, addresses])
225227

packages/neuron-ui/src/components/WithdrawDialog/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ const WithdrawDialog = ({
7575
(Number(currentEpochInfo.number) + Number(currentEpochInfo.index) / Number(currentEpochInfo.length))
7676
).toFixed(1)
7777
const message =
78-
epochs >= 0 ? (
78+
epochs > 5 ? (
7979
<>
8080
<Attention />
8181
{t('nervos-dao.notice-wait-time', {

packages/neuron-ui/src/components/WithdrawDialog/withdrawDialog.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
margin: 44px 0 0 0;
6161
border: 1px solid rgba(252, 136, 0, 0.2);
6262
padding: 8px 36px;
63-
width: max-content;
63+
max-width: 760px;
6464
border-radius: 4px;
6565
background: #fff6eb;
6666
color: #f68c2a;

packages/neuron-ui/src/locales/ar.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,7 @@
11711171
"daoWithdraw": "سحب من DAO"
11721172
}
11731173
},
1174-
"dao-ledger-notice": "تدعم محافظ Ledger حاليًا توقيع معاملات DAO فقط، ولا تدعم بدء الإيداعات أو السحوبات. يرجى التحقق من التحديثات المستقبلية.",
1174+
"dao-ledger-notice": "محافظ Ledger لا تدعم حاليًا معاملات DAO لعناوين التوقيع المتعدد. يُرجى استخدام عنوان بتوقيع فردي أو الانتظار للتحديثات المستقبلية.",
11751175
"dao-hardware-not-match": "المحفظة الصلبة المتصلة حاليًا لا تتطابق مع المحفظة الحالية.",
11761176
"import-dialog": {
11771177
"actions": {

packages/neuron-ui/src/locales/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,7 @@
11711171
"daoWithdraw": "DAO Withdraw"
11721172
}
11731173
},
1174-
"dao-ledger-notice": "Ledger wallets currently support only signing DAO transactions, not initiating deposits or withdrawals. Please check back for future updates.",
1174+
"dao-ledger-notice": "Ledger wallets currently do not support DAO transactions for multisig addresses. Please use a single-signature address or await future updates.",
11751175
"dao-hardware-not-match": "The hardware wallet currently connected does not match the current wallet.",
11761176
"import-dialog": {
11771177
"actions": {

packages/neuron-ui/src/locales/es.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1154,7 +1154,7 @@
11541154
"daoWithdraw": "Retirar de DAO"
11551155
}
11561156
},
1157-
"dao-ledger-notice": "Las billeteras Ledger actualmente solo admiten la firma de transacciones DAO, no la iniciación de depósitos o retiros. Vuelva a consultar para futuras actualizaciones.",
1157+
"dao-ledger-notice": "Las billeteras Ledger actualmente no admiten transacciones DAO para direcciones multifirma. Por favor, use una dirección de firma única o espere futuras actualizaciones.",
11581158
"dao-hardware-not-match": "La billetera de hardware conectada actualmente no coincide con la billetera actual.",
11591159
"import-dialog": {
11601160
"actions": {

packages/neuron-ui/src/locales/fr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1161,7 +1161,7 @@
11611161
"daoWithdraw": "Retirer de DAO"
11621162
}
11631163
},
1164-
"dao-ledger-notice": "Les portefeuilles Ledger prennent actuellement en charge uniquement la signature des transactions DAO, mais pas l’initiation des dépôts ou des retraits. Veuillez vérifier les mises à jour futures.",
1164+
"dao-ledger-notice": "Les portefeuilles Ledger ne prennent actuellement pas en charge les transactions DAO pour les adresses multisignatures. Veuillez utiliser une adresse à signature unique ou attendre les futures mises à jour.",
11651165
"dao-hardware-not-match": "Le portefeuille matériel actuellement connecté ne correspond pas au portefeuille actuel.",
11661166
"import-dialog": {
11671167
"actions": {

packages/neuron-ui/src/locales/zh-tw.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@
11641164
"daoWithdraw": "從 DAO 取出"
11651165
}
11661166
},
1167-
"dao-ledger-notice": "Ledger 錢包目前僅支援簽署 DAO 交易,無法發起存款或提取。請關注未來的更新",
1167+
"dao-ledger-notice": "Ledger 錢包目前不支援多重簽名地址的 DAO 交易。請使用單一簽名地址或等待未來的更新",
11681168
"dao-hardware-not-match": "當前連接的硬體錢包與當前錢包不匹配。",
11691169
"import-dialog": {
11701170
"actions": {

packages/neuron-ui/src/locales/zh.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,7 @@
11631163
"daoWithdraw": "从 DAO 取出"
11641164
}
11651165
},
1166-
"dao-ledger-notice": "Ledger 钱包目前仅支持签署 DAO 交易,无法发起存款或提取。请关注未来的更新",
1166+
"dao-ledger-notice": "Ledger 钱包目前不支持多签地址的 DAO 交易。请使用单签地址或等待未来的更新",
11671167
"dao-hardware-not-match": "当前连接的硬件钱包与当前钱包不匹配。",
11681168
"import-dialog": {
11691169
"actions": {

packages/neuron-wallet/src/services/multisig.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export default class MultisigService {
114114
}
115115

116116
static async getCells(multisigConfigs: MultisigConfig[]) {
117-
const cells: any[] = []
117+
const cells: RPC.IndexerCell[] = []
118118
const addressCursorMap: Map<string, string> = new Map()
119119
let currentMultisigConfigs = MultisigService.removeDulpicateConfig(multisigConfigs)
120120
const network = NetworksService.getInstance().getCurrent()
@@ -161,7 +161,7 @@ export default class MultisigService {
161161

162162
static async getLiveCells(multisigConfigs: MultisigConfig[]) {
163163
const cells = await MultisigService.getCells(multisigConfigs)
164-
return cells.filter((object: any) => !object?.output?.type).map((object: any) => MultisigOutput.fromIndexer(object))
164+
return cells.filter(object => !object?.output?.type).map(object => MultisigOutput.fromIndexer(object))
165165
}
166166

167167
static async saveLiveMultisigOutput() {
@@ -177,8 +177,8 @@ export default class MultisigService {
177177
const cells = await MultisigService.getCells(multisigConfigs)
178178
if (cells.length) {
179179
const daoTxHash = new Set<string>()
180-
cells.forEach((cell: any) => {
181-
if (cell?.output?.type?.code_hash === SystemScriptInfo.DAO_CODE_HASH) {
180+
cells.forEach(cell => {
181+
if (cell.output?.type?.code_hash === SystemScriptInfo.DAO_CODE_HASH) {
182182
daoTxHash.add(cell.out_point.tx_hash)
183183
}
184184
})

0 commit comments

Comments
 (0)