@veridex/sdk 1.1.2 → 1.1.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.
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  AvalancheClient
3
- } from "../../chunk-AFHWA4CZ.mjs";
4
- import "../../chunk-DZUNCSI5.mjs";
3
+ } from "../../chunk-6JULIESG.mjs";
4
+ import "../../chunk-E5HHE7IW.mjs";
5
5
  import "../../chunk-TPEP6XUA.mjs";
6
6
  import "../../chunk-RD6ZYUVG.mjs";
7
7
  export {
@@ -1249,14 +1249,28 @@ var EVMClient = class {
1249
1249
  return { receipt };
1250
1250
  }
1251
1251
  async getTransactionPolicy(identityKeyHash) {
1252
- const result = await this.hubContract.getTransactionPolicy(identityKeyHash);
1253
- return {
1254
- enabled: result.enabled,
1255
- threshold: Number(result.threshold),
1256
- protectedActionMask: Number(result.protectedActionMask),
1257
- proposalTtl: Number(result.proposalTtl),
1258
- disableSessions: result.disableSessions
1259
- };
1252
+ try {
1253
+ const result = await this.hubContract.getTransactionPolicy(identityKeyHash);
1254
+ return {
1255
+ enabled: result.enabled,
1256
+ threshold: Number(result.threshold),
1257
+ protectedActionMask: Number(result.protectedActionMask),
1258
+ proposalTtl: Number(result.proposalTtl),
1259
+ disableSessions: result.disableSessions
1260
+ };
1261
+ } catch (error) {
1262
+ const code = error?.code;
1263
+ if (code === "CALL_EXCEPTION" || code === "BAD_DATA") {
1264
+ return {
1265
+ enabled: false,
1266
+ threshold: 0,
1267
+ protectedActionMask: 0,
1268
+ proposalTtl: 0,
1269
+ disableSessions: false
1270
+ };
1271
+ }
1272
+ throw error;
1273
+ }
1260
1274
  }
1261
1275
  async createTransactionProposal(signature, publicKeyX, publicKeyY, targetChain, actionPayload, signer) {
1262
1276
  const s = signer;