Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
00a6ae4
Bump version to 2.4.0 and update @bringweb3/chrome-extension-kit to 1…
Comp0te Feb 9, 2026
6258f06
Refactor account list item and header connection status components to…
Comp0te Feb 9, 2026
4519363
Update transfer pages to suggest adding recipient as contact only whe…
Comp0te Feb 9, 2026
acb33ad
Update "Select Account" page to disable "Next" button when no account…
Comp0te Feb 9, 2026
ff8aa63
Refactor connection approval text logic for improved readability and …
Comp0te Feb 9, 2026
7c60932
Disable Hot Module Replacement (HMR) and live reload to prevent infin…
Comp0te Mar 2, 2026
eaa3ab8
Add overlay banner theme variables for dark and light modes
Comp0te Mar 2, 2026
3e40502
Add system color scheme handling to settings reducer and selectors
Comp0te Mar 2, 2026
75d9813
Add connection approval flow with balance and account info integration
Comp0te Mar 2, 2026
35c8b10
Refactor token icon rendering logic to use SVG as default and simplif…
Comp0te Mar 5, 2026
1157d57
Add activity feed UI with corresponding business logic
Comp0te Mar 5, 2026
a7d5ed4
Add CsprTrade market data provider icon and mapping to price provider…
Comp0te Mar 5, 2026
ad6928b
Merge remote-tracking branch 'origin/develop' into release/2.4.0
Comp0te Mar 5, 2026
d2b328e
Bump version to 2.4.0 and update build scripts and Xcode project conf…
Comp0te Mar 5, 2026
ed039d7
Update `casper-wallet-core` dependency and remove unused Xcode resour…
Comp0te Mar 10, 2026
cfc27dd
Update label from "Cost" to "Charged amount" in deploy details page.
Comp0te Mar 10, 2026
67c1308
Fix `recipientPublicKey` null check in `shouldSuggestAddContact` logic.
Comp0te Mar 10, 2026
33e4a91
Wrap `AccountInfoIcon` in a `<div>` to resolve layout issue in `aucti…
Comp0te Mar 12, 2026
014399a
Update `casper-wallet-core`, replace `Identicon` with `AccountInfoIco…
Comp0te Mar 13, 2026
7dce1ed
Update `@bringweb3/chrome-extension-kit` to version 1.6.2.
Comp0te Mar 17, 2026
3480f01
Update `casper-wallet-core` dependency to latest commit hash.
Comp0te Mar 19, 2026
e5bc182
Prevent default form submission behavior in `PopupLayout` and `Layout…
Comp0te Mar 19, 2026
66aee11
Add collapsible results section to `TransactionContainer` and improve…
Comp0te Mar 19, 2026
b3292c3
Bump version to 2.4.0rc5 and update build script and Xcode project wi…
Comp0te Mar 19, 2026
2622721
Update `casper-wallet-core` dependency to new commit hash and include…
Comp0te Mar 25, 2026
765df76
Fix incorrect `collectionHash` prop by replacing `deploy.contractHash…
Comp0te Mar 25, 2026
d0f4135
Replace `AccountInfoRow` with `ContractInfoRow` where applicable and …
Comp0te Mar 25, 2026
c1562e7
Integrate `HashTooltip` and `PortalTooltip` into `common.tsx`, enhanc…
Comp0te Mar 25, 2026
56a20ba
Release 2.4.0 version
Comp0te Mar 30, 2026
9809252
Improve e2e tests robustness with added content script checks and ext…
Comp0te Mar 30, 2026
d4c8501
Merge remote-tracking branch 'origin/develop' into release/2.4.1
Comp0te Apr 7, 2026
bc5fd74
Release 2.4.1 version
Comp0te Apr 8, 2026
8ba5cd9
Release 2.4.2 version with updated @bringweb3/chrome-extension-kit de…
Comp0te Apr 26, 2026
476ea38
Refactor signature request pages to replace `activeOrigin` and `activ…
Comp0te Apr 26, 2026
c132aad
Add `requestTabId` support across SDK response handling for improved …
Comp0te Apr 26, 2026
c0e5cc0
Refactor selectors across signature request pages to replace `activeO…
Comp0te Apr 26, 2026
2e24f93
fix(signature-request): prevent duplicate cancel response after succe…
Comp0te Apr 26, 2026
3a1d5e1
Ensure SDK responses are sent only once per request across signature …
Comp0te Apr 26, 2026
0875766
Release 2.4.2 version
Comp0te Apr 28, 2026
029f9f2
Merge remote-tracking branch 'origin/develop' into release/2.4.2
Comp0te Apr 28, 2026
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
12 changes: 6 additions & 6 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions 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": "2.4.1",
"version": "2.4.2",
"author": "MAKE LLC",
"scripts": {
"devtools:redux": "redux-devtools --hostname=localhost",
Expand Down Expand Up @@ -52,7 +52,7 @@
"styled-components": "^5"
},
"dependencies": {
"@bringweb3/chrome-extension-kit": "1.6.3",
"@bringweb3/chrome-extension-kit": "1.6.4",
"@formatjs/intl": "2.10.4",
"@hookform/resolvers": "2.9.10",
"@lapo/asn1js": "1.2.4",
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_all.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
HASH=$(git rev-parse --short HEAD)

npm run build:chrome && npm run build:firefox && cd ./build && zip -r casper-wallet-2.4.0rc7#$HASH.zip ./* && npm run build:src
npm run build:chrome && npm run build:firefox && cd ./build && zip -r casper-wallet-2.4.2rc1#$HASH.zip ./* && npm run build:src
14 changes: 10 additions & 4 deletions src/apps/connect-to-app/pages/approve-connection/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import { ErrorMessages } from '@src/constants';
import { useAccountManager } from '@popup/hooks/use-account-actions-with-events';

import { closeCurrentWindow } from '@background/close-current-window';
import { sendSdkResponseToSpecificTab } from '@background/send-sdk-response-to-specific-tab';
import {
parseRequestTabId,
sendSdkResponseToSpecificTab
} from '@background/send-sdk-response-to-specific-tab';

import { sdkMethod } from '@content/sdk-method';

Expand Down Expand Up @@ -42,8 +45,9 @@ export function ApproveConnectionPage({
}: Props) {
const searchParams = new URLSearchParams(document.location.search);
const requestId = searchParams.get('requestId');
const requestTabId = parseRequestTabId(searchParams);

if (!requestId) {
if (!requestId || requestTabId == null) {
throw Error(
`${ErrorMessages.common.MISSING_SEARCH_PARAM.description} ${requestId}`
);
Expand All @@ -57,14 +61,16 @@ export function ApproveConnectionPage({
const handleApproveConnection = async () => {
await connectAccounts(selectedAccountNames, origin, siteTitle);
await sendSdkResponseToSpecificTab(
sdkMethod.connectResponse(true, { requestId })
sdkMethod.connectResponse(true, { requestId }),
requestTabId
);
navigate(RouterPath.Connecting);
};

const handleCancel = async () => {
await sendSdkResponseToSpecificTab(
sdkMethod.connectResponse(false, { requestId })
sdkMethod.connectResponse(false, { requestId }),
requestTabId
);
closeCurrentWindow();
};
Expand Down
14 changes: 10 additions & 4 deletions src/apps/connect-to-app/pages/select-account/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ import {
selectConnectedAccountNamesWithActiveOrigin,
selectIsActiveAccountConnectedWithActiveOrigin
} from '@background/redux/vault/selectors';
import { sendSdkResponseToSpecificTab } from '@background/send-sdk-response-to-specific-tab';
import {
parseRequestTabId,
sendSdkResponseToSpecificTab
} from '@background/send-sdk-response-to-specific-tab';

import { sdkMethod } from '@content/sdk-method';

Expand Down Expand Up @@ -44,11 +47,12 @@ export function SelectAccountPage({
}: SelectAccountPageProps) {
const searchParams = new URLSearchParams(document.location.search);
const requestId = searchParams.get('requestId');
const requestTabId = parseRequestTabId(searchParams);

const connectedAccountNames =
useSelector(selectConnectedAccountNamesWithActiveOrigin) ?? [];

if (!requestId) {
if (!requestId || requestTabId == null) {
throw Error(
`${ErrorMessages.common.MISSING_SEARCH_PARAM.description} ${requestId}`
);
Expand All @@ -59,7 +63,8 @@ export function SelectAccountPage({
);
if (isActiveAccountConnected) {
sendSdkResponseToSpecificTab(
sdkMethod.connectResponse(true, { requestId })
sdkMethod.connectResponse(true, { requestId }),
requestTabId
).then(() => {
closeCurrentWindow();
});
Expand All @@ -70,7 +75,8 @@ export function SelectAccountPage({

const handleCancel = async () => {
await sendSdkResponseToSpecificTab(
sdkMethod.connectResponse(false, { requestId })
sdkMethod.connectResponse(false, { requestId }),
requestTabId
);
closeCurrentWindow();
};
Expand Down
14 changes: 11 additions & 3 deletions src/apps/connect-to-app/pages/switch-account/content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,12 @@ import {
UnconnectedAccountsList
} from './unconnected-accounts-list';

type SwitchAccountContentProps = { requestId: string };
type SwitchAccountContentProps = { requestId: string; requestTabId: number };

export function SwitchAccountContent({ requestId }: SwitchAccountContentProps) {
export function SwitchAccountContent({
requestId,
requestTabId
}: SwitchAccountContentProps) {
const activeOrigin = useSelector(selectActiveOrigin);
const activeAccount = useSelector(selectVaultActiveAccount);
const accountsPublicKeys = useSelector(selectVaultAccountsPublicKeys);
Expand Down Expand Up @@ -122,6 +125,7 @@ export function SwitchAccountContent({ requestId }: SwitchAccountContentProps) {
</ParagraphContainer>
<UnconnectedAccountsList
requestId={requestId}
requestTabId={requestTabId}
unconnectedAccountsList={unconnectedAccountsList}
accountsInfo={accountsInfo}
/>
Expand Down Expand Up @@ -165,7 +169,10 @@ export function SwitchAccountContent({ requestId }: SwitchAccountContentProps) {
onClick={async () => {
await changeActiveAccount(account.name);
await sendSdkResponseToSpecificTab(
sdkMethod.switchAccountResponse(true, { requestId })
sdkMethod.switchAccountResponse(true, {
requestId
}),
requestTabId
);
closeCurrentWindow();
}}
Expand All @@ -180,6 +187,7 @@ export function SwitchAccountContent({ requestId }: SwitchAccountContentProps) {
/>
<UnconnectedAccountsList
requestId={requestId}
requestTabId={requestTabId}
unconnectedAccountsList={unconnectedAccountsList}
accountsInfo={accountsInfo}
/>
Expand Down
18 changes: 14 additions & 4 deletions src/apps/connect-to-app/pages/switch-account/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ import React from 'react';
import { ErrorMessages } from '@src/constants';

import { closeCurrentWindow } from '@background/close-current-window';
import { sendSdkResponseToSpecificTab } from '@background/send-sdk-response-to-specific-tab';
import {
parseRequestTabId,
sendSdkResponseToSpecificTab
} from '@background/send-sdk-response-to-specific-tab';

import { sdkMethod } from '@content/sdk-method';

Expand All @@ -18,16 +21,18 @@ import { SwitchAccountContent } from './content';
export function SwitchAccountPage() {
const searchParams = new URLSearchParams(document.location.search);
const requestId = searchParams.get('requestId');
const requestTabId = parseRequestTabId(searchParams);

if (!requestId) {
if (!requestId || requestTabId == null) {
throw Error(
`${ErrorMessages.common.MISSING_SEARCH_PARAM.description} ${requestId}`
);
}

const handleCancel = async () => {
await sendSdkResponseToSpecificTab(
sdkMethod.connectResponse(false, { requestId })
sdkMethod.connectResponse(false, { requestId }),
requestTabId
);
closeCurrentWindow();
};
Expand All @@ -44,7 +49,12 @@ export function SwitchAccountPage() {
)}
/>
)}
renderContent={() => <SwitchAccountContent requestId={requestId} />}
renderContent={() => (
<SwitchAccountContent
requestId={requestId}
requestTabId={requestTabId}
/>
)}
/>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ export const SpaceBetweenContainer = styled(CentredFlexRow)`
interface UnconnectedAccountsListProps {
unconnectedAccountsList: AccountListRowWithAccountHash<AccountListRows>[];
requestId: string;
requestTabId: number;
accountsInfo: Record<string, IAccountInfo> | undefined;
}

export const UnconnectedAccountsList = ({
unconnectedAccountsList,
requestId,
requestTabId,
accountsInfo
}: UnconnectedAccountsListProps) => {
const activeOrigin = useSelector(selectActiveOrigin);
Expand Down Expand Up @@ -103,7 +105,8 @@ export const UnconnectedAccountsList = ({
activeOrigin
);
await sendSdkResponseToSpecificTab(
sdkMethod.switchAccountResponse(false, { requestId })
sdkMethod.switchAccountResponse(false, { requestId }),
requestTabId
);
closeCurrentWindow();
}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,40 +1,77 @@
import React from 'react';
import { Trans, useTranslation } from 'react-i18next';
import { useTheme } from 'styled-components';
import styled, { useTheme } from 'styled-components';

import {
AlignedFlexRow,
ContentContainer,
FlexColumn,
PageContainer,
ParagraphContainer,
SpacingSize
SpacingSize,
VerticalSpaceContainer
} from '@libs/layout';
import { FormField, Input, TextArea, Typography } from '@libs/ui/components';
import { truncateKey } from '@libs/ui/components/hash/utils';
import { MaybeLink } from '@libs/ui/components/maybe-link/maybe-link';
import { getFaviconUrlFromOrigin } from '@libs/ui/components/site-favicon-badge/site-favicon-badge';

const Favicon = styled.img`
width: 40px;
height: 40px;

object-fit: contain;
object-position: center;

border-radius: ${({ theme }) => theme.borderRadius.twenty}px;
`;

export interface SignMessageContentProps {
message: string;
hasDecryptionError: boolean;
decryptedMessage: string;
publicKeyHex: string;
origin: string | null;
}

export function DecryptMessageContent({
message,
hasDecryptionError,
decryptedMessage,
publicKeyHex
publicKeyHex,
origin
}: SignMessageContentProps) {
const { t } = useTranslation();
const theme = useTheme();
const faviconUrl = getFaviconUrlFromOrigin(origin);

return (
<PageContainer>
<ContentContainer>
<ParagraphContainer top={SpacingSize.XL}>
<Typography type="header">
<Trans t={t}>Decrypt Message Request</Trans>
</Typography>
</ParagraphContainer>
<VerticalSpaceContainer top={SpacingSize.Medium}>
<AlignedFlexRow gap={SpacingSize.Small}>
{faviconUrl && (
<div>
<Favicon src={faviconUrl} />
</div>
)}
<FlexColumn flexGrow={1}>
<Typography type="header">
<Trans t={t}>Decrypt Request</Trans>
</Typography>
<MaybeLink link={origin}>
<Typography
type="captionRegular"
color={'contentAction'}
ellipsis
style={{ maxWidth: '296px' }}
>
<Trans t={t}>{origin}</Trans>
</Typography>
</MaybeLink>
</FlexColumn>
</AlignedFlexRow>
</VerticalSpaceContainer>
{hasDecryptionError && (
<ParagraphContainer top={SpacingSize.XL}>
<FormField label={t('Decryption error:')}>
Expand Down
Loading
Loading