Skip to content

Commit

Permalink
fix: Asset Accounts UI (#3252)
Browse files Browse the repository at this point in the history
* fix: Asset Accounts UI

* fix: spell check
  • Loading branch information
devchenyan authored Oct 24, 2024
1 parent ae4af6e commit ebcb602
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 22 deletions.
34 changes: 18 additions & 16 deletions packages/neuron-ui/src/components/PageContainer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,22 +132,24 @@ const PageContainer: React.FC<ComponentProps> = props => {
</div>
{notice && <PageHeadNotice notice={notice} />}
</div>
{showWaitForFullySynced && (
<Alert status="warn" className={styles.syncNotification}>
{t(`messages.codes.${ErrorCode.WaitForFullySynced}`)}
<Close className={styles.close} onClick={closeSyncNotice} />
</Alert>
)}
<div className={styles.body}>{children}</div>
<SetStartBlockNumberDialog
show={isSetStartBlockShown}
headerTipNumber={bestKnownBlockNumber}
initStartBlockNumber={walletStartBlockNumber ? Number(walletStartBlockNumber) : undefined}
isMainnet={isMainnet}
address={addresses[0]?.address}
onUpdateStartBlockNumber={onConfirm}
onCancel={closeDialog}
/>
<div className={styles.content}>
{showWaitForFullySynced && (
<Alert status="warn" className={styles.syncNotification}>
{t(`messages.codes.${ErrorCode.WaitForFullySynced}`)}
<Close className={styles.close} onClick={closeSyncNotice} />
</Alert>
)}
<div className={styles.body}>{children}</div>
<SetStartBlockNumberDialog
show={isSetStartBlockShown}
headerTipNumber={bestKnownBlockNumber}
initStartBlockNumber={walletStartBlockNumber ? Number(walletStartBlockNumber) : undefined}
isMainnet={isMainnet}
address={addresses[0]?.address}
onUpdateStartBlockNumber={onConfirm}
onCancel={closeDialog}
/>
</div>
</div>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -15,6 +14,7 @@
align-items: center;
height: 72px;
margin: 0;
padding: 0 24px;
font-size: 20px;
font-weight: 500;
justify-content: space-between;
Expand Down Expand Up @@ -78,6 +78,9 @@
}
}
}
.content {
padding: 0 24px;
}
}

.notice {
Expand Down
10 changes: 5 additions & 5 deletions packages/neuron-wallet/src/services/transaction-sender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ebcb602

Please sign in to comment.