Skip to content

Commit 5d43425

Browse files
authored
Release/2.2.2 (#1249)
* Release 2.2.1 version * Remove unused `vaultResetedSaga` and streamline `resetTrustedWasmState` logic. * Fix nullable checks for `origin` in trusted wasm approval logic. * Include `.env` in build artifacts and fallback to timestamp for missing commit hash. * Release 2.2.2 version
1 parent 68fd2d7 commit 5d43425

File tree

8 files changed

+20
-26
lines changed

8 files changed

+20
-26
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Casper Wallet",
33
"description": "Securely manage your CSPR tokens and interact with dapps with the self-custody wallet for the Casper blockchain.",
4-
"version": "2.2.1",
4+
"version": "2.2.2",
55
"author": "MAKE LLC",
66
"scripts": {
77
"devtools:redux": "redux-devtools --hostname=localhost",

scripts/build_src.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
HASH=$(git rev-parse --short HEAD)
22

3-
zip -r casper-wallet-src#$HASH.zip src scripts utils *.* && mv casper-wallet-src#$HASH.zip build/
3+
zip -r casper-wallet-src#$HASH.zip src scripts utils *.* .env && mv casper-wallet-src#$HASH.zip build/

src/apps/signature-request/pages/sign-transaction/index.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,11 @@ export function SignTransactionPage() {
298298
}, [maybeRequireApproval]);
299299

300300
const toggleWasmApproval = useCallback(() => {
301+
const origin = originRef.current[requestId].activeOrigin ?? null;
302+
301303
if (
302304
!(
303-
activeOrigin &&
305+
origin &&
304306
signatureRequest &&
305307
(isTxSignatureRequestWasmAction(signatureRequest.action) ||
306308
isTxSignatureRequestWasmProxyAction(signatureRequest.action))
@@ -313,20 +315,20 @@ export function SignTransactionPage() {
313315
setWasmApproved(false);
314316
dispatchToMainStore(
315317
removeWasmFromTrusted({
316-
origin: activeOrigin,
318+
origin,
317319
wasmHash: signatureRequest.action.washHash
318320
})
319321
);
320322
} else {
321323
setWasmApproved(true);
322324
dispatchToMainStore(
323325
addWasmToTrusted({
324-
origin: activeOrigin,
326+
origin,
325327
wasmHash: signatureRequest.action.washHash
326328
})
327329
);
328330
}
329-
}, [activeOrigin, signatureRequest, wasmApproved]);
331+
}, [requestId, signatureRequest, wasmApproved]);
330332

331333
const renderFooter = () => {
332334
if (signingPageState === SigningPageState.LedgerConfirmation) {

src/background/redux/sagas/onboarding-sagas.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { contactsReseted } from '@background/redux/contacts/actions';
1010
import { resetRateApp } from '@background/redux/rate-app/actions';
1111
import { recipientPublicKeyReseted } from '@background/redux/recent-recipient-public-keys/actions';
1212
import { vaultSettingsReseted } from '@background/redux/settings/actions';
13+
import { resetTrustedWasmState } from '@background/redux/trusted-wasm/actions';
1314

1415
import { deriveKeyPair, validateSecretPhrase } from '@libs/crypto';
1516
import {
@@ -57,6 +58,7 @@ function* resetVaultSaga() {
5758
yield put(loginRetryCountReseted());
5859
yield put(recipientPublicKeyReseted());
5960
yield put(contactsReseted());
61+
yield put(resetTrustedWasmState());
6062
yield put(vaultSettingsReseted());
6163
yield put(resetRateApp());
6264
yield put(resetAppEventsDismission());

src/background/redux/sagas/trusted-wasm-saga.ts

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,15 @@
11
import { put, select, takeLatest } from 'redux-saga/effects';
22
import { getType } from 'typesafe-actions';
33

4-
import {
5-
removeAllWasmFromTrustedOrigin,
6-
resetTrustedWasmState
7-
} from '../trusted-wasm/actions';
8-
import {
9-
accountDisconnected,
10-
siteDisconnected,
11-
vaultReseted
12-
} from '../vault/actions';
4+
import { removeAllWasmFromTrustedOrigin } from '../trusted-wasm/actions';
5+
import { accountDisconnected, siteDisconnected } from '../vault/actions';
136
import { selectCountOfConnectedAccountsWithActiveOrigin } from '../vault/selectors';
147

158
export function* trustedWasmSaga() {
16-
yield takeLatest(getType(vaultReseted), vaultResetedSaga);
179
yield takeLatest(getType(accountDisconnected), accountDisconnectedSaga);
1810
yield takeLatest(getType(siteDisconnected), siteDisconnectedSaga);
1911
}
2012

21-
function* vaultResetedSaga() {
22-
yield put(resetTrustedWasmState());
23-
}
24-
2513
function* accountDisconnectedSaga({
2614
payload: { siteOrigin }
2715
}: ReturnType<typeof accountDisconnected>) {

src/background/redux/trusted-wasm/selectors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const selectTrustedWasmForActiveOrigin = createSelector(
1010
selectActiveOrigin,
1111
selectTrustedWasmByOriginDict,
1212
(origin, hashesByOriginDict) =>
13-
origin != null && (hashesByOriginDict[origin] || []).length > 0
13+
origin != null && (hashesByOriginDict?.[origin] || []).length > 0
1414
? hashesByOriginDict[origin]
1515
: []
1616
);

webpack.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ const webpack = require('webpack'),
99
TsconfigPaths = require('tsconfig-paths-webpack-plugin'),
1010
Dotenv = require('dotenv-webpack');
1111

12-
const commitHash = process.env.HASH || process.env.GITHUB_SHA;
12+
const commitHash =
13+
process.env.HASH || process.env.GITHUB_SHA || Date.now().toFixed();
14+
1315
if (!commitHash) {
1416
throw Error('No commit hash env!');
1517
}

xcode-project/Casper Wallet/Casper Wallet.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@
640640
CODE_SIGN_ENTITLEMENTS = "Casper Wallet/Casper Wallet.entitlements";
641641
CODE_SIGN_STYLE = Automatic;
642642
COMBINE_HIDPI_IMAGES = YES;
643-
CURRENT_PROJECT_VERSION = 135;
643+
CURRENT_PROJECT_VERSION = 136;
644644
ENABLE_HARDENED_RUNTIME = YES;
645645
GENERATE_INFOPLIST_FILE = YES;
646646
INFOPLIST_FILE = "Casper Wallet/Info.plist";
@@ -654,7 +654,7 @@
654654
"@executable_path/../Frameworks",
655655
);
656656
MACOSX_DEPLOYMENT_TARGET = 10.14;
657-
MARKETING_VERSION = 2.2.1;
657+
MARKETING_VERSION = 2.2.2;
658658
OTHER_LDFLAGS = (
659659
"-framework",
660660
SafariServices,
@@ -677,7 +677,7 @@
677677
CODE_SIGN_ENTITLEMENTS = "Casper Wallet/Casper Wallet.entitlements";
678678
CODE_SIGN_STYLE = Automatic;
679679
COMBINE_HIDPI_IMAGES = YES;
680-
CURRENT_PROJECT_VERSION = 135;
680+
CURRENT_PROJECT_VERSION = 136;
681681
ENABLE_HARDENED_RUNTIME = YES;
682682
GENERATE_INFOPLIST_FILE = YES;
683683
INFOPLIST_FILE = "Casper Wallet/Info.plist";
@@ -691,7 +691,7 @@
691691
"@executable_path/../Frameworks",
692692
);
693693
MACOSX_DEPLOYMENT_TARGET = 10.14;
694-
MARKETING_VERSION = 2.2.1;
694+
MARKETING_VERSION = 2.2.2;
695695
OTHER_LDFLAGS = (
696696
"-framework",
697697
SafariServices,

0 commit comments

Comments
 (0)