Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTrunk committed Jan 31, 2025
1 parent d8bd5e9 commit 1988218
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/apiServices/onramperApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function postDataToSign(req, res) {
if (!dataToSign || typeof dataToSign !== 'string') {
throw new Error('Invalid data to sign');
}
if (dataToSign.length < 100) {
if (dataToSign.length < 30) {
throw new Error('Data is too short');
}
if (dataToSign.length > 5000) {
Expand Down
2 changes: 1 addition & 1 deletion src/services/onramperService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const secretKey = config.keys.onramper;

export function generateSignature(data: string): string {
try {
if (data.length < 100) {
if (data.length < 30) {
throw new Error('Data is too short');
}
const hmac = crypto.createHmac('sha256', secretKey);
Expand Down

0 comments on commit 1988218

Please sign in to comment.