Skip to content

Commit

Permalink
style: update error messages for unsupported versions
Browse files Browse the repository at this point in the history
  • Loading branch information
mirceanis committed Dec 13, 2024
1 parent fca207d commit b3678b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,5 @@ node_modules/
!.yarn/sdks
!.yarn/versions

# ignore intellij local files
.idea/
6 changes: 4 additions & 2 deletions src/utils/ERC1024.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const encrypt = (
} as Eip1024EncryptedData;
}
default:
throw new Error('Encryption type/version not supported');
throw new Error(`Encryption type/version not supported ${version}`);
}
};

Expand Down Expand Up @@ -88,7 +88,9 @@ const decrypt = (
return bytesToUtf8(decryptedMessage);
}
default:
throw new Error('Encryption type/version not supported.');
throw new Error(
`Encryption type/version not supported (${encryptedData.version}).`,
);
}
};

Expand Down

0 comments on commit b3678b7

Please sign in to comment.