@cartridge/controller 0.10.1 → 0.10.2
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/.turbo/turbo-build$colon$deps.log +14 -14
- package/.turbo/turbo-build.log +10 -10
- package/dist/index.js +6 -7
- package/dist/index.js.map +1 -1
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/index.js.map +1 -1
- package/dist/{provider-DSw1EyU9.js → provider-D-5qL7QC.js} +2 -2
- package/dist/{provider-DSw1EyU9.js.map → provider-D-5qL7QC.js.map} +1 -1
- package/dist/session.js +2 -2
- package/dist/stats.html +1 -1
- package/package.json +2 -2
- package/src/controller.ts +3 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cartridge/controller",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.2",
|
|
4
4
|
"description": "Cartridge Controller",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"vite-plugin-node-polyfills": "^0.23.0",
|
|
51
51
|
"vite-plugin-top-level-await": "^1.4.4",
|
|
52
52
|
"vite-plugin-wasm": "^3.4.1",
|
|
53
|
-
"@cartridge/tsconfig": "0.10.
|
|
53
|
+
"@cartridge/tsconfig": "0.10.2"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"build:deps": "pnpm build",
|
package/src/controller.ts
CHANGED
|
@@ -206,17 +206,14 @@ export default class ControllerProvider extends BaseProvider {
|
|
|
206
206
|
return false;
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
+
const currentChain = this.selectedChain;
|
|
210
|
+
|
|
209
211
|
try {
|
|
210
212
|
this.selectedChain = chainId;
|
|
211
|
-
const response = (await this.keychain.probe(this.rpcUrl())) as ProbeReply;
|
|
212
|
-
|
|
213
|
-
if (response.rpcUrl === this.rpcUrl()) {
|
|
214
|
-
return true;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
213
|
await this.keychain.switchChain(this.rpcUrl());
|
|
218
214
|
} catch (e) {
|
|
219
215
|
console.error(e);
|
|
216
|
+
this.selectedChain = currentChain;
|
|
220
217
|
return false;
|
|
221
218
|
}
|
|
222
219
|
|