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/1.6.3 #855

Merged
merged 72 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
75b0717
added listener for window closing (#752)
ost-ptk Aug 23, 2023
606cb69
fix displaying amount in CSPR only for Casper (#753)
ost-ptk Aug 23, 2023
1540c87
UI changed based on a new design (#754)
ost-ptk Aug 23, 2023
9c3058c
fixed skeleton for NFT image and made small changes (#755)
ost-ptk Aug 23, 2023
67623d7
feature: add remembering scroll position in the NFT, Deploys and Toke…
ost-ptk Aug 30, 2023
e6e4a53
illustrations are updated (#762)
ost-ptk Aug 30, 2023
d9e20b9
fix: fix native transfer in Firefox (#763)
ost-ptk Aug 30, 2023
24015b4
added tooltip on hover hash (#764)
ost-ptk Aug 30, 2023
6b535dc
Redesign list of NFTs (#766)
Comp0te Sep 4, 2023
8a25104
Fix issue with deploy timestamp (#768)
Comp0te Sep 6, 2023
2d76d97
Release 1.5.2 version (#777)
Comp0te Sep 12, 2023
5160753
feature: add NFT token transfer (#769)
ost-ptk Sep 12, 2023
77ecb70
fix issues with the layout of a deploy list (#772)
ost-ptk Sep 12, 2023
a8d68e2
build(deps): bump sqlite3 from 5.0.8 to 5.1.6 (#694)
dependabot[bot] Sep 12, 2023
19f439a
build(deps): bump json5 from 1.0.1 to 1.0.2 (#695)
dependabot[bot] Sep 12, 2023
466b193
build(deps): bump dns-packet from 5.3.1 to 5.6.0 (#696)
dependabot[bot] Sep 12, 2023
d140835
build(deps): bump xml2js and web-ext (#697)
dependabot[bot] Sep 12, 2023
ca3bb03
build(deps-dev): bump eslint-plugin-jsx-a11y from 6.6.1 to 6.7.1 (#703)
dependabot[bot] Sep 12, 2023
d65233a
build(deps-dev): bump fs-extra from 11.1.0 to 11.1.1 (#705)
dependabot[bot] Sep 12, 2023
2c017ad
build(deps-dev): bump i18next-conv from 13.1.0 to 14.0.0 (#706)
dependabot[bot] Sep 12, 2023
afb987d
build(deps): bump word-wrap from 1.2.3 to 1.2.4 (#731)
dependabot[bot] Sep 12, 2023
ac935a9
build(deps-dev): bump apollo-server-core from 3.11.1 to 3.12.1 (#765)
dependabot[bot] Sep 12, 2023
fbdc4db
build(deps): bump i18next from 21.10.0 to 23.5.1 (#773)
dependabot[bot] Sep 12, 2023
39b02f2
fix account status indicator (#775)
ost-ptk Sep 12, 2023
c831d4e
build(deps-dev): bump eslint from 8.28.0 to 8.49.0 (#776)
dependabot[bot] Sep 12, 2023
239a66f
build(deps): bump got and @redux-devtools/cli (#780)
dependabot[bot] Sep 12, 2023
fc0d6a5
build(deps): bump react-player from 2.12.0 to 2.13.0 (#785)
dependabot[bot] Sep 17, 2023
69e6ff5
build(deps-dev): bump prettier from 2.8.0 to 3.0.3 (#786)
dependabot[bot] Sep 17, 2023
48d534d
build(deps): bump redux from 4.2.0 to 4.2.1 (#787)
dependabot[bot] Sep 17, 2023
b0b6ebb
build(deps-dev): bump webpack-dev-server from 4.11.1 to 4.15.1 (#788)
dependabot[bot] Sep 17, 2023
5a3f50c
build(deps-dev): bump @types/chrome from 0.0.203 to 0.0.246 (#791)
dependabot[bot] Sep 17, 2023
93f713e
added message for not supporting reverse look-up modality (#783)
ost-ptk Sep 17, 2023
2ffcbbf
added a placeholder for the contract logo (#784)
ost-ptk Sep 17, 2023
240960b
fix: fix issue with prettier config (#792)
ost-ptk Sep 18, 2023
18788fb
added new UI for erc-20 action displaying (#790)
ost-ptk Sep 18, 2023
a1b2974
build(deps-dev): bump geckodriver from 3.2.0 to 4.2.1 (#793)
dependabot[bot] Sep 18, 2023
4189590
build(deps): bump react-query from 3.39.2 to 3.39.3 (#794)
dependabot[bot] Sep 18, 2023
5b9f7ab
build(deps): bump react-router-dom from 6.4.4 to 6.16.0 (#795)
dependabot[bot] Sep 18, 2023
8ae21b3
build(deps): bump @scure/bip39 from 1.1.0 to 1.2.1 (#796)
dependabot[bot] Sep 18, 2023
538904f
build(deps-dev): bump electron from 25.8.0 to 25.8.1 (#798)
dependabot[bot] Sep 18, 2023
6897362
build(deps-dev): bump lint-staged from 13.0.4 to 14.0.1 (#800)
dependabot[bot] Sep 22, 2023
fe0abda
build(deps-dev): bump tsconfig-paths-webpack-plugin from 4.0.0 to 4.1…
dependabot[bot] Sep 22, 2023
bac8e06
build(deps-dev): bump @types/facepaint from 1.2.2 to 1.2.3 (#803)
dependabot[bot] Sep 22, 2023
01d382f
build(deps-dev): bump webpack-cli from 5.0.0 to 5.1.4 (#804)
dependabot[bot] Sep 22, 2023
a5e8f9c
removed input type from the transaction fee fields (#807)
ost-ptk Sep 25, 2023
d4f8183
changed method of creating Keys for signing (#808)
ost-ptk Sep 25, 2023
3172029
fix: fix scope of bugs (#809)
ost-ptk Sep 25, 2023
0c69c55
fixed issue with the navigation menu screen scroll (#818)
ost-ptk Oct 4, 2023
e97e067
casper logo updated (#817)
ost-ptk Oct 4, 2023
8611813
removed the tooltip with the full public key when the user has only o…
ost-ptk Oct 4, 2023
3f5bb5b
build(deps-dev): bump electron from 25.8.1 to 25.9.0 (#822)
dependabot[bot] Oct 9, 2023
af2a411
disabled send button on NFT details page after this NFT was sent (#824)
ost-ptk Oct 9, 2023
ee1f7d8
fixed issue with the scroll on home page (#825)
ost-ptk Oct 9, 2023
fffe3a9
Release 1.6.0 version (#826)
Comp0te Oct 12, 2023
c3f7c28
added countdown for user password length (#806)
ost-ptk Oct 12, 2023
241f1e6
feature: add change password page (#799)
ost-ptk Oct 12, 2023
ecaa90f
added a checkbox for setting the max transfer amount for CSPR transfe…
ost-ptk Oct 12, 2023
b70605b
fixed issue with words highlighting in the confirm secret phrase view…
ost-ptk Oct 12, 2023
59310a3
feature: add dark mode (#821)
ost-ptk Oct 14, 2023
d602b30
build(deps): bump @scure/bip32 from 1.1.1 to 1.3.2 (#812)
dependabot[bot] Oct 14, 2023
2870976
build(deps-dev): bump webpack from 5.76.0 to 5.88.2 (#813)
dependabot[bot] Oct 14, 2023
fbc1291
build(deps-dev): bump eslint-plugin-react from 7.31.11 to 7.33.2 (#814)
dependabot[bot] Oct 14, 2023
de4e25c
build(deps-dev): bump @babel/preset-env from 7.20.2 to 7.23.2 (#828)
dependabot[bot] Oct 14, 2023
57c4138
Improve skeleton for dark mode (#835)
Comp0te Oct 17, 2023
22873f4
Release 1.6.1 version (#837)
Comp0te Oct 19, 2023
7ba1faa
fixed issue with insufficient data for displaying erc-20 tokens (#840)
ost-ptk Nov 1, 2023
2dacf5d
Update README.md to add reference to CSPR.click for integration (#842)
mrkara Nov 1, 2023
a126702
Improve erc20 tokens fetching (#843)
Comp0te Nov 2, 2023
155d44d
Release/1.6.2 (#844)
Comp0te Nov 2, 2023
249c4a9
feature: add QR code option to the settings menu (#774)
ost-ptk Nov 9, 2023
e0994ec
Release 1.6.3 version
Comp0te Nov 10, 2023
29e3996
Merge remote-tracking branch 'origin/master' into release/1.6.3
Comp0te Nov 10, 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
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16
v16.20.0
18 changes: 16 additions & 2 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Casper Wallet",
"description": "Securely manage your CSPR tokens and interact with dapps with the self-custody wallet for the Casper blockchain.",
"version": "1.6.2",
"version": "1.6.3",
"author": "MAKE LLC",
"scripts": {
"devtools:redux": "redux-devtools --hostname=localhost",
Expand Down Expand Up @@ -61,6 +61,7 @@
"@hot-loader/react-dom": "^17.0.1",
"@lapo/asn1js": "1.2.4",
"@make-software/ces-js-parser": "1.3.2",
"@noble/ciphers": "^0.3.0",
"@scure/bip32": "1.3.2",
"@scure/bip39": "1.2.1",
"@types/argon2-browser": "1.18.1",
Expand Down
5 changes: 5 additions & 0 deletions src/apps/popup/app-router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import { TokenDetailPage } from 'src/apps/popup/pages/token-details';
import { ActivityDetailsPage } from '@popup/pages/activity-details';
import { ReceivePage } from '@popup/pages/receive';
import { NftDetailsPage } from '@popup/pages/nft-details';
import { WalletQrCodePage } from '@popup/pages/wallet-qr-code';
import { TransferNftPage } from '@popup/pages/transfer-nft';
import { ChangePasswordPage } from '@popup/pages/change-password';

Expand Down Expand Up @@ -242,6 +243,10 @@ function AppRoutes() {
<Route path={RouterPath.Token} element={<TokenDetailPage />} />
<Route path={RouterPath.Receive} element={<ReceivePage />} />
<Route path={RouterPath.NftDetails} element={<NftDetailsPage />} />
<Route
path={RouterPath.GenerateWalletQRCode}
element={<WalletQrCodePage />}
/>
<Route path={RouterPath.TransferNft} element={<TransferNftPage />} />
<Route
path={RouterPath.ChangePassword}
Expand Down
28 changes: 21 additions & 7 deletions src/apps/popup/pages/backup-secret-phrase-password/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { useSelector } from 'react-redux';
import { Trans, useTranslation } from 'react-i18next';
import { useTranslation } from 'react-i18next';

import {
selectPasswordHash,
Expand All @@ -23,10 +23,14 @@ import { calculateSubmitButtonDisabled } from '@libs/ui/forms/get-submit-button-

interface BackupSecretPhrasePasswordPageType {
setPasswordConfirmed: () => void;
onClick?: (password: string) => Promise<void>;
loading?: boolean;
}

export const BackupSecretPhrasePasswordPage = ({
setPasswordConfirmed
setPasswordConfirmed,
onClick,
loading = false
}: BackupSecretPhrasePasswordPageType) => {
const { t } = useTranslation();

Expand All @@ -40,16 +44,26 @@ export const BackupSecretPhrasePasswordPage = ({
const {
register,
handleSubmit,
formState: { errors, isDirty }
formState: { errors, isDirty },
getValues
} = useUnlockWalletForm(passwordHash, passwordSaltHash);

const isSubmitButtonDisabled = calculateSubmitButtonDisabled({
isDirty
});

const onSubmit = () => {
setPasswordConfirmed();
dispatchToMainStore(loginRetryCountReseted());
if (onClick) {
const { password } = getValues();

onClick(password).then(() => {
setPasswordConfirmed();
dispatchToMainStore(loginRetryCountReseted());
});
} else {
setPasswordConfirmed();
dispatchToMainStore(loginRetryCountReseted());
}
};

return (
Expand All @@ -75,8 +89,8 @@ export const BackupSecretPhrasePasswordPage = ({
)}
renderFooter={() => (
<FooterButtonsContainer>
<Button disabled={isSubmitButtonDisabled}>
<Trans t={t}>Continue</Trans>
<Button disabled={isSubmitButtonDisabled || loading}>
{loading ? t('Loading') : t('Continue')}
</Button>
</FooterButtonsContainer>
)}
Expand Down
4 changes: 2 additions & 2 deletions src/apps/popup/pages/home/components/tokens-list/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export const formatErc20TokenBalance = (
name: token.contract_name,
balance: token.balance,
amount: erc20Amount,
symbol: token.metadata?.symbol || '',
decimals: token.metadata?.decimals,
symbol: token?.metadata?.symbol || '',
decimals: token?.metadata?.decimals,
amountFiat: null,
icon: token.icon_url || 'assets/icons/erc20-avatar.svg'
};
Expand Down
12 changes: 12 additions & 0 deletions src/apps/popup/pages/navigation-menu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,18 @@ export function NavigationMenuPageContent() {
},
{
id: 2,
title: t('Generate wallet QR code'),
description: t('Scan to import your wallet on mobile'),
iconPath: 'assets/icons/qr.svg',
disabled: false,
handleOnClick: () => {
closeNavigationMenu();

navigate(RouterPath.GenerateWalletQRCode);
}
},
{
id: 3,
title: t('Download account keys'),
description: t('For all accounts imported via file'),
iconPath: 'assets/icons/download.svg',
Expand Down
8 changes: 4 additions & 4 deletions src/apps/popup/pages/receive/content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,18 @@ export const ReceivePageContent = () => {
const tokens = useSelector(selectErc20Tokens, shallowEqual);

useEffect(() => {
if (tokenData.symbol === 'CSPR') {
if (tokenData?.symbol === 'CSPR') {
const balance =
(csprBalance.amountMotes && motesToCSPR(csprBalance.amountMotes)) ||
'0';
setTokenData(prev => ({ ...prev, balance }));
} else {
const erc20Tokens = formatErc20TokenBalance(tokens);
const balance =
erc20Tokens?.find(t => t.symbol === tokenData.symbol)?.amount ?? '0';
erc20Tokens?.find(t => t?.symbol === tokenData?.symbol)?.amount ?? '0';
setTokenData(prev => ({ ...prev, balance }));
}
}, [csprBalance, tokenData.symbol, tokens]);
}, [csprBalance, tokenData?.symbol, tokens]);

return (
<ContentContainer>
Expand All @@ -80,7 +80,7 @@ export const ReceivePageContent = () => {
</ParagraphContainer>
<ActiveAccountPlate
label="To account"
symbol={tokenData.symbol}
symbol={tokenData?.symbol}
balance={tokenData.balance}
/>
<VerticalSpaceContainer top={SpacingSize.XXXL}>
Expand Down
6 changes: 3 additions & 3 deletions src/apps/popup/pages/token-details/token.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const Token = ({ erc20Tokens }: TokenProps) => {
if (casperToken && activeAccount) {
setTokenData(casperToken);
setTokenInfoList([
{ id: 1, name: 'Symbol', value: casperToken.symbol }
{ id: 1, name: 'Symbol', value: casperToken?.symbol }
]);
}
} else {
Expand All @@ -78,8 +78,8 @@ export const Token = ({ erc20Tokens }: TokenProps) => {
if (token) {
setTokenData(token);
setTokenInfoList([
{ id: 1, name: 'Symbol', value: token.symbol },
{ id: 2, name: 'Decimals', value: (token.decimals || 0).toString() }
{ id: 1, name: 'Symbol', value: token?.symbol },
{ id: 2, name: 'Decimals', value: (token?.decimals || 0).toString() }
]);
} else {
setTokenData(prev => (prev ? { ...prev, amount: '0' } : null));
Expand Down
2 changes: 1 addition & 1 deletion src/apps/popup/pages/transfer/confirm-step.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export const ConfirmStep = ({
{listItems.text}
</Typography>
<AmountContainer>
<Typography type="captionHash">{`${listItems.amount} ${listItems.symbol}`}</Typography>
<Typography type="captionHash">{`${listItems.amount} ${listItems?.symbol}`}</Typography>
<Typography type={listItems.bold ? 'subtitle' : 'captionMedium'}>
{listItems.fiatPrice == null
? null
Expand Down
1 change: 0 additions & 1 deletion src/apps/popup/pages/transfer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ export const TransferPage = () => {

const { amountForm, recipientForm } = useTransferForm(
erc20Balance,
erc20Decimals,
isErc20Transfer,
csprBalance.amountMotes,
paymentAmount
Expand Down
73 changes: 73 additions & 0 deletions src/apps/popup/pages/wallet-qr-code/content.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import React, { useEffect, useState } from 'react';
import { Trans, useTranslation } from 'react-i18next';
import { QRCodeCanvas } from 'qrcode.react';
import styled, { useTheme } from 'styled-components';

import {
CenteredFlexRow,
ContentContainer,
ParagraphContainer,
SpacingSize
} from '@libs/layout';
import { Typography } from '@libs/ui';

const QRContainer = styled(CenteredFlexRow)`
padding: 20px 16px;
background-color: ${({ theme }) => theme.color.backgroundPrimary};
border-radius: ${({ theme }) => theme.borderRadius.base}px;
margin-top: 20px;
`;

interface WalletQrCodePageContentProps {
qrStrings: string[];
}

export const WalletQrCodePageContent = ({
qrStrings
}: WalletQrCodePageContentProps) => {
const theme = useTheme();
const [currentQrIndex, setCurrentQrIndex] = useState<number>(0);

useEffect(() => {
const int = setInterval(() => {
setCurrentQrIndex(prev => {
const next = prev + 1;

if (next === qrStrings.length) {
return 0;
}

return next;
});
}, 500);

return () => clearInterval(int);
}, [qrStrings.length]);

const { t } = useTranslation();

return (
<ContentContainer>
<ParagraphContainer top={SpacingSize.XL}>
<Typography type="header">
<Trans t={t}>QR code is ready!</Trans>
</Typography>
</ParagraphContainer>
<ParagraphContainer top={SpacingSize.Medium}>
<Typography type="body">
<Trans t={t}>Scan this with your Casper Wallet app.</Trans>
</Typography>
</ParagraphContainer>
<QRContainer>
<QRCodeCanvas
id="qrCode"
value={qrStrings[currentQrIndex]}
size={296}
fgColor={theme.color.contentPrimary}
bgColor={theme.color.backgroundPrimary}
level={'H'}
/>
</QRContainer>
</ContentContainer>
);
};
Loading
Loading