Skip to content

Commit 020e147

Browse files
authored
Merge pull request #102 from Web3Auth/alpha
Release
2 parents 5013d80 + 67256b4 commit 020e147

File tree

14 files changed

+1604
-1025
lines changed

14 files changed

+1604
-1025
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ npm-debug.log*
2424
yarn-debug.log*
2525
yarn-error.log*
2626

27+
# todo: for local testing still tkey-mpc merge
2728
*.tgz

demo/redirect-flow-example/package-lock.json

Lines changed: 8 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/redirect-flow-example/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"@testing-library/react": "^13.4.0",
88
"@testing-library/user-event": "^13.5.0",
99
"@types/jest": "^27.5.2",
10-
"@types/jsonwebtoken": "^9.0.6",
1110
"@types/node": "^16.18.48",
1211
"@types/react": "^18.2.21",
1312
"@types/react-dom": "^18.2.7",

demo/redirect-flow-example/src/App.tsx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const uiConsole = (...args: any[]): void => {
1919
console.log(...args);
2020
};
2121

22-
const selectedNetwork = WEB3AUTH_NETWORK.MAINNET;
22+
const selectedNetwork = WEB3AUTH_NETWORK.DEVNET;
2323
// performance options
2424
// const options = {
2525
// manualSync: true,
@@ -302,6 +302,13 @@ function App() {
302302
return chainId;
303303
};
304304

305+
const setTSSWalletIndex = async (index=0) => {
306+
await coreKitInstance.setTssWalletIndex(index);
307+
// log new account details
308+
await getAccounts();
309+
}
310+
311+
305312
const getAccounts = async () => {
306313
if (!web3) {
307314
uiConsole("web3 not initialized yet");
@@ -622,6 +629,16 @@ function App() {
622629
Get Accounts
623630
</button>
624631

632+
<button onClick={() => setTSSWalletIndex(1)} className="card">
633+
Switch to wallet index: 1
634+
</button>
635+
<button onClick={() => setTSSWalletIndex(2)} className="card">
636+
Switch to wallet index: 2
637+
</button>
638+
<button onClick={() => setTSSWalletIndex(0)} className="card">
639+
Switch to wallet index: 0/default
640+
</button>
641+
625642
<button onClick={getBalance} className="card">
626643
Get Balance
627644
</button>

0 commit comments

Comments
 (0)