We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2463eb4 commit 2e43339Copy full SHA for 2e43339
packages/plugin-nft-collections/src/services/security-manager.ts
@@ -43,7 +43,11 @@ export class SecurityManager {
43
let decrypted = decipher.update(data, "hex", "utf8");
44
decrypted += decipher.final("utf8");
45
46
- return JSON.parse(decrypted);
+ try {
47
+ return JSON.parse(decrypted);
48
+ } catch (error) {
49
+ throw new Error('Failed to decrypt or parse data');
50
+ }
51
}
52
53
hashData(data: string): string {
0 commit comments