Skip to content

Commit

Permalink
Merge pull request #2861 from nervosnetwork/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY authored Oct 9, 2023
2 parents 782b8c5 + b3f3c2e commit 0d72d95
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 18 deletions.
1 change: 1 addition & 0 deletions packages/neuron-ui/src/components/PageContainer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ const PageContainer: React.FC<ComponentProps> = props => {
show={isSetStartBlockShown}
onCancel={closeDialog}
onConfirm={onConfirm}
disabled={!startBlockNumber}
>
<p className={styles.startBlockTip}>{t('set-start-block-number.tip')}</p>
<TextField
Expand Down
6 changes: 4 additions & 2 deletions packages/neuron-ui/src/components/SUDTSend/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -353,11 +353,13 @@ const SUDTSend = () => {
<div className={styles.left}>
<div className={styles.info}>
<SUDTAvatar type="logo" />
<div>
<div className={styles.infoDetails}>
<div className={styles.accountName}>{accountInfo?.accountName}</div>
<div className={styles.tokenName}>{displayTokenName}</div>
<div className={styles.balance}>
{showBalance ? balance : HIDE_BALANCE} {displaySymbol}
<span>
{showBalance ? balance : HIDE_BALANCE} {displaySymbol}
</span>
<Button className={styles.btn} type="text" onClick={() => setShowBalance(prev => !prev)}>
{showBalance ? <EyesOpen /> : <EyesClose />}
</Button>
Expand Down
18 changes: 16 additions & 2 deletions packages/neuron-ui/src/components/SUDTSend/sUDTSend.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,25 @@ $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;
@include card;
display: flex;
gap: 16px;
color: var(--main-text-color);
.infoDetails {
max-width: calc(100% - 48px);
}
.accountName {
font-weight: 500;
font-size: 14px;
Expand All @@ -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;
Expand All @@ -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 {
Expand Down Expand Up @@ -106,6 +115,10 @@ $bottomHeight: 186px;
}
.amount {
margin-top: 20px;

& > label {
@include text-overflow-ellipsis;
}
}
.max {
border-left: var(--divide-line-color) solid 1px;
Expand Down Expand Up @@ -162,6 +175,7 @@ $bottomHeight: 186px;
.right {
margin-left: 16px;
flex: 1;
min-width: $right-min-width;
@include card;

.rightContent {
Expand Down
1 change: 0 additions & 1 deletion packages/neuron-ui/src/components/SignAndVerify/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@ const SignAndVerify = () => {
field="signature"
value={signature}
onChange={handleInputChange}
disabled={!signature}
width="100%"
/>

Expand Down
6 changes: 1 addition & 5 deletions packages/neuron-ui/src/widgets/Dialog/dialog.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion packages/neuron-ui/src/widgets/Table/table.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/neuron-wallet/src/services/multisig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
)
Expand Down
13 changes: 7 additions & 6 deletions packages/neuron-wallet/src/services/tx/transaction-persistor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,12 +400,13 @@ export class TransactionPersistor {

private static shouldSaveDetail(cell: InputEntity | OutputEntity, lockArgsSetNeedsDetail: Set<string>) {
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)
))))
)
}

Expand Down

1 comment on commit 0d72d95

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Packaging for test is done in 6452940893

Please sign in to comment.