@ic-reactor/core 1.5.0 → 1.5.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/README.md CHANGED
@@ -19,7 +19,7 @@ yarn add @ic-reactor/core
19
19
  or you can use the UMD version:
20
20
 
21
21
  ```html
22
- <script src="https://github.com/B3Pay/ic-reactor/releases/download/v1.4.2/ic-reactor-core.min.js"></script>
22
+ <script src="https://github.com/B3Pay/ic-reactor/releases/download/v1.5.1/ic-reactor-core.min.js"></script>
23
23
  ```
24
24
 
25
25
  ### Using `createReactorCore`
@@ -75,7 +75,8 @@ class ActorManager {
75
75
  }, {});
76
76
  };
77
77
  this.initializeActor = (agent) => {
78
- console.info(`Initializing actor ${this.canisterId} on ${agent.isLocal() ? "local" : "ic"} network`);
78
+ var _a;
79
+ console.info(`Initializing actor ${this.canisterId} on ${((_a = agent.isLocal) === null || _a === void 0 ? void 0 : _a.call(agent)) === true ? "local" : "ic"} network`);
79
80
  const { _idlFactory, canisterId } = this;
80
81
  this.updateState({
81
82
  initializing: true,
@@ -138,7 +138,8 @@ class AgentManager {
138
138
  return this._agent;
139
139
  };
140
140
  this.getIsLocal = () => {
141
- return this._agent.isLocal();
141
+ var _a, _b;
142
+ return ((_b = (_a = this._agent).isLocal) === null || _b === void 0 ? void 0 : _b.call(_a)) === true;
142
143
  };
143
144
  this.getAgentState = () => {
144
145
  return this.agentStore.getState();
@@ -31,7 +31,10 @@ class CandidAdapter {
31
31
  this.didjsCanisterId = didjsCanisterId || this.getDefaultDidJsId();
32
32
  }
33
33
  getDefaultDidJsId() {
34
- return this.agent.isLocal() ? constants_1.DEFAULT_LOCAL_DIDJS_ID : constants_1.DEFAULT_IC_DIDJS_ID;
34
+ var _a, _b;
35
+ return ((_b = (_a = this.agent).isLocal) === null || _b === void 0 ? void 0 : _b.call(_a)) === true
36
+ ? constants_1.DEFAULT_LOCAL_DIDJS_ID
37
+ : constants_1.DEFAULT_IC_DIDJS_ID;
35
38
  }
36
39
  getCandidDefinition(canisterId) {
37
40
  return __awaiter(this, void 0, void 0, function* () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ic-reactor/core",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "A library for intracting with the Internet Computer canisters",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -52,5 +52,5 @@
52
52
  "engines": {
53
53
  "node": ">=10"
54
54
  },
55
- "gitHead": "02efba3e5948cb004777b8b54d623c4c537d3354"
55
+ "gitHead": "7052acfe64a7b66de507998e56139b517bb82736"
56
56
  }