Skip to content

Commit 397db8e

Browse files
committed
Merge branch 'main' into feat/add-language-selection
2 parents 5356b4c + bb78e75 commit 397db8e

File tree

55 files changed

+753
-325
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+753
-325
lines changed

apps/browser-extension-wallet/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "$WALLET_MANIFEST_NAME",
33
"description": "One fast, accessible, and secure platform for digital assets, DApps, NFTs, and DeFi.",
4-
"version": "1.28.0",
4+
"version": "1.29.0",
55
"manifest_version": 3,
66
"icons": {
77
"16": "icon16.png",

apps/browser-extension-wallet/package.json

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lace/browser-extension-wallet",
3-
"version": "1.28.0",
3+
"version": "1.29.0",
44
"description": "A fully capable wallet packaged as browser extensions for Chrome, Firefox, and Edge",
55
"homepage": "https://github.com/input-output-hk/lace/blob/master/apps/browser-extension-wallet/README.md",
66
"bugs": {
@@ -26,12 +26,13 @@
2626
],
2727
"scripts": {
2828
"build": "run-s cleanup:dist build:project",
29-
"build:app": "NODE_OPTIONS='--openssl-legacy-provider' run -T webpack --config webpack.app.${WEBPACK_ENV:-prod}.js --progress",
29+
"build:app": "run -T webpack --config webpack.app.${WEBPACK_ENV:-prod}.js --progress",
30+
"build:cs": "run -T webpack --config webpack.cs.${WEBPACK_ENV:-prod}.js --progress",
3031
"build:dev": "WEBPACK_ENV=dev yarn build",
3132
"build:firefox": "BROWSER=firefox yarn build",
3233
"build:firefox:dev": "WEBPACK_ENV=dev yarn build:firefox",
33-
"build:project": "run-p build:sw build:app",
34-
"build:sw": "NODE_OPTIONS='--openssl-legacy-provider' run -T webpack --config webpack.sw.${WEBPACK_ENV:-prod}.js --progress",
34+
"build:project": "run-p build:sw build:app build:cs",
35+
"build:sw": "run -T webpack --config webpack.sw.${WEBPACK_ENV:-prod}.js --progress",
3536
"cleanup": "run-p cleanup:*",
3637
"cleanup:dist": "rm -rf dist",
3738
"cleanup:firefox-artifacts": "rm -rf artifacts-firefox",
@@ -45,26 +46,26 @@
4546
"pack:firefox": "run-s cleanup:firefox-artifacts && web-ext build --source-dir=./dist/ --filename=lace-firefox-browser-extension.zip --artifacts-dir=artifacts-firefox && unzip -o artifacts-firefox/lace-firefox-browser-extension.zip -d artifacts-firefox && rm -rf artifacts-firefox/lace-firefox-browser-extension.zip",
4647
"prepare": "ts-patch install -s",
4748
"prettier": "run -T prettier --write .",
48-
"serve:app": "NODE_OPTIONS='--openssl-legacy-provider' run -T webpack serve --config webpack.app.dev.js --env RUN_DEV_SERVER=true",
49+
"serve:app": "run -T webpack serve --config webpack.app.dev.js --env RUN_DEV_SERVER=true",
4950
"test": "run -T jest --config test/jest.config.js",
5051
"test:e2e": "yarn exec echo \"No e2e tests on this app yet!\"",
5152
"type-check": "echo \"@lace/browser-extension-wallet: no type-check command specified\"",
5253
"watch": " run-s cleanup:dist watch:project",
53-
"watch:app": "NODE_OPTIONS='--openssl-legacy-provider' run -T webpack --config webpack.app.dev.js --progress --watch",
54-
"watch:sw": "NODE_OPTIONS='--openssl-legacy-provider' run -T webpack --config webpack.sw.dev.js --progress --watch",
54+
"watch:app": "run -T webpack --config webpack.app.dev.js --progress --watch",
55+
"watch:sw": "run -T webpack --config webpack.sw.dev.js --progress --watch",
5556
"watch:project": "run-p watch:sw watch:app"
5657
},
5758
"dependencies": {
5859
"@ant-design/icons": "^4.7.0",
59-
"@cardano-sdk/cardano-services-client": "0.26.27",
60-
"@cardano-sdk/core": "0.46.9",
61-
"@cardano-sdk/dapp-connector": "0.13.23",
62-
"@cardano-sdk/input-selection": "0.14.25",
63-
"@cardano-sdk/tx-construction": "0.28.7",
64-
"@cardano-sdk/util": "0.17.0",
65-
"@cardano-sdk/util-rxjs": "0.9.27",
66-
"@cardano-sdk/wallet": "0.53.20",
67-
"@cardano-sdk/web-extension": "0.39.30",
60+
"@cardano-sdk/cardano-services-client": "0.26.28",
61+
"@cardano-sdk/core": "0.46.10",
62+
"@cardano-sdk/dapp-connector": "0.13.24",
63+
"@cardano-sdk/input-selection": "0.14.26",
64+
"@cardano-sdk/tx-construction": "0.28.8",
65+
"@cardano-sdk/util": "0.17.1",
66+
"@cardano-sdk/util-rxjs": "0.9.28",
67+
"@cardano-sdk/wallet": "0.53.21",
68+
"@cardano-sdk/web-extension": "0.39.32",
6869
"@emurgo/cip14-js": "~3.0.1",
6970
"@input-output-hk/lace-ui-toolkit": "3.5.0",
7071
"@lace/bitcoin": "0.1.0",
@@ -119,7 +120,7 @@
119120
"zustand": "3.5.14"
120121
},
121122
"devDependencies": {
122-
"@cardano-sdk/hardware-ledger": "0.16.18",
123+
"@cardano-sdk/hardware-ledger": "0.16.19",
123124
"@emurgo/cardano-message-signing-asmjs": "1.0.1",
124125
"@openpgp/web-stream-tools": "0.0.11-patch-0",
125126
"@pdfme/common": "^4.0.2",
Lines changed: 9 additions & 0 deletions
Loading

apps/browser-extension-wallet/src/components/MainMenu/DropdownMenuOverlay/components/WalletAccounts.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ export const WalletAccounts = ({ isPopup, onBack }: { isPopup: boolean; onBack:
156156
await addAccount({
157157
wallet,
158158
accountIndex,
159-
metadata: { name }
159+
metadata: { name },
160+
derivationType: wallet.metadata.trezorConfig?.derivationType
160161
});
161162
analytics.sendEventToPostHog(PostHogAction.MultiWalletEnableAccount, {
162163
// eslint-disable-next-line camelcase

apps/browser-extension-wallet/src/components/MainMenu/MainHeader.module.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
.controls {
2828
display: flex;
2929
align-items: center;
30-
gap: size_unit(1);
30+
gap: size_unit(0.75);
3131

3232
.avatar {
3333
font-size: 20px;
@@ -47,7 +47,7 @@
4747
}
4848

4949
.betaPill {
50-
background: linear-gradient(94.22deg, #FF92E1 -18.3%, #FDC300 118.89%);
50+
background: linear-gradient(94.22deg, #ff92e1 -18.3%, #fdc300 118.89%);
5151
border-radius: 100px;
5252

5353
.betaPillCopy {

apps/browser-extension-wallet/src/components/MainMenu/MainHeader.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { BrowserViewSections } from '@lib/scripts/types';
1313
import { NetworkPill } from '@components/NetworkPill';
1414
import { useAnalyticsContext } from '@providers';
1515
import { PostHogAction } from '@providers/AnalyticsProvider/analyticsTracker';
16+
import { NotificationsBellContainer } from '@components/NotificationsCenter';
1617

1718
export const MainHeader = (): React.ReactElement => {
1819
const { t } = useTranslation();
@@ -60,6 +61,7 @@ export const MainHeader = (): React.ReactElement => {
6061
.then(() => window.close())
6162
}
6263
/>
64+
<NotificationsBellContainer popupView />
6365
<DropdownMenu isPopup />
6466
</div>
6567
</div>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import React from 'react';
2+
import { Button } from '@lace/common';
3+
import styles from './NotificationsCenter.module.scss';
4+
import NotificationBellIcon from '../../assets/icons/notifications-bell.component.svg';
5+
6+
// eslint-disable-next-line no-magic-numbers
7+
const formatNotificationCount = (count: number) => (count < 10 ? count.toString() : '9+');
8+
9+
export interface NotificationsBellProps {
10+
notificationsCount: number;
11+
onClick: () => void;
12+
popupView?: boolean;
13+
}
14+
15+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
16+
export const NotificationsBell = ({ notificationsCount, onClick }: NotificationsBellProps): React.ReactElement => (
17+
<Button className={styles.btn} block onClick={onClick} color="gradient" data-testid="notifications-bell">
18+
<NotificationBellIcon />
19+
{notificationsCount > 0 && <span className={styles.badge}>{formatNotificationCount(notificationsCount)}</span>}
20+
</Button>
21+
);
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import React, { useState } from 'react';
2+
import { NotificationsBell } from './NotificationsBell';
3+
import { usePostHogClientContext } from '@providers/PostHogClientProvider';
4+
import { ExperimentName } from '@lib/scripts/types/feature-flags';
5+
export interface NotificationsCenterContainerProps {
6+
popupView?: boolean;
7+
}
8+
9+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
10+
export const NotificationsBellContainer = ({ popupView }: NotificationsCenterContainerProps): React.ReactElement => {
11+
const posthog = usePostHogClientContext();
12+
13+
// TODO Connect with notifications center
14+
const [notificationsCount, setNotificationsCount] = useState(0);
15+
16+
// TODO Connect with notifications center
17+
const handleClick = () => {
18+
// eslint-disable-next-line no-magic-numbers
19+
setNotificationsCount(notificationsCount === 11 ? 0 : notificationsCount + 1);
20+
};
21+
22+
return (
23+
posthog?.isFeatureFlagEnabled(ExperimentName.NOTIFICATIONS_CENTER) && (
24+
<NotificationsBell notificationsCount={notificationsCount} onClick={handleClick} popupView={popupView} />
25+
)
26+
);
27+
};
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
@import '../../../../../packages/core/src/ui/styles/theme.scss';
2+
@import '../../../../../packages/common/src/ui/styles/theme.scss';
3+
4+
.badge {
5+
position: absolute;
6+
top: size_unit(-2);
7+
right: size_unit(-2);
8+
background: #7f5af0;
9+
color: white;
10+
border-radius: 50%;
11+
padding: 2px 2px;
12+
font-size: size_unit(1.5);
13+
font-weight: bold;
14+
min-width: size_unit(2.5);
15+
height: size_unit(2.5);
16+
display: flex;
17+
align-items: center;
18+
justify-content: center;
19+
font-family: 'Proxima Nova', Arial, Helvetica, sans-serif;
20+
}
21+
22+
.btn {
23+
max-width: size_unit(6);
24+
min-width: size_unit(6) !important;
25+
padding: size_unit(1) size_unit(2.75) !important;
26+
position: relative;
27+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from './NotificationsBell';
2+
export * from './NotificationsBellContainer';

0 commit comments

Comments
 (0)