@jsm-mit/rabbit-motoko-package 0.2.16 → 0.2.17

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.
@@ -36,9 +36,9 @@ export class RabbitMotokoActor {
36
36
  console.error("❌ Błąd podczas konfiguracji Agenta:", err);
37
37
  }
38
38
  }
39
- async runFunctionAndSyncTimeIfNecessaryAsyncUnsafe(fn) {
39
+ async runFunctionAndSyncTimeIfNecessaryAsyncUnsafe(fnAsync) {
40
40
  try {
41
- return fn();
41
+ return await fnAsync();
42
42
  }
43
43
  catch (error) {
44
44
  const errorMsg = BetterJSON.stringify(error);
@@ -47,7 +47,7 @@ export class RabbitMotokoActor {
47
47
  console.warn("⚠️ Wykryto problem z zaufaniem/czasem. Próbuję synchronizacji...");
48
48
  await this.syncTimeAsync(false);
49
49
  try {
50
- return fn();
50
+ return await fnAsync();
51
51
  }
52
52
  catch (err) {
53
53
  console.error(BetterJSON.stringify(err));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsm-mit/rabbit-motoko-package",
3
- "version": "0.2.16",
3
+ "version": "0.2.17",
4
4
  "description": "Wrapper TypeScript package for Rabbit Motoko Canister.",
5
5
  "license": "ISC",
6
6
  "author": "",