@hardkas/wallet-adapter 0.3.0-alpha → 0.5.0-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +6 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -13,7 +13,12 @@ async function connectKaspaWallet(options) {
13
13
  if (!selected) {
14
14
  throw new Error(`Wallet provider not found: ${options.preferredWalletId}`);
15
15
  }
16
- await selected.connect({ networkId: options.networkId });
16
+ const account = await selected.connect({ networkId: options.networkId });
17
+ if (options.networkId && account.networkId !== options.networkId) {
18
+ throw new Error(
19
+ `Wallet connected to ${account.networkId}, expected ${options.networkId}`
20
+ );
21
+ }
17
22
  return selected;
18
23
  }
19
24
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hardkas/wallet-adapter",
3
- "version": "0.3.0-alpha",
3
+ "version": "0.5.0-alpha",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -8,7 +8,7 @@
8
8
  ".": "./dist/index.js"
9
9
  },
10
10
  "dependencies": {
11
- "@hardkas/core": "0.3.0-alpha"
11
+ "@hardkas/core": "0.5.0-alpha"
12
12
  },
13
13
  "devDependencies": {
14
14
  "tsup": "^8.3.5",