Skip to content

Commit 04e7418

Browse files
Merge pull request #48 from Web3Auth/fix/type-fixes
Fix/type fixes
2 parents 299eafd + 908bc2d commit 04e7418

File tree

9 files changed

+19
-21
lines changed

9 files changed

+19
-21
lines changed

examples/getting-started/readme.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
- `npm i -g http-server`
66

77

8-
### Run Example
8+
### Run Ethereum Example
99

10-
- `http-server .`
10+
- `http-server eth/`
11+
12+
13+
### Run Solana Example
14+
15+
- `http-server solana/`

examples/getting-started/index2.html renamed to examples/getting-started/solana/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ <h1>Web3Auth Integration Example</h1>
8282
console.log(address, "->", balance);
8383

8484
$("#address").text("Address: " + address + ".");
85-
$("#balance").text("Balance: " + balance + ".");
85+
$("#balance").text("Balance: " + balance.value + ".");
8686
}
8787

8888
$("#login").click(async function (event) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
},
2020
"devDependencies": {
2121
"@toruslabs/eslint-config-typescript": "^0.2.0",
22-
"@toruslabs/torus-scripts": "^0.2.2",
22+
"@toruslabs/torus-scripts": "^0.3.0",
2323
"@types/node": "^16",
2424
"@typescript-eslint/eslint-plugin": "^5.9.1",
2525
"cross-env": "^7.0.3",

packages/adapters/phantom-adapter/src/utils.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { PhantomWallet } from "@web3auth/solana-provider";
1+
import type { IPhantomWalletProvider } from "@web3auth/solana-provider";
22

33
export function poll(callback: () => boolean | Promise<boolean>, interval: number, count: number): Promise<boolean> {
44
return new Promise((resolve, reject) => {
@@ -20,7 +20,9 @@ export function poll(callback: () => boolean | Promise<boolean>, interval: numbe
2020
});
2121
}
2222

23-
export const detectProvider = async (options: { interval: number; count: number } = { interval: 1000, count: 3 }): Promise<PhantomWallet | null> => {
23+
export const detectProvider = async (
24+
options: { interval: number; count: number } = { interval: 1000, count: 3 }
25+
): Promise<IPhantomWalletProvider | null> => {
2426
const isPhantomAvailable = typeof window !== "undefined" && !!(window as any).solana?.isPhantom;
2527
if (isPhantomAvailable) {
2628
return (window as any).solana;

packages/adapters/wallet-connect-v1-adapter/src/config.ts

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

packages/adapters/wallet-connect-v1-adapter/src/walletConnectV1adapter.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import {
2525
import { WalletConnectProvider } from "@web3auth/ethereum-provider";
2626
import log from "loglevel";
2727

28-
import { defaultWalletConnectV1Options } from "./config";
2928
import { WalletConnectV1AdapterOptions } from "./interface";
3029

3130
class WalletConnectV1Adapter extends BaseAdapter<void> {
@@ -53,7 +52,7 @@ class WalletConnectV1Adapter extends BaseAdapter<void> {
5352

5453
constructor(options: WalletConnectV1AdapterOptions = {}) {
5554
super();
56-
this.adapterOptions = { ...defaultWalletConnectV1Options, ...options };
55+
this.adapterOptions = { ...options };
5756
this.chainConfig = options.chainConfig;
5857
}
5958

packages/modal/src/default.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export const getDefaultAdapterModule = async (params: {
3838
const defaultOptions = getOpenloginDefaultOptions(customChainConfig.chainNamespace, customChainConfig?.chainId);
3939
const adapter = new OpenloginAdapter({
4040
...defaultOptions,
41+
chainConfig: { ...(defaultOptions.chainConfig || {}), ...finalChainConfig },
4142
adapterSettings: { ...(defaultOptions.adapterSettings as OpenLoginOptions), clientId },
4243
});
4344
return adapter;

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1927,10 +1927,10 @@
19271927
eslint-config-problems "^6.0.0"
19281928
eslint-config-standard "^17.0.0-1"
19291929

1930-
"@toruslabs/torus-scripts@^0.2.2":
1931-
version "0.2.2"
1932-
resolved "https://registry.yarnpkg.com/@toruslabs/torus-scripts/-/torus-scripts-0.2.2.tgz#5680e8ea9e73a782babedf56ecc4b0fed3a7c42f"
1933-
integrity sha512-3uhibBvo/bTscK5Vvkysw81k6faqDvcc9pnO1TRd/5ruQp3FBP22woRAWvik1uYZLtV9z3cvGAbQ6qRH006+Ew==
1930+
"@toruslabs/torus-scripts@^0.3.0":
1931+
version "0.3.0"
1932+
resolved "https://registry.yarnpkg.com/@toruslabs/torus-scripts/-/torus-scripts-0.3.0.tgz#950224168a545541c53e1ef288200cd7a51cf866"
1933+
integrity sha512-a2KmQvekii3MvX/sPwiywUaKXEY8ElJaOFAHP3oKY65+ASUOg+AG9nXi09SefX/wkZbZbPKqZC2su4Af92bh9A==
19341934
dependencies:
19351935
"@babel/core" "~7.16.12"
19361936
"@babel/plugin-proposal-class-properties" "^7.16.7"

0 commit comments

Comments
 (0)