From ebcb6027defa575ce2e97472493cf5982b052ad7 Mon Sep 17 00:00:00 2001 From: devchenyan Date: Thu, 24 Oct 2024 08:46:30 +0800 Subject: [PATCH] fix: Asset Accounts UI (#3252) * fix: Asset Accounts UI * fix: spell check --- .../src/components/PageContainer/index.tsx | 34 ++++++++++--------- .../PageContainer/pageContainer.module.scss | 5 ++- .../src/services/transaction-sender.ts | 10 +++--- 3 files changed, 27 insertions(+), 22 deletions(-) diff --git a/packages/neuron-ui/src/components/PageContainer/index.tsx b/packages/neuron-ui/src/components/PageContainer/index.tsx index d17f8b3649..7ad1f56910 100755 --- a/packages/neuron-ui/src/components/PageContainer/index.tsx +++ b/packages/neuron-ui/src/components/PageContainer/index.tsx @@ -132,22 +132,24 @@ const PageContainer: React.FC = props => { {notice && } - {showWaitForFullySynced && ( - - {t(`messages.codes.${ErrorCode.WaitForFullySynced}`)} - - - )} -
{children}
- +
+ {showWaitForFullySynced && ( + + {t(`messages.codes.${ErrorCode.WaitForFullySynced}`)} + + + )} +
{children}
+ +
) } diff --git a/packages/neuron-ui/src/components/PageContainer/pageContainer.module.scss b/packages/neuron-ui/src/components/PageContainer/pageContainer.module.scss index d45835d52d..7e08c0479e 100755 --- a/packages/neuron-ui/src/components/PageContainer/pageContainer.module.scss +++ b/packages/neuron-ui/src/components/PageContainer/pageContainer.module.scss @@ -3,7 +3,6 @@ .page { background: var(--main-background-color); color: var(--main-text-color); - padding: 0 24px; position: relative; display: flex; flex-direction: column; @@ -15,6 +14,7 @@ align-items: center; height: 72px; margin: 0; + padding: 0 24px; font-size: 20px; font-weight: 500; justify-content: space-between; @@ -78,6 +78,9 @@ } } } + .content { + padding: 0 24px; + } } .notice { diff --git a/packages/neuron-wallet/src/services/transaction-sender.ts b/packages/neuron-wallet/src/services/transaction-sender.ts index 09dfd25c10..ebe753e0c1 100644 --- a/packages/neuron-wallet/src/services/transaction-sender.ts +++ b/packages/neuron-wallet/src/services/transaction-sender.ts @@ -755,13 +755,13 @@ export default class TransactionSender { const withdrawFraction = withdrawEpoch.index * depositEpoch.length const depositFraction = depositEpoch.index * withdrawEpoch.length - let depositedEpoches = withdrawEpoch.number - depositEpoch.number + let depositedEpochs = withdrawEpoch.number - depositEpoch.number if (withdrawFraction > depositFraction) { - depositedEpoches += BigInt(1) + depositedEpochs += BigInt(1) } - const lockEpoches = - ((depositedEpoches + (DAO_LOCK_PERIOD_EPOCHS - BigInt(1))) / DAO_LOCK_PERIOD_EPOCHS) * DAO_LOCK_PERIOD_EPOCHS - const minimalSinceEpochNumber = depositEpoch.number + lockEpoches + const lockEpochs = + ((depositedEpochs + (DAO_LOCK_PERIOD_EPOCHS - BigInt(1))) / DAO_LOCK_PERIOD_EPOCHS) * DAO_LOCK_PERIOD_EPOCHS + const minimalSinceEpochNumber = depositEpoch.number + lockEpochs const minimalSinceEpochIndex = depositEpoch.index const minimalSinceEpochLength = depositEpoch.length