@cartridge/controller 0.7.14-alpha.2 → 0.7.14-alpha.3

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cartridge/controller",
3
- "version": "0.7.14-alpha.2",
3
+ "version": "0.7.14-alpha.3",
4
4
  "description": "Cartridge Controller",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -36,8 +36,8 @@
36
36
  "cbor-x": "^1.5.0",
37
37
  "mipd": "^0.0.7",
38
38
  "@walletconnect/ethereum-provider": "^2.20.0",
39
- "@cartridge/account-wasm": "0.7.14-alpha.2",
40
- "@cartridge/utils": "0.7.14-alpha.2"
39
+ "@cartridge/ui": "0.7.14-alpha.3",
40
+ "@cartridge/account-wasm": "0.7.14-alpha.3"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/jest": "^29.5.14",
@@ -53,7 +53,7 @@
53
53
  "vite-plugin-node-polyfills": "^0.22.0",
54
54
  "vite-plugin-top-level-await": "^1.4.4",
55
55
  "vite-plugin-wasm": "^3.4.1",
56
- "@cartridge/tsconfig": "0.7.14-alpha.2"
56
+ "@cartridge/tsconfig": "0.7.14-alpha.3"
57
57
  },
58
58
  "scripts": {
59
59
  "build:deps": "pnpm build",
@@ -134,11 +134,13 @@ export class WalletBridge {
134
134
  let wallet: WalletAdapter | undefined;
135
135
  if (typeof identifier === "string") {
136
136
  // this is an address
137
- wallet = this.walletAdapters
138
- .values()
139
- .find((adapter) =>
140
- adapter.getConnectedAccounts().includes(identifier.toLowerCase()),
137
+ wallet = this.walletAdapters.values().find((adapter) => {
138
+ const ident = identifier.toLowerCase();
139
+ return (
140
+ adapter.getConnectedAccounts().includes(ident) ||
141
+ adapter.type === ident
141
142
  );
143
+ });
142
144
  } else {
143
145
  wallet = this.walletAdapters.get(identifier);
144
146
  }