From 7e26191df32536fef423242dbaf51f0c34581925 Mon Sep 17 00:00:00 2001 From: yanguoyu <841185308@qq.com> Date: Sat, 7 Oct 2023 18:48:48 +0800 Subject: [PATCH 1/4] fix: Lock time cells should save into local database. --- .../src/services/tx/transaction-persistor.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/neuron-wallet/src/services/tx/transaction-persistor.ts b/packages/neuron-wallet/src/services/tx/transaction-persistor.ts index 9a8b1dc88e..05a2d8203c 100644 --- a/packages/neuron-wallet/src/services/tx/transaction-persistor.ts +++ b/packages/neuron-wallet/src/services/tx/transaction-persistor.ts @@ -400,12 +400,13 @@ export class TransactionPersistor { private static shouldSaveDetail(cell: InputEntity | OutputEntity, lockArgsSetNeedsDetail: Set) { return ( - cell.lockArgs && - (lockArgsSetNeedsDetail.has(cell.lockArgs) || - (cell.lockArgs.length === CHEQUE_ARGS_LENGTH && - [cell.lockArgs.slice(0, DEFAULT_ARGS_LENGTH), `0x${cell.lockArgs.slice(DEFAULT_ARGS_LENGTH)}`].some(v => - lockArgsSetNeedsDetail.has(v) - ))) + (cell.multiSignBlake160 && lockArgsSetNeedsDetail.has(cell.multiSignBlake160)) || + (cell.lockArgs && + (lockArgsSetNeedsDetail.has(cell.lockArgs) || + (cell.lockArgs.length === CHEQUE_ARGS_LENGTH && + [cell.lockArgs.slice(0, DEFAULT_ARGS_LENGTH), `0x${cell.lockArgs.slice(DEFAULT_ARGS_LENGTH)}`].some(v => + lockArgsSetNeedsDetail.has(v) + )))) ) } From 2d0257c5721cbf621ec65df3fa7dbf731120fd74 Mon Sep 17 00:00:00 2001 From: yanguoyu <841185308@qq.com> Date: Sat, 7 Oct 2023 20:24:45 +0800 Subject: [PATCH 2/4] fix: For light client only skip update if not current wallet. Fixed table head style. --- packages/neuron-ui/src/widgets/Table/table.module.scss | 2 +- packages/neuron-wallet/src/services/multisig.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/neuron-ui/src/widgets/Table/table.module.scss b/packages/neuron-ui/src/widgets/Table/table.module.scss index c39a8aefd1..eb9fc5d35d 100755 --- a/packages/neuron-ui/src/widgets/Table/table.module.scss +++ b/packages/neuron-ui/src/widgets/Table/table.module.scss @@ -34,7 +34,7 @@ $head-height: 52px; border-top: 1px solid var(--table-head-border-color); border-bottom: 1px solid var(--table-head-border-color); - & > .headWithBalance { + .headWithBalance { display: flex; align-items: center; } diff --git a/packages/neuron-wallet/src/services/multisig.ts b/packages/neuron-wallet/src/services/multisig.ts index 40397f617a..922fbf7161 100644 --- a/packages/neuron-wallet/src/services/multisig.ts +++ b/packages/neuron-wallet/src/services/multisig.ts @@ -279,7 +279,7 @@ export default class MultisigService { multisigConfigs.map(v => { const blockNumber = syncBlockNumbersMap[scriptToHash(Multisig.getMultisigScript(v.blake160s, v.r, v.m, v.n))] - v.lastestBlockNumber = `0x${BigInt(blockNumber).toString(16)}` + v.lastestBlockNumber = `0x${BigInt(blockNumber ?? v.lastestBlockNumber).toString(16)}` return v }) ) From fea5df2ff9e1c6b7427429aeffcd76b7776a45ab Mon Sep 17 00:00:00 2001 From: yanguoyu <841185308@qq.com> Date: Sun, 8 Oct 2023 14:13:16 +0800 Subject: [PATCH 3/4] fix: If not enter start block number, disabled sumbit. --- packages/neuron-ui/src/components/PageContainer/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/neuron-ui/src/components/PageContainer/index.tsx b/packages/neuron-ui/src/components/PageContainer/index.tsx index 1b7757d605..3c1243bf38 100755 --- a/packages/neuron-ui/src/components/PageContainer/index.tsx +++ b/packages/neuron-ui/src/components/PageContainer/index.tsx @@ -151,6 +151,7 @@ const PageContainer: React.FC = props => { show={isSetStartBlockShown} onCancel={closeDialog} onConfirm={onConfirm} + disabled={!startBlockNumber} >

{t('set-start-block-number.tip')}

Date: Sun, 8 Oct 2023 16:39:23 +0800 Subject: [PATCH 4/4] fix: Fix asset send styles, dialog style and enable enter signature --- .../src/components/SUDTSend/index.tsx | 6 ++++-- .../components/SUDTSend/sUDTSend.module.scss | 18 ++++++++++++++++-- .../src/components/SignAndVerify/index.tsx | 1 - .../src/widgets/Dialog/dialog.module.scss | 6 +----- 4 files changed, 21 insertions(+), 10 deletions(-) diff --git a/packages/neuron-ui/src/components/SUDTSend/index.tsx b/packages/neuron-ui/src/components/SUDTSend/index.tsx index 2a4a9735e5..799976413c 100644 --- a/packages/neuron-ui/src/components/SUDTSend/index.tsx +++ b/packages/neuron-ui/src/components/SUDTSend/index.tsx @@ -353,11 +353,13 @@ const SUDTSend = () => {
-
+
{accountInfo?.accountName}
{displayTokenName}
- {showBalance ? balance : HIDE_BALANCE} {displaySymbol} + + {showBalance ? balance : HIDE_BALANCE} {displaySymbol} + diff --git a/packages/neuron-ui/src/components/SUDTSend/sUDTSend.module.scss b/packages/neuron-ui/src/components/SUDTSend/sUDTSend.module.scss index 865fff309f..0df08c4cff 100644 --- a/packages/neuron-ui/src/components/SUDTSend/sUDTSend.module.scss +++ b/packages/neuron-ui/src/components/SUDTSend/sUDTSend.module.scss @@ -20,12 +20,15 @@ $bottomHeight: 186px; } } +$right-min-width: 476px; + .layout { display: flex; .left { flex: 1; position: relative; + max-width: calc(100% - $right-min-width); .info { padding: 20px 16px 16px; @@ -33,6 +36,9 @@ $bottomHeight: 186px; display: flex; gap: 16px; color: var(--main-text-color); + .infoDetails { + max-width: calc(100% - 48px); + } .accountName { font-weight: 500; font-size: 14px; @@ -42,10 +48,9 @@ $bottomHeight: 186px; margin-top: 4px; font-size: 12px; line-height: 17px; - overflow: initial !important; position: relative; color: var(--input-second-color); - display: inline-flex; + @include text-overflow-ellipsis; } .balance { margin-top: 8px; @@ -54,10 +59,14 @@ $bottomHeight: 186px; line-height: 22px; display: flex; align-items: center; + & > span { + @include text-overflow-ellipsis; + } .btn { height: 16px; min-width: 16px; padding: 0 8px; + flex-shrink: 0; svg { g, path { @@ -106,6 +115,10 @@ $bottomHeight: 186px; } .amount { margin-top: 20px; + + & > label { + @include text-overflow-ellipsis; + } } .max { border-left: var(--divide-line-color) solid 1px; @@ -162,6 +175,7 @@ $bottomHeight: 186px; .right { margin-left: 16px; flex: 1; + min-width: $right-min-width; @include card; .rightContent { diff --git a/packages/neuron-ui/src/components/SignAndVerify/index.tsx b/packages/neuron-ui/src/components/SignAndVerify/index.tsx index 43b54bb315..d8cd73ea1d 100644 --- a/packages/neuron-ui/src/components/SignAndVerify/index.tsx +++ b/packages/neuron-ui/src/components/SignAndVerify/index.tsx @@ -316,7 +316,6 @@ const SignAndVerify = () => { field="signature" value={signature} onChange={handleInputChange} - disabled={!signature} width="100%" /> diff --git a/packages/neuron-ui/src/widgets/Dialog/dialog.module.scss b/packages/neuron-ui/src/widgets/Dialog/dialog.module.scss index 418650c777..e18b0d40e4 100644 --- a/packages/neuron-ui/src/widgets/Dialog/dialog.module.scss +++ b/packages/neuron-ui/src/widgets/Dialog/dialog.module.scss @@ -48,12 +48,8 @@ .content { padding: 20px 16px; position: relative; - max-height: calc(90vh); + max-height: calc(100vh - 260px); overflow-y: scroll; - scrollbar-width: none; - &::-webkit-scrollbar { - display: none; - } } .footerWrap {