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 / 5.4.300 #3705

Merged
merged 54 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
98909aa
change wallet syncing log level to debug in background
yushih Oct 14, 2024
30808af
Merge pull request #3690 from Emurgo/chore/background-sync-output-level
vsubhuman Oct 15, 2024
8961574
hard-code webpack dev server ports to avoid conflict
yushih Oct 15, 2024
9cef327
add color to concurrently output prefix for easier visual parsing
yushih Oct 15, 2024
527e7de
Merge remote-tracking branch 'origin/production' into develop
vsubhuman Oct 15, 2024
c851556
update run-dev to use mv3
vsubhuman Oct 15, 2024
484284a
Merge branch 'develop' into chore/fix-dev-command
vsubhuman Oct 15, 2024
bffa959
Merge pull request #3693 from Emurgo/chore/fix-dev-command
vsubhuman Oct 15, 2024
f244b6b
fix downloading log
yushih Oct 17, 2024
5c7d0bc
Merge remote-tracking branch 'origin/production' into develop
vsubhuman Oct 17, 2024
d77a0a6
Merge branch 'release/5.4.300' into fix/YOEXT-1446/fix-download-log
vsubhuman Oct 17, 2024
62eb225
Merge pull request #3696 from Emurgo/fix/YOEXT-1446/fix-download-log
vsubhuman Oct 20, 2024
450fe3c
Merge remote-tracking branch 'origin/production' into release/5.4.300
vsubhuman Oct 20, 2024
c28ee98
fix YOEXT-1407 bg gradient colors
nistadev Oct 15, 2024
18b65cb
fix color YOEXT-1406
nistadev Oct 15, 2024
5dcd2e4
YOEXT-1403 fix layout on error page
nistadev Oct 15, 2024
b239edb
fix flow errors
nistadev Oct 16, 2024
e922e42
Merge pull request #3691 from Emurgo/pat/swap-fixes
vsubhuman Oct 28, 2024
8b718fc
retry token-list retrival until it gets a successful response
nistadev Oct 16, 2024
95eb648
YOEXT-1409 add query invalidate
nistadev Oct 21, 2024
edb8b15
adding one source of truth
Nebyt Oct 14, 2024
1306826
using constructPlate where it is needed
Nebyt Oct 14, 2024
c050dc0
updated the drag icon
Nebyt Oct 15, 2024
02b3353
reworked the wallets list accroding to the design
Nebyt Oct 15, 2024
c44fab5
removed unused
Nebyt Oct 15, 2024
1022595
eslint fixes
Nebyt Oct 15, 2024
c90dfff
fit a wallet name and align columns
Nebyt Oct 15, 2024
3561e5e
Merge pull request #3694 from Emurgo/pat/swap-fixes-2
vsubhuman Oct 28, 2024
b273e0c
Merge branch 'release/5.4.300' into denis/yoext-1418/wallet-cards-app…
vsubhuman Oct 28, 2024
212b076
some deduplication
vsubhuman Oct 28, 2024
216bdb3
Merge remote-tracking branch 'origin/denis/yoext-1418/wallet-cards-ap…
vsubhuman Oct 28, 2024
d72b05c
Merge pull request #3692 from Emurgo/denis/yoext-1418/wallet-cards-ap…
vsubhuman Oct 28, 2024
36920e9
fix wrong password handling when changing password
yushih Oct 23, 2024
ade8a83
unmagic
yushih Oct 29, 2024
75beee8
small simplification
vsubhuman Oct 29, 2024
3c7aa50
Merge remote-tracking branch 'origin/release/5.4.300' into fix/YOEXT-…
vsubhuman Oct 29, 2024
9131aaf
Merge pull request #3709 from Emurgo/fix/YOEXT-1454/change-password-w…
vsubhuman Oct 29, 2024
aa11abb
fix wrong password handling
yushih Oct 24, 2024
a88dedd
unmagic
yushih Oct 29, 2024
7fdae03
flow fix
vsubhuman Oct 29, 2024
cd142e6
Merge pull request #3710 from Emurgo/fix/YOEXT-1453/send-tx-wrong-pas…
vsubhuman Oct 29, 2024
4c1fde9
extract hadcoded value into constant
nistadev Oct 29, 2024
bd9e0cc
tiny deduplication
vsubhuman Oct 29, 2024
d2b7dbe
Merge pull request #3718 from Emurgo/fix/page-error-refactor
vsubhuman Oct 29, 2024
1839a21
wait for unit of account settings
yushih Oct 28, 2024
5b1df13
optimization: refresh current coin price after changing settings
yushih Oct 28, 2024
3dd78ed
fix: transaction fiat amounts not udpated immediately after changing …
yushih Oct 28, 2024
487654e
make amount display change immediately after unit of account settings…
yushih Oct 28, 2024
67fca8e
add flow type
yushih Oct 28, 2024
a2876d0
message subscription fix
vsubhuman Oct 29, 2024
e55226a
Merge pull request #3713 from Emurgo/opt/price
vsubhuman Oct 30, 2024
de788f3
allow trezor withdrawals
vsubhuman Oct 30, 2024
86d79da
Merge pull request #3721 from Emurgo/ruslan/trezor-withdrawals
vsubhuman Oct 30, 2024
73a9b5f
Version bump: 5.4.300
vsubhuman Oct 30, 2024
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
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
// @flow
import ExtendableError from 'es6-error';

export const WRONG_PASSPHRASE_ERROR_MESSAGE = 'Passphrase doesn\'t match';

export class WrongPassphraseError extends ExtendableError {
constructor(message: ?string = 'Passphrase doesn\'t match') {
super(message);

static get defaultMessage(): string {
return WRONG_PASSPHRASE_ERROR_MESSAGE;
}

constructor() {
super(WrongPassphraseError.defaultMessage);
}
}

Expand Down
7 changes: 6 additions & 1 deletion packages/yoroi-extension/app/api/common/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,14 @@ export class GenericApiError extends LocalizableError {
}

export class IncorrectWalletPasswordError extends LocalizableError {

static get errorId(): string {
return messages.incorrectWalletPasswordError.id;
}

constructor() {
super({
id: messages.incorrectWalletPasswordError.id,
id: IncorrectWalletPasswordError.errorId,
defaultMessage: messages.incorrectWalletPasswordError.defaultMessage || '',
});
}
Expand Down
7 changes: 5 additions & 2 deletions packages/yoroi-extension/app/api/thunk.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,10 @@ export const removeWalletFromDb: GetEntryFuncType<typeof RemoveWallet> = async (
};

export const changeSigningKeyPassword: GetEntryFuncType<typeof ChangeSigningPassword> = async (request) => {
await callBackground({ type: ChangeSigningPassword.typeTag, request, });
const resp = await callBackground({ type: ChangeSigningPassword.typeTag, request, });
if (resp?.error === WrongPassphraseError.defaultMessage) {
throw new IncorrectWalletPasswordError();
}
}

export const renamePublicDeriver: GetEntryFuncType<typeof RenamePublicDeriver> = async (request) => {
Expand Down Expand Up @@ -472,7 +475,7 @@ function handleWrongPassword<
result: T,
passwordErrorClass: typeof Error
): T {
if (result.error === 'IncorrectWalletPasswordError') {
if (typeof result.error === 'string' && result.error.includes(IncorrectWalletPasswordError.errorId)) {
throw new passwordErrorClass();
}
if (result.error) {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default class AmountDisplay extends Component<Props> {
</Typography>
)}
{showFiat === true && (
<Typography mb="5px" color="ds.text_gray_medium" fontSize="12px" id={id + '-availableFiatBalance-text'}>
<Typography mb="5px" color="ds.text_gray_low" fontSize="12px" lineHeight="16px" id={id + '-availableFiatBalance-text'}>
{fiatDisplay || '-'}&nbsp;{currency || 'USD'}
</Typography>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { ReactComponent as NoDappImage } from '../../../assets/images/dapp-conne
import { intlShape } from 'react-intl';
import { splitAmount, truncateToken } from '../../../utils/formatters';
import { Box, Typography, styled } from '@mui/material';
import { constructPlate } from '../../topbar/NavPlate';
import { constructPlate40 } from '../../topbar/WalletCard';
import styles from './WalletRow.scss';

type Props = {|
Expand Down Expand Up @@ -95,7 +95,7 @@ export default class WalletRowRevamp extends Component<Props, State> {
} = this.props;
const { showDeleteIcon } = this.state;

const [, plateIcon] = constructPlate(plate, 0, '');
const [, plateIcon] = constructPlate40(plate);

return (
<Box
Expand All @@ -121,9 +121,7 @@ export default class WalletRowRevamp extends Component<Props, State> {
id={id}
>
<Box width="100%" display="flex" alignItems="center" gap="8px">
<Box width="40px" height="40px" overflow="hidden" borderRadius="50%">
{plateIcon}
</Box>
{plateIcon}
<div>
<Typography component="div" variant="caption1" color="grayscale.900" id="connectedWalletNameLabel">
{walletName}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ type Props = {|
+asModern?: boolean,
+withPadding?: boolean, // default: true
+bgcolor?: string,
+isErrorPage?: boolean,
|};

type InjectedProps = {| isRevampLayout: boolean, currentTheme: string |};
Expand All @@ -40,6 +41,7 @@ function TopBarLayout({
asModern,
withPadding,
bgcolor,
isErrorPage,
}: AllProps) {
const isModern = currentTheme === THEMES.YOROI_MODERN;
const isRevamp = isRevampLayout && asModern !== true && !isModern;
Expand Down Expand Up @@ -79,7 +81,7 @@ function TopBarLayout({
<Box
sx={{
bgcolor: bgcolor || 'ds.bg_color_max',
height: '100%',
height: !isErrorPage ? '100%' : 'auto',
width: '100%',
maxWidth: '1872px',
mx: 'auto',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default function SelectAssetDialog({
</>
}
>
{(filteredAssets.length !== 0 && !assetsStillLoading) && (
{filteredAssets.length !== 0 && !assetsStillLoading && (
<Table
rowGap="0px"
columnNames={type === 'from' ? fromColumns : toColumns}
Expand All @@ -145,12 +145,14 @@ export default function SelectAssetDialog({
{assetsStillLoading ? (
<LoadingSpinner />
) : (
<NoAssetsFound />
<>
<NoAssetsFound />
<Typography component="div" variant="body1" fontWeight={500} color="ds.text_gray_low">
{type === 'from' ? `No tokens found for “${searchTerm}”` : 'No asset was found to swap'}
</Typography>
</>
)}
</Box>
<Typography component="div" variant="body1" fontWeight={500} color="ds.text_gray_low">
{type === 'from' ? `No tokens found for “${searchTerm}”` : 'No asset was found to swap'}
</Typography>
</Box>
</Box>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ type Props = {|
+buyButton?: Node,
+menu?: ?Node,
+pageBanner?: ?Node,
+isErrorPage?: boolean,
|};

@observer
Expand All @@ -23,22 +24,24 @@ class NavBarRevamp extends Component<Props> {
buyButton: void,
menu: void,
pageBanner: boolean,
isErrorPage: boolean
|} = {
children: undefined,
goToNotifications: undefined,
walletDetails: undefined,
buyButton: undefined,
menu: undefined,
pageBanner: false,
isErrorPage: false,
};

render(): Node {
const { title, children, walletDetails, menu, buyButton, pageBanner } = this.props;
const { title, children, walletDetails, menu, buyButton, pageBanner, isErrorPage } = this.props;
return (
<Box
sx={{
backgroundColor: 'ds.bg_color_max',
borderBottom: pageBanner ? 'none' : '1px solid',
borderBottom: pageBanner || isErrorPage ? 'none' : '1px solid',
borderBottomColor: 'grayscale.200',
}}
>
Expand Down Expand Up @@ -73,7 +76,7 @@ class NavBarRevamp extends Component<Props> {
)}
</Box>
</Box>
{menu != null ? <Box sx={{ position: 'absolute', bottom: 0, left: 0 }}>{menu}</Box> : null}
{menu != null && !isErrorPage ? <Box sx={{ position: 'absolute', bottom: 0, left: 0 }}>{menu}</Box> : null}
</Box>
</Box>
</Box>
Expand Down
23 changes: 3 additions & 20 deletions packages/yoroi-extension/app/components/topbar/NavPlate.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import type { Node } from 'react';
import { observer } from 'mobx-react';
import { intlShape } from 'react-intl';
import styles from './NavPlate.scss';
import WalletAccountIcon from './WalletAccountIcon';
import { ReactComponent as ConceptualIcon } from '../../assets/images/wallet-nav/conceptual-wallet.inline.svg';
import { ReactComponent as TrezorIcon } from '../../assets/images/wallet-nav/trezor-wallet.inline.svg';
import { ReactComponent as LedgerIcon } from '../../assets/images/wallet-nav/ledger-wallet.inline.svg';
Expand All @@ -14,29 +13,15 @@ import type { WalletChecksum } from '@emurgo/cip4-js';
import type { $npm$ReactIntl$IntlFormat, $npm$ReactIntl$MessageDescriptor } from 'react-intl';
import globalMessages from '../../i18n/global-messages';
import type { WalletType } from '../../../chrome/extension/background/types';
import { constructPlate40 } from './WalletCard';
import { maybe } from '../../coreUtils';

type Props = {|
+plate: null | WalletChecksum,
+walletType: WalletType,
+name: string,
|};

export function constructPlate(
plate: WalletChecksum,
saturationFactor: number,
divClass: string,
): [string, React$Element<'div'>] {
return [plate.TextPart, (
<div className={divClass}>
<WalletAccountIcon
iconSeed={plate.ImagePart}
saturationFactor={saturationFactor}
scalePx={6}
/>
</div>
)];
}

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

Expand Down Expand Up @@ -67,9 +52,7 @@ export default class NavPlate extends Component<Props> {
render(): Node {
const { intl } = this.context;

const [accountPlateId, iconComponent] = (this.props.plate) ?
constructPlate(this.props.plate, 0, styles.icon)
: [];
const [accountPlateId, iconComponent] = maybe(this.props.plate, constructPlate40) ?? [];

const TypeIcon = this.getIcon(this.props.walletType);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { ReactComponent as IconEyeOpen } from '../../assets/images/my-wallets/ic
import { maybe } from '../../coreUtils';
import AmountDisplay from '../common/AmountDisplay';
import styles from './NavWalletDetailsRevamp.scss';
import WalletAccountIcon from './WalletAccountIcon';
import { constructPlate32 } from './WalletCard';
import type { $npm$ReactIntl$IntlFormat } from 'react-intl';
import type { TokenLookupKey } from '../../api/common/lib/MultiToken';
import type { TokenRow } from '../../api/ada/lib/storage/database/primitives/tables';
Expand Down Expand Up @@ -47,15 +47,6 @@ type Props = {|
+openWalletInfoDialog: () => void,
|};

function constructPlate(plate: WalletChecksum, saturationFactor: number, divClass: string): [string, React$Element<'div'>] {
return [
plate.TextPart,
<div className={divClass}>
<WalletAccountIcon iconSeed={plate.ImagePart} saturationFactor={saturationFactor} scalePx={6} />
</div>,
];
}

@observer
export default class NavWalletDetailsRevamp extends Component<Props> {
static defaultProps: {|
Expand Down Expand Up @@ -87,7 +78,7 @@ export default class NavWalletDetailsRevamp extends Component<Props> {

const totalAmount = this.getTotalAmount();
const showEyeIconSafe = showEyeIcon != null && showEyeIcon;
const [accountPlateId, iconComponent] = plate ? constructPlate(plate, 0, styles.icon) : [];
const [accountPlateId, iconComponent] = maybe(plate, constructPlate32) ?? [];
const amountDisplayId = `topBar:selectedWallet`;

return (
Expand All @@ -109,7 +100,9 @@ export default class NavWalletDetailsRevamp extends Component<Props> {
>
<div className={styles.outerWrapper}>
<button type="button" onClick={openWalletInfoDialog} className={styles.contentWrapper}>
<div className={classnames([styles.plate])}>{iconComponent}</div>
<Box marginRight="8px">
{iconComponent}
</Box>
<div className={styles.content}>
<div className={styles.walletInfo}>
<Typography component="div" variant="body2" fontWeight={500} sx={{ color: 'grayscale.900' }}>
Expand All @@ -121,7 +114,14 @@ export default class NavWalletDetailsRevamp extends Component<Props> {
</div>
<div className={styles.balance}>
<Box
sx={{ color: 'grayscale.max', height: '100%' }}
sx={{
color: 'grayscale.max',
height: '100%',
'& .MuiTypography-root': {
mt: '0px',
mb: '0px',
}
}}
className={classnames([totalAmount ? styles.amount : styles.spinnerWrapper])}
>
<AmountDisplay
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import type { Node } from 'react';
import { Component } from 'react';
import { observer } from 'mobx-react';
import styles from './WalletAccountIcon.scss';
import Blockies from 'react-blockies';
import tinycolor from 'tinycolor2';
import { hexToBytes } from '../../coreUtils';
Expand Down Expand Up @@ -59,7 +58,6 @@ export default class WalletAccountIcon extends Component<Props> {
bgColor={saturation(color.primary, saturationFactor)}
color={saturation(color.secondary, saturationFactor)}
spotColor={saturation(color.spots, saturationFactor)}
className={styles.walletIcon}
/>);
}
}

This file was deleted.

Loading
Loading