Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 16 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require("@rushstack/eslint-patch/modern-module-resolution");

module.exports = {
root: true,
extends: ["@toruslabs/eslint-config-typescript"],
parser: "@typescript-eslint/parser",
ignorePatterns: ["*.config.js", "demo/*", ".eslintrc.js"],
parserOptions: {
sourceType: "module",
ecmaVersion: 2022,
project: "./tsconfig.json",
},
rules: {
camelcase: 0,
},
};
14 changes: 0 additions & 14 deletions .eslintrc.json

This file was deleted.

3 changes: 2 additions & 1 deletion .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# .prettierrc or .prettierrc.yaml
printWidth: 150
singleQuote: false
semi: true
semi: true
trailingComma: es5
11 changes: 6 additions & 5 deletions demo/rn-bare-example/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import * as WebBrowser from '@toruslabs/react-native-web-browser';
import EncryptedStorage from 'react-native-encrypted-storage';
import Web3Auth, {
LOGIN_PROVIDER,
OPENLOGIN_NETWORK,
IWeb3Auth,
OpenloginUserInfo,
} from '@web3auth/react-native-sdk';
Expand Down Expand Up @@ -54,8 +53,9 @@ export default function App() {
setKey(web3auth.privKey);
uiConsole('Logged In');
}
} catch (e: any) {
setConsole(e.message);
} catch (e: unknown) {
console.log(e, (e as Error).stack);
setConsole((e as Error).message);
}
};

Expand All @@ -79,17 +79,18 @@ export default function App() {
const init = async () => {
const auth = new Web3Auth(WebBrowser, EncryptedStorage, {
clientId,
network: OPENLOGIN_NETWORK.TESTNET, // or other networks
network: 'testnet', // or other networks
useCoreKitKey: false,
loginConfig: {},
enableLogging: true,
buildEnv: 'development',
});
setWeb3Auth(auth);
await auth.init();
if (auth?.privKey) {
uiConsole('Re logged in');
setUserInfo(auth.userInfo());
setKey(auth.privKey);
window.console.log(auth.privKey);
}
};
init();
Expand Down
Loading