Skip to content

Commit 4c53661

Browse files
committed
Upgrade
1 parent a73c1ac commit 4c53661

File tree

14 files changed

+8046
-9239
lines changed

14 files changed

+8046
-9239
lines changed

.eslintrc.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
require("@rushstack/eslint-patch/modern-module-resolution");
2+
3+
module.exports = {
4+
root: true,
5+
extends: ["@toruslabs/eslint-config-typescript"],
6+
parser: "@typescript-eslint/parser",
7+
ignorePatterns: ["*.config.js", "demo/*", ".eslintrc.js"],
8+
parserOptions: {
9+
sourceType: "module",
10+
ecmaVersion: 2022,
11+
project: "./tsconfig.json",
12+
},
13+
rules: {
14+
camelcase: 0,
15+
},
16+
};

.eslintrc.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

.prettierrc.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# .prettierrc or .prettierrc.yaml
22
printWidth: 150
33
singleQuote: false
4-
semi: true
4+
semi: true
5+
trailingComma: es5

demo/rn-bare-example/App.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import * as WebBrowser from '@toruslabs/react-native-web-browser';
1111
import EncryptedStorage from 'react-native-encrypted-storage';
1212
import Web3Auth, {
1313
LOGIN_PROVIDER,
14-
OPENLOGIN_NETWORK,
1514
IWeb3Auth,
1615
OpenloginUserInfo,
1716
} from '@web3auth/react-native-sdk';
@@ -52,8 +51,9 @@ export default function App() {
5251
setKey(web3auth.privKey);
5352
uiConsole('Logged In');
5453
}
55-
} catch (e) {
56-
setConsole(e.message);
54+
} catch (e: unknown) {
55+
window.console.log(e, e.stack);
56+
setConsole((e as Error).message);
5757
}
5858
};
5959

@@ -77,9 +77,11 @@ export default function App() {
7777
const init = async () => {
7878
const auth = new Web3Auth(WebBrowser, EncryptedStorage, {
7979
clientId,
80-
network: OPENLOGIN_NETWORK.TESTNET, // or other networks
80+
network: 'testnet', // or other networks
8181
useCoreKitKey: false,
8282
loginConfig: {},
83+
enableLogging: true,
84+
buildEnv: 'development',
8385
});
8486
setWeb3Auth(auth);
8587
await auth.init();

0 commit comments

Comments
 (0)