Skip to content

Commit e83661a

Browse files
committed
chore: fix comments
1 parent aaf950e commit e83661a

File tree

22 files changed

+820
-905
lines changed

22 files changed

+820
-905
lines changed

packages/wallet-ui/src/components/pages/Home/Home.view.tsx

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,20 @@ export const HomeView = ({ address }: Props) => {
1717
const { translate } = useMultiLanguage();
1818

1919
return (
20-
translate && (
21-
<Wrapper>
22-
<SideBar address={address} />
23-
<RightPart>
24-
{!upgradeModalVisible &&
25-
Object.keys(erc20TokenBalanceSelected).length > 0 && (
26-
<Header address={address} />
27-
)}
28-
{!upgradeModalVisible && <TransactionsList transactions={[]} />}
29-
{!upgradeModalVisible &&
30-
Object.keys(transactions).length === 0 &&
31-
!loader.isLoading && (
32-
<NoTransactions>{translate('noTransactions')}</NoTransactions>
33-
)}
34-
</RightPart>
35-
</Wrapper>
36-
)
20+
<Wrapper>
21+
<SideBar address={address} />
22+
<RightPart>
23+
{!upgradeModalVisible &&
24+
Object.keys(erc20TokenBalanceSelected).length > 0 && (
25+
<Header address={address} />
26+
)}
27+
{!upgradeModalVisible && <TransactionsList transactions={[]} />}
28+
{!upgradeModalVisible &&
29+
Object.keys(transactions).length === 0 &&
30+
!loader.isLoading && (
31+
<NoTransactions>{translate('noTransactions')}</NoTransactions>
32+
)}
33+
</RightPart>
34+
</Wrapper>
3735
);
3836
};

packages/wallet-ui/src/components/ui/Framework/Framework.view.tsx

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,18 @@ export const FrameworkView = ({ connected, children }: Props) => {
2020
const { translate } = useMultiLanguage();
2121

2222
return (
23-
translate && (
24-
<Wrapper>
25-
<ColMiddle>
26-
<MenuStyled connected={connected} />
27-
<Content>{children}</Content>
28-
<Footer />
29-
</ColMiddle>
30-
{bannerOpen && (
31-
<Banner>
32-
{translate('openBetaVersion')}{' '}
33-
<CloseIcon icon={'close'} onClick={() => setBannerOpen(false)} />
34-
</Banner>
35-
)}
36-
</Wrapper>
37-
)
23+
<Wrapper>
24+
<ColMiddle>
25+
<MenuStyled connected={connected} />
26+
<Content>{children}</Content>
27+
<Footer />
28+
</ColMiddle>
29+
{bannerOpen && (
30+
<Banner>
31+
{translate('openBetaVersion')}{' '}
32+
<CloseIcon icon={'close'} onClick={() => setBannerOpen(false)} />
33+
</Banner>
34+
)}
35+
</Wrapper>
3836
);
3937
};

packages/wallet-ui/src/components/ui/atom/LoadingSmall/LoadingSmall.view.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@ export const LoadingSmallView = ({ ...otherProps }: Props) => {
88
const { translate } = useMultiLanguage();
99

1010
return (
11-
translate && (
12-
<Wrapper {...otherProps}>
13-
<LoadingSpinner icon="spinner" pulse />
14-
<LoadingText>{translate('loading')}</LoadingText>
15-
</Wrapper>
16-
)
11+
<Wrapper {...otherProps}>
12+
<LoadingSpinner icon="spinner" pulse />
13+
<LoadingText>{translate('loading')}</LoadingText>
14+
</Wrapper>
1715
);
1816
};

packages/wallet-ui/src/components/ui/molecule/AccountAddress/AccountAddress.view.tsx

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,32 +23,30 @@ export const AccountAddressView = ({
2323
const { translate } = useMultiLanguage();
2424

2525
return (
26-
translate && (
27-
<>
26+
<>
27+
<PopperTooltip
28+
content={translate('copied')}
29+
closeTrigger="click"
30+
placement={placement}
31+
>
2832
<PopperTooltip
29-
content={translate('copied')}
30-
closeTrigger="click"
33+
content={translate('copyToClipboard')}
34+
closeTrigger="hover"
3135
placement={placement}
3236
>
33-
<PopperTooltip
34-
content={translate('copyToClipboard')}
35-
closeTrigger="hover"
36-
placement={placement}
37+
<Wrapper
38+
iconRight="clone"
39+
onClick={handleAddressClick}
40+
backgroundTransparent
3741
>
38-
<Wrapper
39-
iconRight="clone"
40-
onClick={handleAddressClick}
41-
backgroundTransparent
42-
>
43-
{full
44-
? starkName ?? address
45-
: starkName
46-
? shortenDomain(starkName)
47-
: shortenAddress(address)}
48-
</Wrapper>
49-
</PopperTooltip>
42+
{full
43+
? starkName ?? address
44+
: starkName
45+
? shortenDomain(starkName)
46+
: shortenAddress(address)}
47+
</Wrapper>
5048
</PopperTooltip>
51-
</>
52-
)
49+
</PopperTooltip>
50+
</>
5351
);
5452
};

packages/wallet-ui/src/components/ui/molecule/DropDown/DropDown.view.tsx

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,18 @@ export const DropDownView = ({
2525
const { translate } = useMultiLanguage();
2626

2727
return (
28-
translate && (
29-
<Wrapper>
30-
<Label error={error}>{label}</Label>
31-
<DropdownStyled
32-
error={error}
33-
disabled={disabled}
34-
options={options}
35-
value={value}
36-
placeholder={translate('selectAnOption')}
37-
{...otherProps}
38-
/>
28+
<Wrapper>
29+
<Label error={error}>{label}</Label>
30+
<DropdownStyled
31+
error={error}
32+
disabled={disabled}
33+
options={options}
34+
value={value}
35+
placeholder={translate('selectAnOption')}
36+
{...otherProps}
37+
/>
3938

40-
{helperText && <HelperText>{helperText}</HelperText>}
41-
</Wrapper>
42-
)
39+
{helperText && <HelperText>{helperText}</HelperText>}
40+
</Wrapper>
4341
);
4442
};

packages/wallet-ui/src/components/ui/molecule/TransactionsList/TransactionListItem/TransactionListItem.view.tsx

Lines changed: 32 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -79,39 +79,37 @@ export const TransactionListItemView = ({ transaction }: Props) => {
7979
const txnToFromLabel = '';
8080
const txnFailureReason = getTxnFailureReason(transaction);
8181
return (
82-
translate && (
83-
<Wrapper
84-
onClick={() =>
85-
openExplorerTab(transaction.txnHash, 'tx', transaction.chainId)
86-
}
87-
>
88-
<Left>
89-
<LeftIcon>
90-
<IconStyled transactionname={txnName} icon={getIcon(txnName)} />
91-
</LeftIcon>
92-
<Column>
93-
<Label>{translate(toCamelCase(txnName))}</Label>
94-
<Description>
95-
{txnDate}
96-
<br />
97-
<Status status={transaction.executionStatus}>
98-
{txnStatus}
99-
{txnFailureReason}
100-
</Status>
101-
</Description>
102-
</Column>
103-
</Left>
104-
<Middle>{txnToFromLabel} </Middle>
105-
<Right>
106-
{txnName === 'Send' && (
107-
<AssetQuantity
108-
currency={currencySymbol}
109-
currencyValue={txnValue}
110-
USDValue={txnUsdValue}
111-
/>
112-
)}
113-
</Right>
114-
</Wrapper>
115-
)
82+
<Wrapper
83+
onClick={() =>
84+
openExplorerTab(transaction.txnHash, 'tx', transaction.chainId)
85+
}
86+
>
87+
<Left>
88+
<LeftIcon>
89+
<IconStyled transactionname={txnName} icon={getIcon(txnName)} />
90+
</LeftIcon>
91+
<Column>
92+
<Label>{translate(toCamelCase(txnName))}</Label>
93+
<Description>
94+
{txnDate}
95+
<br />
96+
<Status status={transaction.executionStatus}>
97+
{txnStatus}
98+
{txnFailureReason}
99+
</Status>
100+
</Description>
101+
</Column>
102+
</Left>
103+
<Middle>{txnToFromLabel} </Middle>
104+
<Right>
105+
{txnName === 'Send' && (
106+
<AssetQuantity
107+
currency={currencySymbol}
108+
currencyValue={txnValue}
109+
USDValue={txnUsdValue}
110+
/>
111+
)}
112+
</Right>
113+
</Wrapper>
116114
);
117115
};

packages/wallet-ui/src/components/ui/organism/AccountDetailsModal/AccountDetailsModal.view.tsx

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -24,36 +24,34 @@ export const AccountDetailsModalView = ({ address }: Props) => {
2424

2525
const chainId = networks?.items[networks.activeNetwork]?.chainId;
2626
return (
27-
translate && (
28-
<div>
29-
<AccountImageDiv>
30-
<AccountImageStyled size={64} address={address} />
31-
</AccountImageDiv>
32-
<Wrapper>
33-
<TitleDiv>
34-
<Title>{translate('myAccount')}</Title>
35-
{/* <ModifyIcon /> */}
36-
</TitleDiv>
37-
<AddressQrCode value={address} />
38-
<AddressCopy address={address} />
39-
</Wrapper>
40-
<ButtonDiv>
41-
<ButtonStyled
42-
backgroundTransparent
43-
borderVisible
44-
onClick={() => openExplorerTab(address, 'contract', chainId)}
45-
>
46-
{translate('viewOnExplorer').toUpperCase()}
47-
</ButtonStyled>
48-
<ButtonStyled
49-
backgroundTransparent
50-
borderVisible
51-
onClick={() => getPrivateKeyFromAddress(address, chainId)}
52-
>
53-
{translate('exportPrivateKey')}
54-
</ButtonStyled>
55-
</ButtonDiv>
56-
</div>
57-
)
27+
<div>
28+
<AccountImageDiv>
29+
<AccountImageStyled size={64} address={address} />
30+
</AccountImageDiv>
31+
<Wrapper>
32+
<TitleDiv>
33+
<Title>{translate('myAccount')}</Title>
34+
{/* <ModifyIcon /> */}
35+
</TitleDiv>
36+
<AddressQrCode value={address} />
37+
<AddressCopy address={address} />
38+
</Wrapper>
39+
<ButtonDiv>
40+
<ButtonStyled
41+
backgroundTransparent
42+
borderVisible
43+
onClick={() => openExplorerTab(address, 'contract', chainId)}
44+
>
45+
{translate('viewOnExplorer').toUpperCase()}
46+
</ButtonStyled>
47+
<ButtonStyled
48+
backgroundTransparent
49+
borderVisible
50+
onClick={() => getPrivateKeyFromAddress(address, chainId)}
51+
>
52+
{translate('exportPrivateKey')}
53+
</ButtonStyled>
54+
</ButtonDiv>
55+
</div>
5856
);
5957
};

0 commit comments

Comments
 (0)