We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7fafcc5 + ac645ac commit a50c3d1Copy full SHA for a50c3d1
.changeset/serious-readers-brush.md
@@ -0,0 +1,5 @@
1
+---
2
+"@dojoengine/predeployed-connector": patch
3
4
+
5
+Catch error when unsuccessfully fetch 'dev_predeployedAccounts' endpoint
packages/predeployed-connector/src/index.ts
@@ -21,8 +21,16 @@ import {
21
22
class PredeployedAccountsChannel extends RpcChannel {
23
async getPredeployedAccounts() {
24
- // @ts-ignore
25
- return await this.fetchEndpoint("dev_predeployedAccounts");
+ try {
+ // @ts-ignore
26
+ return await this.fetchEndpoint("dev_predeployedAccounts");
27
+ } catch (error) {
28
+ console.warn(
29
+ "Failed to get `dev_predeployedAccounts` endpoint",
30
+ error
31
+ );
32
+ return [];
33
+ }
34
}
35
36
0 commit comments