Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/4.22.0 #3242

Merged
merged 133 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from 128 commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
d4b6cbe
added method clickByScript
Nebyt Apr 27, 2023
4f794c7
removed unnecessary and fail action
Nebyt Apr 27, 2023
bcc7530
actual fix
Nebyt Apr 27, 2023
6daeb94
little addition for debugging
Nebyt Apr 27, 2023
afd4ede
minor change on CI
Nebyt Apr 27, 2023
091d54d
Merge branch 'develop' into denis/YOEXT-594/trezor-emu-tests-fix
Nebyt Apr 27, 2023
2ed2823
Merge branch 'develop' into denis/YOEXT-594/trezor-emu-tests-fix
Nebyt May 4, 2023
2904400
await top window will not be presented
Nebyt May 4, 2023
5bac411
added waiting for window
Nebyt May 4, 2023
46fad0b
feat: add back to current wallet button
neuodev May 10, 2023
c7d6070
feat: Make Yoroi logo in the blue side navigation clickable and lead …
neuodev May 10, 2023
fc8326f
fix: add default value for onLogoClick prop
neuodev May 10, 2023
82523b1
New translations en-US.json (Hungarian)
stackchain May 12, 2023
a2bca1e
New translations en-US.json (Vietnamese)
stackchain May 12, 2023
af9ab77
New translations en-US.json (Vietnamese)
stackchain May 13, 2023
0c5d5c8
New translations en-US.json (Vietnamese)
stackchain May 13, 2023
1a42415
fix: hide the back button if there are no wallets
neuodev May 15, 2023
7677bdd
Merge branch 'develop' into feat/YOEXT-599/create-restore-updates
neuodev May 15, 2023
a7b645f
Merge branch 'develop' into denis/YOEXT-594/trezor-emu-tests-fix
Nebyt May 17, 2023
d923161
added ids on ConnectPage
Nebyt May 18, 2023
a4c3652
added ids on CardanoSignTxPage
Nebyt May 18, 2023
2365f40
added ids on SignTx
Nebyt May 18, 2023
0d11012
added ids on SignTxSummary
Nebyt May 18, 2023
a2a7286
updated test locators
Nebyt May 18, 2023
2efaf73
wip connector-steps
Nebyt May 18, 2023
08e6d2c
Merge branch 'develop' into denis/YOEXT-606/dapp-tests-UI-update
Nebyt May 18, 2023
58c9269
fixed checkIfExists
Nebyt May 18, 2023
f501234
updated connector-signingTxPage.js
Nebyt May 18, 2023
fe42c0b
added ids to UtxoDetails
Nebyt May 18, 2023
1a7096f
updated ids
Nebyt May 18, 2023
188ee24
added ids on AddCollateralPage
Nebyt May 19, 2023
d37de7f
added ids on CardanoSignTxPage
Nebyt May 19, 2023
918656a
updated locators on connector-connectWalletPage.js
Nebyt May 19, 2023
c835d8b
updated locators on connector-getCollateralPage.js
Nebyt May 19, 2023
fff5662
updated locators on connector-signingDataPage.js
Nebyt May 19, 2023
e61ad7f
updated locators on connector-signingTxPage.js
Nebyt May 19, 2023
4763610
updated returning error on mocked dapp
Nebyt May 19, 2023
82363dd
updated connector steps
Nebyt May 19, 2023
658e583
updated test features
Nebyt May 19, 2023
0ca99d9
Merge branch 'develop' into denis/YOEXT-606/dapp-tests-UI-update
Nebyt May 19, 2023
5fc6273
New translations en-US.json (Hungarian)
stackchain May 19, 2023
19f04e4
New translations en-US.json (Vietnamese)
stackchain May 19, 2023
31c6eb7
updated locator for the amount field
Nebyt May 19, 2023
69f3f77
little fix
Nebyt May 19, 2023
ed2ce22
Merge branch 'develop' into denis/YOEXT-594/trezor-emu-tests-fix
Nebyt May 19, 2023
9ca077a
Merge branch 'develop' into denis/YOEXT-606/dapp-tests-UI-update
Nebyt May 19, 2023
12a4a9d
fix: add epoch number to rewards list
neuodev May 22, 2023
0bfd654
feat: align 'reward history' button with the design
neuodev May 22, 2023
7c41b16
New translations en-US.json (Vietnamese)
stackchain May 23, 2023
c708d12
apply metadata display fix to revamped transaction
yushih May 23, 2023
32d0d62
New translations en-US.json (Hungarian)
stackchain May 23, 2023
69ae8cc
New translations en-US.json (Vietnamese)
stackchain May 23, 2023
a196bb5
Merge pull request #3223 from Emurgo/production
vsubhuman May 24, 2023
cbcbcc3
New translations en-US.json (Hungarian)
stackchain May 24, 2023
f431442
New translations en-US.json (Vietnamese)
stackchain May 24, 2023
23fbf3e
Merge branch 'develop' into feat/YOEXT-599/create-restore-updates
neuodev May 25, 2023
38c5ec1
removed outdated files
Nebyt May 26, 2023
8c65dac
updated path to firefox binary
Nebyt May 26, 2023
22914b8
removed outdated information
Nebyt May 26, 2023
718a6e9
Merge pull request #3224 from Emurgo/denis/YOEXT-611/outdated-tests
vsubhuman May 26, 2023
8c389dc
Merge branch 'develop' into feat/YOEXT-599/create-restore-updates
vsubhuman May 29, 2023
ad765a0
Merge pull request #3200 from Emurgo/feat/YOEXT-599/create-restore-up…
vsubhuman May 29, 2023
7ed24e7
New translations en-US.json (Hungarian)
stackchain May 29, 2023
0294294
New translations en-US.json (Vietnamese)
stackchain May 29, 2023
450d2f4
fix(tx): add default token decimals to be zero
neuodev May 31, 2023
c63a6f8
fix(send-tx): update transaction success dialog layout
neuodev Jun 1, 2023
6450c66
fix(tx-send): change title color based on the selected theme
neuodev Jun 1, 2023
bb616be
fix: render json data & watch for null token info
neuodev Jun 2, 2023
cdfa682
fix(txs): return undefine when token info is not defined
neuodev Jun 2, 2023
48eec4b
Merge branch 'develop' into denis/YOEXT-594/trezor-emu-tests-fix
vsubhuman Jun 5, 2023
5d203ad
Merge pull request #3187 from Emurgo/denis/YOEXT-594/trezor-emu-tests…
vsubhuman Jun 5, 2023
d7f6e4d
Merge branch 'develop' into denis/YOEXT-606/dapp-tests-UI-update
vsubhuman Jun 5, 2023
ed4053d
Merge pull request #3204 from Emurgo/l10n_develop
vsubhuman Jun 5, 2023
6bb3280
Merge branch 'develop' into yushi/YOEXT-505/fix-revamp-tx-metadata
neuodev Jun 5, 2023
8995f96
Merge branch 'develop' into fix/YOEXT-550/reward-history
neuodev Jun 5, 2023
fcb944c
fix: format token amounts fro the tokens list (revamp)
neuodev Jun 5, 2023
d575546
fix: format token amounts fro the tokens list (modern)
neuodev Jun 5, 2023
d66d175
fix: render per epoch rewards instead of total rewards
neuodev Jun 6, 2023
128a5be
Merge pull request #3214 from Emurgo/denis/YOEXT-606/dapp-tests-UI-up…
vsubhuman Jun 9, 2023
24d8341
feat: add transaction success revamp dialog
neuodev Jun 12, 2023
75470c5
Merge branch 'develop' into fix/YOEXT-614/tx-success-dialog
neuodev Jun 12, 2023
7557c7d
Merge branch 'develop' into fix/YOEXT-550/reward-history
vsubhuman Jun 15, 2023
e4baeb5
Downgraded chromedriver to 113, cuz latest 114 is not compativle with…
vsubhuman Jun 15, 2023
975af9f
Merge pull request #3235 from Emurgo/ruslan/chromedriver-downgrade
vsubhuman Jun 15, 2023
6b2f639
Merge branch 'develop' into fix/YOEXT-550/reward-history
vsubhuman Jun 15, 2023
a718867
removed usage of nvm
vsubhuman Jun 15, 2023
3427669
Merge pull request #3217 from Emurgo/fix/YOEXT-550/reward-history
vsubhuman Jun 16, 2023
7ba1460
New translations en-US.json (Hungarian)
stackchain Jun 16, 2023
a2fd3d5
New translations en-US.json (Vietnamese)
stackchain Jun 16, 2023
4f8a970
Merge branch 'develop' into yushi/YOEXT-505/fix-revamp-tx-metadata
vsubhuman Jun 16, 2023
ff8450d
Merge pull request #3220 from Emurgo/yushi/YOEXT-505/fix-revamp-tx-me…
vsubhuman Jun 16, 2023
e63a2af
Merge remote-tracking branch 'origin/develop' into fix/YOEXT-565/app-…
vsubhuman Jun 16, 2023
b1128aa
Merge branch 'develop' into fix/YOEXT-614/tx-success-dialog
vsubhuman Jun 16, 2023
5cf4b45
Merge branch 'develop' into Ahmed/format-nums
vsubhuman Jun 16, 2023
034fdb8
fix: trigger onDisconnect when removing a wallet
neuodev May 22, 2023
1dfe467
Merge branch 'develop' into fix/YOEXT-545/on-disconnect
neuodev Jun 16, 2023
ae440eb
Merge pull request #3226 from Emurgo/fix/YOEXT-565/app-crash-after-mi…
vsubhuman Jun 16, 2023
6f4256a
Update packages/yoroi-extension/app/stores/toplevel/WalletSettingsSto…
vsubhuman Jun 16, 2023
0699e36
Merge branch 'develop' into fix/YOEXT-545/on-disconnect
vsubhuman Jun 16, 2023
a08ec7f
Merge branch 'develop' into Ahmed/format-nums
neuodev Jun 16, 2023
145e2da
Merge pull request #3218 from Emurgo/fix/YOEXT-545/on-disconnect
vsubhuman Jun 16, 2023
7ca460b
Merge branch 'develop' into fix/YOEXT-614/tx-success-dialog
vsubhuman Jun 16, 2023
be6bb81
Merge branch 'develop' into Ahmed/format-nums
vsubhuman Jun 16, 2023
7044a7f
Merge pull request #3171 from Emurgo/Ahmed/format-nums
vsubhuman Jun 16, 2023
114ecd5
Merge branch 'develop' into fix/YOEXT-614/tx-success-dialog
vsubhuman Jun 16, 2023
e4abbfc
flow fixes
vsubhuman Jun 20, 2023
a9973e8
Merge pull request #3227 from Emurgo/fix/YOEXT-614/tx-success-dialog
vsubhuman Jun 20, 2023
890869a
New translations en-US.json (Hungarian)
stackchain Jun 20, 2023
d9a04ff
New translations en-US.json (Vietnamese)
stackchain Jun 20, 2023
c01458a
feat: add content hash for webpack output file names
neuodev Jun 22, 2023
42e31ad
Merge branch 'develop' into Ahmed/webpack-fname
neuodev Jun 22, 2023
3c85c83
Merge branch 'release/4.21.1' into release/4.22.0
vsubhuman Jun 23, 2023
9dad658
Merge remote-tracking branch 'origin/develop' into l10n_develop
vsubhuman Jun 23, 2023
4626478
Merge pull request #3238 from Emurgo/l10n_develop
vsubhuman Jun 23, 2023
0a8e1d9
Merge remote-tracking branch 'origin/develop' into release/4.22.0
vsubhuman Jun 23, 2023
0cc950e
Updated Ergo banner to display when any Ergo wallet is present at all…
vsubhuman Jun 23, 2023
49ed3ae
Fixed banner style and text
vsubhuman Jun 23, 2023
e2b6d28
Merge branch 'release/4.22.0' into ruslan/ergo-banner-update
vsubhuman Jun 23, 2023
fe6e535
flow fixes
vsubhuman Jun 27, 2023
0365f87
Merge pull request #3243 from Emurgo/ruslan/ergo-banner-update
vsubhuman Jun 27, 2023
491eab4
fixing quantity sorting
vsubhuman Jun 28, 2023
01a1710
flow fixes
vsubhuman Jun 28, 2023
84e2a4f
Merge pull request #3244 from Emurgo/fix/YOEXT-622/sorting-by-quantity
vsubhuman Jun 28, 2023
026719e
Merge branch 'production' into release/4.22.0
vsubhuman Jun 29, 2023
0f53eb2
Merge branch 'release/4.22.0' into Ahmed/webpack-fname
vsubhuman Jun 29, 2023
1fad12f
Merge pull request #3241 from Emurgo/Ahmed/webpack-fname
vsubhuman Jun 29, 2023
f6c4987
added vietnamese translation to the UI
vsubhuman Jun 29, 2023
a8fc825
Merge pull request #3245 from Emurgo/ruslan/enable-vietnamese-transla…
vsubhuman Jun 30, 2023
b5ed22c
added vietnamese flag to the language selector
vsubhuman Jun 30, 2023
a8d9b95
Merge pull request #3246 from Emurgo/ruslan/adding-vietnamese-flag
vsubhuman Jun 30, 2023
70ede97
Adding missing vietnamese locale. Moving locales definition to the tr…
vsubhuman Jun 30, 2023
b25eb73
flow fix
vsubhuman Jun 30, 2023
e984112
Version bump: 4.22.0
vsubhuman Jun 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,17 +181,17 @@ jobs:
working-directory: ../trezor-user-env
run: cp -rf src/binaries/firmware/bin/trezor-emu-core-v2-master ./

- name: Copy the trezord-go-v2.0.31 to the root of the project
- name: Copy the trezord-go-v2.0.32 to the root of the project
working-directory: ../trezor-user-env
run: cp -rf src/binaries/trezord-go/bin/trezord-go-v2.0.31 ./
run: cp -rf src/binaries/trezord-go/bin/trezord-go-v2.0.32 ./

- name: Create the logs folder in the root of the trezor-user-env
working-directory: ../trezor-user-env
run: mkdir logs

- name: Run the trezor user environment
working-directory: ../trezor-user-env
run: sudo docker run -p 9001:9001 -p 9002:9002 -p 21326:21326 -p 127.0.0.1:21325:21326 -p 21324:21324 -v logs:/trezor-user-env/logs/screens -v trezor-emu-core-v2-master:/trezor-user-env/src/binaries/firmware/bin/user_downloaded -v trezord-go-v2.0.31:/trezor-user-env/src/binaries/trezord-go/bin -d emurgornd/trezor-user-env:latest
run: sudo docker run -p 9001:9001 -p 9002:9002 -p 21326:21326 -p 127.0.0.1:21325:21326 -p 21324:21324 -v logs:/trezor-user-env/logs/screens -v trezor-emu-core-v2-master:/trezor-user-env/src/binaries/firmware/bin/user_downloaded -v trezord-go-v2.0.32:/trezor-user-env/src/binaries/trezord-go/bin -d emurgornd/trezor-user-env:latest

- uses: actions/checkout@v3

Expand Down
1 change: 0 additions & 1 deletion install-all.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
npm i \
&& npm i --prefix packages/yoroi-extension \
&& npm i --prefix packages/yoroi-connector \
&& npm i --prefix packages/yoroi-connector/example-ergo \
&& npm i --prefix packages/yoroi-connector/example-cardano
20 changes: 14 additions & 6 deletions packages/yoroi-extension/app/components/topbar/SidebarRevamp.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ import styles from './SidebarRevamp.scss';
import type { SidebarCategoryRevamp } from '../../stores/stateless/sidebarCategories';
import { intlShape } from 'react-intl';
import type { $npm$ReactIntl$IntlFormat } from 'react-intl';
import { ReactComponent as yoroiLogo } from '../../assets/images/sidebar/yoroi_logo.inline.svg';
import { ReactComponent as YoroiLogo } from '../../assets/images/sidebar/yoroi_logo.inline.svg';
import globalMessages from '../../i18n/global-messages';

type Props = {|
+children?: ?Node,
+categories?: Array<SidebarCategoryRevamp>,
+isActiveCategory?: SidebarCategoryRevamp => boolean,
+onCategoryClicked?: SidebarCategoryRevamp => void,
+onLogoClick?: void => void,
|};

@observer
Expand All @@ -28,23 +29,30 @@ export default class SidebarRevamp extends Component<Props> {
children: void,
isActiveCategory: void,
onCategoryClicked: void,
onLogoClick: void,
|} = {
children: undefined,
categories: undefined,
isActiveCategory: undefined,
onCategoryClicked: undefined,
onLogoClick: undefined,
};

render(): Node {
const { intl } = this.context;
const { categories, isActiveCategory, onCategoryClicked } = this.props;
const YoroiLogo = yoroiLogo;
const { categories, isActiveCategory, onCategoryClicked, onLogoClick } = this.props;

return (
<div className={styles.wrapper}>
{this.props.children}
<div className={styles.header}>
<YoroiLogo />
{onLogoClick ? (
<button type="button" onClick={onLogoClick}>
<YoroiLogo />
</button>
) : (
<YoroiLogo />
)}
</div>
<div className={styles.categories}>
{categories
Expand All @@ -68,8 +76,8 @@ export default class SidebarRevamp extends Component<Props> {
</div>
<a
className={styles.faq}
href='https://emurgohelpdesk.zendesk.com/hc/en-us/categories/4412619927695-Yoroi'
target='_blank'
href="https://emurgohelpdesk.zendesk.com/hc/en-us/categories/4412619927695-Yoroi"
target="_blank"
rel="noreferrer"
>
{intl.formatMessage(globalMessages.sidebarFaq)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ export default class TestnetWarningBanner extends Component<Props> {
<div className={styles.ergoWarning}>
<span key="0" className={styles.shelleyTestnetWarningIcon}><ShelleyTestnetWarningSvg /></span>
<div className={styles.text}>
NOTE: Unfortunately the Ergo network support will be dropped from Yoroi in the near future.
NOTE: Due to the planned gradual termination of the Ergo wallets support in Yoroi extension,
<br />
Starting with the next version any Ergo wallets in the list will be visible, but not operational!
<br />
Please make sure to migrate your Ergo funds and wallets to another application.
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
}

.ergoWarning {
height: 60px;
height: 90px;
display: flex;
justify-content: center;
align-items: center;
Expand Down
33 changes: 24 additions & 9 deletions packages/yoroi-extension/app/components/transfer/SuccessPage.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @flow
import type { Node } from 'react';
import type { ComponentType, Node } from 'react';
import { Component } from 'react';
import { observer } from 'mobx-react';
import { intlShape } from 'react-intl';
Expand All @@ -8,6 +8,9 @@ import Dialog from '../widgets/Dialog';
import DialogCloseButton from '../widgets/DialogCloseButton';
import LoadingSpinner from '../widgets/LoadingSpinner';
import type { $npm$ReactIntl$IntlFormat } from 'react-intl';
import { Typography } from '@mui/material';
import { withLayout } from '../../styles/context/layout';
import type { InjectedLayoutProps } from '../../styles/context/layout';

type Props = {|
+title: string,
Expand All @@ -20,8 +23,7 @@ type Props = {|
|};

@observer
export default class SuccessPage extends Component<Props> {

class SuccessPage extends Component<Props & InjectedLayoutProps> {
static contextTypes: {|intl: $npm$ReactIntl$IntlFormat|} = {
intl: intlShape.isRequired
};
Expand All @@ -31,7 +33,7 @@ export default class SuccessPage extends Component<Props> {
};

render(): Node {
const { title, text } = this.props;
const { title, text, isRevampLayout } = this.props;

const actions = this.props.closeInfo == null
? undefined
Expand All @@ -48,17 +50,28 @@ export default class SuccessPage extends Component<Props> {
closeOnOverlayClick={false}
onClose={this.props.closeInfo ? this.props.closeInfo.onClose : undefined}
className={styles.dialog}
closeButton={this.props.closeInfo ? (<DialogCloseButton />) : undefined}
closeButton={this.props.closeInfo ? <DialogCloseButton /> : undefined}
>
<div className={styles.component}>
<div>
<div className={styles.successImg} />
<div className={styles.title}>
<Typography
variant="body1"
color={isRevampLayout ? 'primary' : 'secondary.300'}
textAlign="center"
mt="16px"
fontWeight={500}
>
{title}
</div>
<div className={styles.text}>
</Typography>
<Typography
variant="body2"
color="gray.900"
textAlign="center"
mt="4px"
>
{text}
</div>
</Typography>
{this.props.closeInfo == null && (
<div className={styles.spinnerSection}>
<LoadingSpinner />
Expand All @@ -70,3 +83,5 @@ export default class SuccessPage extends Component<Props> {
);
}
}

export default (withLayout(SuccessPage): ComponentType<Props>);
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,6 @@
align-items: center;
justify-content: center;

.title {
color: var(--yoroi-palette-secondary-300);
text-transform: uppercase;
height: 19px;
font-weight: 500;
font-size: 16px;
font-weight: 500;
line-height: 19px;
text-align: center;
}

.text {
color: var(--yoroi-palette-gray-800);
font-weight: 400;
font-size: 14px;
line-height: 22px;
text-align: center;
}

.spinnerSection {
margin-top: 12px;
margin-bottom: 5px;
Expand All @@ -37,6 +18,7 @@
width: 252px;
height: 194px;
margin: auto;
margin-top: 30px;
}
}
:global(.YoroiModern):global(.YoroiShelley) .component, :global(.YoroiRevamp):global(.YoroiShelley) .component {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,72 @@ import YoroiLogo from '../../../assets/images/yoroi-logo-shape-blue.inline.svg';
import { defineMessages, intlShape } from 'react-intl';
import { observer } from 'mobx-react';
import type { $npm$ReactIntl$IntlFormat } from 'react-intl';
import { Typography, Box } from '@mui/material';
import { Typography, Box, Button } from '@mui/material';
import globalMessages from '../../../i18n/global-messages';
import { ReactComponent as BackIcon } from '../../../assets/images/assets-page/backarrow.inline.svg';

const messages: * = defineMessages({
subtitle: {
id: 'wallet.add.page.revamp.subtitle',
defaultMessage: '!!!Light wallet for Cardano assets',
},
backButtonLabel: {
id: 'wallet.add.page.revamp.backButtonLabel',
defaultMessage: '!!!Back to current wallet',
},
});

type Props = {|
+goToCurrentWallet: void => void,
+hasAnyWallets: boolean,
|};

@observer
export default class AddWalletPageHeader extends Component<{||}> {
export default class AddWalletPageHeader extends Component<Props> {
static contextTypes: {| intl: $npm$ReactIntl$IntlFormat |} = {
intl: intlShape.isRequired,
};

render(): Node {
const { intl } = this.context;
const { goToCurrentWallet, hasAnyWallets } = this.props;

return (
<Box
sx={{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexDirection: 'column',
}}
>
<Box>
{hasAnyWallets && (
<Button sx={{ color: 'gray.900' }} onClick={goToCurrentWallet}>
<Box mr="10px">
<BackIcon />
</Box>
<Typography variant="button2" fontWeight={500} color="gray.900">
{intl.formatMessage(messages.backButtonLabel)}
</Typography>
</Button>
)}
<Box
sx={{
width: '56px',
height: '48px',
mb: '24px',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexDirection: 'column',
}}
>
<img src={YoroiLogo} alt="Yoroi" />
<Box
sx={{
width: '56px',
height: '48px',
mb: '24px',
}}
>
<img src={YoroiLogo} alt="Yoroi" />
</Box>
<Typography variant="h1" fontWeight={500} color="primary.600" mb="8px">
{intl.formatMessage(globalMessages.yoroi)}
</Typography>
<Typography variant="body1" fontWeight={500} color="primary.600">
{intl.formatMessage(messages.subtitle)}
</Typography>
</Box>
<Typography variant="h1" fontWeight={500} color="primary" mb="8px">
{intl.formatMessage(globalMessages.yoroi)}
</Typography>
<Typography variant="body1" fontWeight={500} color="primary">
{intl.formatMessage(messages.subtitle)}
</Typography>
</Box>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const SORTING_COLUMNS = {
name: string,
id: string,
amount: string,
amountForSorting?: BigNumber,
|}
type Props = {|
+assetsList: Asset[],
Expand Down Expand Up @@ -136,6 +137,10 @@ export default class AssetsList extends Component<Props, State> {
this.setState({ sortingDirection: newSortDirection })

if (field === 'amount') {
const dedicatedField = 'amountForSorting';
if (a[dedicatedField] != null && b[dedicatedField] != null) {
return compareNumbers(a[dedicatedField], b[dedicatedField], newSortDirection)
}
return compareNumbers(a[field], b[field], newSortDirection)
}
// Other fields
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ type Props = {|
export default class AssetsPage extends Component<Props> {

render(): Node {
const { assetDeposit, network } = this.props
const { assetDeposit, network, assetsList, getTokenInfo, shouldHideBalance } = this.props;
return (
<div className={styles.component}>
<AssetsList
assetsList={this.props.assetsList}
assetsList={assetsList}
assetDeposit={assetDeposit}
getTokenInfo={this.props.getTokenInfo}
shouldHideBalance={this.props.shouldHideBalance}
getTokenInfo={getTokenInfo}
shouldHideBalance={shouldHideBalance}
network={network}
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { Link } from 'react-router-dom';
import { ROUTES } from '../../../routes-config';
import CopyToClipboardText from '../../widgets/CopyToClipboardLabel';
import { ListEmpty } from './ListEmpty';
import BigNumber from 'bignumber.js';

const SORTING_DIRECTIONS = {
UP: 'UP',
Expand All @@ -48,6 +49,7 @@ export type Asset = {|
name: string,
id: string,
amount: string,
amountForSorting?: BigNumber,
|};
type Props = {|
+assetsList: Asset[],
Expand Down Expand Up @@ -90,6 +92,10 @@ function TokenList({ assetsList: list, shouldHideBalance, intl }: Props & Intl):
setState({ ...state, sortingDirection: newSortDirection });

if (field === SORTING_COLUMNS.AMOUNT) {
const dedicatedField = 'amountForSorting';
if (a[dedicatedField] != null && b[dedicatedField] != null) {
return compareNumbers(a[dedicatedField], b[dedicatedField], newSortDirection);
}
return compareNumbers(a[field], b[field], newSortDirection);
}
// Other fields
Expand Down
Loading