Skip to content

Commit

Permalink
Merge pull request #3582 from Emurgo/release/5.2.200
Browse files Browse the repository at this point in the history
Release / 5.2.200
  • Loading branch information
vsubhuman authored Jul 15, 2024
2 parents c56cdce + 0f52107 commit 7ecf7e4
Show file tree
Hide file tree
Showing 10 changed files with 614 additions and 8 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion packages/yoroi-extension/app/components/swap/SwapInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default function SwapInput({
component="fieldset"
sx={{
borderStyle: 'solid',
borderWidth: tokenInfo.id?.length > 0 && error ? '2px' : '1px',
borderWidth: (tokenInfo.id?.length > 0 && error) || focusState.value ? '2px' : '1px',
borderColor: error ? 'magenta.500' : isFocusedColor,
borderRadius: '8px',
p: '16px',
Expand All @@ -88,6 +88,7 @@ export default function SwapInput({
bgcolor: 'common.white',
columnGap: '6px',
rowGap: '8px',
maxHeight: '95px',
'&:hover': {
borderColor: !error && 'grayscale.max',
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// @flow

import { Stack, Typography } from '@mui/material';
import { ReactComponent as NoCompleteOders } from '../../../assets/images/revamp/no-complete-orders.inline.svg';
import type { Node } from 'react';

const NoCompleteOrders = (): Node => {
return (
<Stack direction="column" justifyContent="center" alignItems="center" flex={1} pt="98px">
<NoCompleteOders />
<Typography variant="h4" fontWeight="500" color="ds.text_gray_normal" mt="52px" pb="8px">
No orders completed yet
</Typography>
</Stack>
);
};

export default NoCompleteOrders;
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// @flow

import { Stack, Typography } from '@mui/material';
import type { Node } from 'react';
import { ReactComponent as NoOpenOders } from '../../../assets/images/revamp/no-open-orders.inline.svg';

const NoOpenOrders = (): Node => {
return (
<Stack direction="column" justifyContent="center" alignItems="center" flex={1} pt="98px">
<NoOpenOders />
<Typography variant="h4" fontWeight="500" color="ds.text_gray_normal" mt="52px" pb="8px">
No orders available yet
</Typography>
<Typography variant="body1" color="ds.text_gray_medium" width="343px" textAlign="center">
Start doing the swap operations to see your open orders here
</Typography>
</Stack>
);
};

export default NoOpenOrders;
15 changes: 12 additions & 3 deletions packages/yoroi-extension/app/containers/swap/orders/OrdersPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import type { CardanoConnectorSignRequest } from '../../../connector/types';
import { genLookupOrFail } from '../../../stores/stateless/tokenHelpers';
import moment from 'moment';
import { signTransactionHex } from '../../../api/ada/transactions/signTransactionHex';
import NoCompleteOrders from './NoCompleteOrders';
import NoOpenOrders from './NoOpenOrders';

type ColumnContext = {|
completedOrders: boolean,
Expand Down Expand Up @@ -378,8 +380,12 @@ export default function SwapOrdersPage(props: StoresAndActionsProps): Node {
.map(c => resolveValueOrGetter(c.width ?? 'auto', columnContext))
.join(' ');

const isDisplayOpenOrdersEmpty = !showCompletedOrders && openOrders?.length === 0;
const isDisplayCompletedOrdersEmpty = showCompletedOrders && completedOrders?.length === 0;
const safeColumnNames = isDisplayOpenOrdersEmpty || isDisplayCompletedOrdersEmpty ? [] : columnNames;

return (
<>
<Box sx={{ border: '1px solid transparent' }}>
<Box sx={{ mx: '24px' }}>
<Box sx={{ my: '24px' }}>
<Tabs
Expand All @@ -397,9 +403,10 @@ export default function SwapOrdersPage(props: StoresAndActionsProps): Node {
]}
/>
</Box>

<Table
columnKeys={columnKeys}
columnNames={columnNames}
columnNames={safeColumnNames}
columnAlignment={columnAlignment}
columnLeftPaddings={columnLeftPaddings}
gridTemplateColumns={gridTemplateColumns}
Expand Down Expand Up @@ -447,7 +454,9 @@ export default function SwapOrdersPage(props: StoresAndActionsProps): Node {
hwWalletError={null}
/>
)}
</>
{isDisplayOpenOrdersEmpty && <NoOpenOrders />}
{isDisplayCompletedOrdersEmpty && <NoCompleteOrders />}
</Box>
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,14 @@ class CardanoStakingPage extends Component<AllProps, State> {
@observable notificationElementId: string = '';

cancel: void => void = () => {
const selectedWallet = this.props.stores.wallets.selected;
this.props.stores.delegation.setPoolTransitionConfig(selectedWallet, {
shouldUpdatePool: false,
show: 'idle',
});
this.props.actions.ada.delegationTransaction.reset.trigger({ justTransaction: true });
};

async componentWillUnmount() {
this.props.actions.ada.delegationTransaction.reset.trigger({ justTransaction: false });
await this.props.actions.ada.delegationTransaction.setPools.trigger([]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ class StakingPageContent extends Component<AllProps> {
}
/>
<RightCardsWrapper>
{errorIfPresent}
{!errorIfPresent && this.getStakePoolMeta(publicDeriver)}
{!errorIfPresent && this.getEpochProgress(publicDeriver)}
</RightCardsWrapper>
Expand Down
4 changes: 2 additions & 2 deletions packages/yoroi-extension/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/yoroi-extension/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yoroi",
"version": "5.2.100",
"version": "5.2.200",
"description": "Cardano ADA wallet",
"scripts": {
"dev-mv2": "rimraf dev/ && NODE_OPTIONS=--openssl-legacy-provider babel-node scripts-mv2/build --type=debug --env 'mainnet'",
Expand Down

0 comments on commit 7ecf7e4

Please sign in to comment.