Skip to content

Commit 4ad0643

Browse files
authored
Update dependencies (#351)
* Update dependencies * Trigger PR preview * Remove eslint camelcase rule
1 parent 509178d commit 4ad0643

File tree

11 files changed

+1391
-1754
lines changed

11 files changed

+1391
-1754
lines changed

package.json

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,30 @@
1010
},
1111
"dependencies": {
1212
"@albedo-link/intent": "^0.11.2",
13-
"@ledgerhq/hw-app-str": "^6.3.0",
14-
"@ledgerhq/hw-transport-webusb": "^6.3.0",
15-
"@reduxjs/toolkit": "^1.6.1",
13+
"@ledgerhq/hw-app-str": "^6.7.0",
14+
"@ledgerhq/hw-transport-webusb": "^6.7.0",
15+
"@reduxjs/toolkit": "^1.6.2",
1616
"@stellar/design-system": "^0.4.0",
1717
"@stellar/freighter-api": "^1.1.2",
18+
"@stellar/frontend-helpers": "^2.1.3",
1819
"@stellar/wallet-sdk": "^0.5.0-rc.0",
19-
"amplitude-js": "^8.4.0",
20+
"amplitude-js": "^8.8.0",
2021
"bignumber.js": "^9.0.1",
2122
"lodash": "^4.17.21",
2223
"moment": "^2.29.0",
2324
"node-sass": "6.0.1",
2425
"qrcode.react": "^1.0.0",
2526
"react": "^17.0.2",
2627
"react-dom": "^17.0.2",
27-
"react-redux": "^7.2.4",
28-
"react-router-dom": "^5.2.0",
28+
"react-redux": "^7.2.5",
29+
"react-router-dom": "^5.3.0",
2930
"react-scripts": "^4.0.3",
30-
"redux": "^4.1.0",
31+
"redux": "^4.1.1",
3132
"stellar-sdk": "^9.0.0-beta.0",
32-
"styled-components": "^5.3.0",
33-
"trezor-connect": "^8.1.27",
34-
"tslib": "^2.3.0",
35-
"typescript": "~4.3.5"
33+
"styled-components": "^5.3.1",
34+
"trezor-connect": "^8.2.1",
35+
"tslib": "^2.3.1",
36+
"typescript": "~4.4.3"
3637
},
3738
"scripts": {
3839
"install-if-package-changed": "git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD | grep --quiet yarn.lock && yarn install || exit 0",
@@ -66,38 +67,38 @@
6667
"@stellar/prettier-config": "^1.0.1",
6768
"@stellar/tsconfig": "^1.0.2",
6869
"@testing-library/jest-dom": "^5.14.1",
69-
"@testing-library/react": "^12.0.0",
70+
"@testing-library/react": "^12.1.2",
7071
"@testing-library/user-event": "^13.2.1",
7172
"@types/amplitude-js": "^8.0.1",
72-
"@types/jest": "^26.0.24",
73+
"@types/jest": "^27.0.2",
7374
"@types/ledgerhq__hw-transport-u2f": "^4.21.1",
7475
"@types/ledgerhq__hw-transport-webusb": "^4.70.1",
75-
"@types/lodash": "^4.14.172",
76-
"@types/node": "^16.4.13",
76+
"@types/lodash": "^4.14.175",
77+
"@types/node": "^16.10.2",
7778
"@types/qrcode.react": "^1.0.2",
78-
"@types/react": "^17.0.16",
79+
"@types/react": "^17.0.27",
7980
"@types/react-dom": "^17.0.9",
8081
"@types/react-redux": "^7.1.18",
81-
"@types/react-router-dom": "^5.1.8",
82+
"@types/react-router-dom": "^5.3.0",
8283
"@types/redux": "^3.6.0",
83-
"@types/styled-components": "^5.1.12",
84-
"@typescript-eslint/eslint-plugin": "^4.29.0",
85-
"@typescript-eslint/parser": "^4.29.0",
86-
"concurrently": "^6.2.0",
84+
"@types/styled-components": "^5.1.14",
85+
"@typescript-eslint/eslint-plugin": "^4.33.0",
86+
"@typescript-eslint/parser": "^4.33.0",
87+
"concurrently": "^6.3.0",
8788
"eslint": "^7.32.0",
8889
"eslint-config-prettier": "^8.3.0",
8990
"eslint-config-react": "^1.1.7",
9091
"eslint-config-react-app": "^6.0.0",
91-
"eslint-plugin-flowtype": "^5.9.0",
92-
"eslint-plugin-import": "^2.23.4",
93-
"eslint-plugin-jsdoc": "^36.0.6",
92+
"eslint-plugin-flowtype": "^6.1.0",
93+
"eslint-plugin-import": "^2.24.2",
94+
"eslint-plugin-jsdoc": "^36.1.0",
9495
"eslint-plugin-jsx-a11y": "^6.4.1",
9596
"eslint-plugin-prefer-arrow": "^1.2.3",
96-
"eslint-plugin-react": "^7.24.0",
97+
"eslint-plugin-react": "^7.26.1",
9798
"eslint-plugin-react-hooks": "^4.2.0",
98-
"husky": "^7.0.1",
99-
"lint-staged": "^11.1.2",
100-
"prettier": "^2.3.2",
99+
"husky": "^7.0.2",
100+
"lint-staged": "^11.2.0",
101+
"prettier": "^2.4.1",
101102
"pretty-quick": "^3.1.1"
102103
}
103104
}

src/components/SignIn/SignInLedgerForm.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { useDispatch } from "react-redux";
33
import { useHistory } from "react-router-dom";
44
import styled from "styled-components";
55
import { Button, InfoBlock, Loader, TextLink } from "@stellar/design-system";
6+
import { getCatchError } from "@stellar/frontend-helpers";
67
import { KeyType } from "@stellar/wallet-sdk";
78
import TransportWebUSB from "@ledgerhq/hw-transport-webusb";
89

@@ -110,10 +111,11 @@ export const SignInLedgerForm = ({ onClose }: ModalPageProps) => {
110111
const transport = await TransportWebUSB.request();
111112
dispatch(fetchLedgerStellarAddressAction({ ledgerBipPath, transport }));
112113
} catch (e) {
114+
const error = getCatchError(e);
113115
const message =
114-
e.message === "navigator.usb is undefined"
116+
error.message === "navigator.usb is undefined"
115117
? "Your browser does not support WebUSB"
116-
: e.toString();
118+
: error.toString();
117119

118120
setErrorMessage(message);
119121
}

src/ducks/flaggedAccounts.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { createAsyncThunk, createSlice } from "@reduxjs/toolkit";
2+
import { getCatchError } from "@stellar/frontend-helpers";
23

34
import {
45
FLAGGED_ACCOUNT_STORAGE_ID,
@@ -24,7 +25,8 @@ export const fetchFlaggedAccountsAction = createAsyncThunk(
2425
storageDateId: FLAGGED_ACCOUNT_DATE_STORAGE_ID,
2526
getAccountsFunc: getFlaggedAccounts,
2627
});
27-
} catch (error) {
28+
} catch (e) {
29+
const error = getCatchError(e);
2830
console.error(error.message);
2931
}
3032

src/ducks/memoRequiredAccounts.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { createAsyncThunk, createSlice } from "@reduxjs/toolkit";
2+
import { getCatchError } from "@stellar/frontend-helpers";
23
import {
34
MEMO_REQ_ACCOUNT_STORAGE_ID,
45
MEMO_REQ_ACCOUNT_DATE_STORAGE_ID,
@@ -22,7 +23,8 @@ export const fetchMemoRequiredAccountsAction = createAsyncThunk<
2223
storageDateId: MEMO_REQ_ACCOUNT_DATE_STORAGE_ID,
2324
getAccountsFunc: getMemoRequiredAccounts,
2425
});
25-
} catch (error) {
26+
} catch (e) {
27+
const error = getCatchError(e);
2628
console.error(error.message);
2729
}
2830

src/ducks/wallet/albedo.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { createAsyncThunk, createSlice } from "@reduxjs/toolkit";
22
import albedo from "@albedo-link/intent";
3+
import { getCatchError } from "@stellar/frontend-helpers";
34

45
import { ActionStatus, RejectMessage, WalletInitialState } from "types/types.d";
56

@@ -14,7 +15,8 @@ export const fetchAlbedoStellarAddressAction = createAsyncThunk<
1415
const albedoResponse = await albedo.publicKey();
1516

1617
return { publicKey: albedoResponse.pubkey };
17-
} catch (error) {
18+
} catch (e) {
19+
const error = getCatchError(e);
1820
return rejectWithValue({
1921
errorString: error.message || error.toString(),
2022
});

src/ducks/wallet/freighter.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { createAsyncThunk, createSlice } from "@reduxjs/toolkit";
22
import { getPublicKey } from "@stellar/freighter-api";
3+
import { getCatchError } from "@stellar/frontend-helpers";
34

45
import { ActionStatus, RejectMessage, WalletInitialState } from "types/types.d";
56

@@ -13,7 +14,8 @@ export const fetchFreighterStellarAddressAction = createAsyncThunk<
1314
try {
1415
const freighterResponse = await getPublicKey();
1516
return { publicKey: freighterResponse };
16-
} catch (error) {
17+
} catch (e) {
18+
const error = getCatchError(e);
1719
return rejectWithValue({
1820
errorString: error.toString(),
1921
});

src/ducks/wallet/ledger.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { createAsyncThunk, createSlice } from "@reduxjs/toolkit";
22
import LedgerApi from "@ledgerhq/hw-app-str";
33
import TransportWebUSB from "@ledgerhq/hw-transport-webusb";
4+
import { getCatchError } from "@stellar/frontend-helpers";
45
import { ActionStatus, RejectMessage, WalletInitialState } from "types/types.d";
56

67
export const fetchLedgerStellarAddressAction = createAsyncThunk<
@@ -15,7 +16,8 @@ export const fetchLedgerStellarAddressAction = createAsyncThunk<
1516
const ledgerApi = new LedgerApi(transport);
1617
const response = await ledgerApi.getPublicKey(ledgerBipPath);
1718
result.publicKey = response.publicKey;
18-
} catch (error) {
19+
} catch (e) {
20+
const error = getCatchError(e);
1921
return rejectWithValue({ errorString: error.toString() });
2022
}
2123
return result;

src/ducks/wallet/trezor.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { createAsyncThunk, createSlice } from "@reduxjs/toolkit";
2+
import { getCatchError } from "@stellar/frontend-helpers";
23
import TrezorConnect from "trezor-connect";
34

45
import { ActionStatus, RejectMessage, WalletInitialState } from "types/types.d";
@@ -26,7 +27,8 @@ export const fetchTrezorStellarAddressAction = createAsyncThunk<
2627
}
2728

2829
return { publicKey: trezorResponse.payload.address };
29-
} catch (error) {
30+
} catch (e) {
31+
const error = getCatchError(e);
3032
return rejectWithValue({
3133
errorString: error.toString(),
3234
});

src/helpers/keyManager.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,7 @@ export const loadPrivateKey = async ({
7777
password: string;
7878
}) => {
7979
const keyManager = createKeyManager();
80-
let result;
81-
try {
82-
result = await keyManager.loadKey(id, password);
83-
} catch (error) {
84-
return error;
85-
}
80+
const result = await keyManager.loadKey(id, password);
8681
return result;
8782
};
8883

temp.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
Temp file to trigger PR preview updates
2+
3+
- 1

0 commit comments

Comments
 (0)