Skip to content

Commit

Permalink
Fix build and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Siegrift committed Mar 18, 2023
1 parent f38d558 commit 15bf4b6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
7 changes: 3 additions & 4 deletions packages/airnode-deployer/src/handlers/aws/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ export async function processSignOevDataRequest(
// The shape of the body is guaranteed by the openAPI spec
const rawSignOevDataRequestBody = JSON.parse(event.body!) as ProcessSignOevDataRequestBody;

const verificationResult = verifySignOevDataRequest(rawSignOevDataRequestBody.signedData);
const verificationResult = verifySignOevDataRequest(rawSignOevDataRequestBody);
if (!verificationResult.success) {
logger.error(`Sign OEV data request verification error`);
const { statusCode, error } = verificationResult;
Expand All @@ -261,9 +261,8 @@ export async function processSignOevDataRequest(
logger.debug(`Sign OEV data request passed request verification`);

const [err, result] = await handlers.signOevData(
rawSignOevDataRequestBody,
verificationResult.validUpdateValues,
verificationResult.validUpdateTimestamps
rawSignOevDataRequestBody.signedData,
verificationResult.oevUpdateHash
);
if (err) {
// Returning 500 because failure here means something went wrong internally with a valid request
Expand Down
7 changes: 3 additions & 4 deletions packages/airnode-deployer/src/handlers/gcp/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ export async function processSignOevDataRequest(req: Request, res: Response) {
const rawSignOevDataRequestBody = parsedBody.data;
logger.debug(`HTTP signed data gateway request passed request body parsing`);

const verificationResult = verifySignOevDataRequest(rawSignOevDataRequestBody.signedData);
const verificationResult = verifySignOevDataRequest(rawSignOevDataRequestBody);
if (!verificationResult.success) {
logger.error(`Sign OEV data request verification error`);
const { statusCode, error } = verificationResult;
Expand All @@ -308,9 +308,8 @@ export async function processSignOevDataRequest(req: Request, res: Response) {
logger.debug(`Sign OEV data request passed request verification`);

const [err, result] = await handlers.signOevData(
rawSignOevDataRequestBody,
verificationResult.validUpdateValues,
verificationResult.validUpdateTimestamps
rawSignOevDataRequestBody.signedData,
verificationResult.oevUpdateHash
);
if (err) {
// Returning 500 because failure here means something went wrong internally with a valid request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ const createConfig = async (generateExampleFile: boolean): Promise<Config> => ({
corsOrigins: [],
},
oevGateway: {
enabled: false,
enabled: true,
maxConcurrency: 20,
corsOrigins: [],
},
logFormat: 'plain',
logLevel: 'DEBUG',
Expand Down
3 changes: 2 additions & 1 deletion packages/airnode-utilities/src/logging/logging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ export const logger = {
logFull('ERROR', message, { ...options, error });
return;
}
consoleLog(message, error);
if (error) consoleLog(message, error);
else consoleLog(message);
},
logPending: (pendingLogs: PendingLog[], options?: Partial<LogOptions>) =>
pendingLogs.forEach((pendingLog) => {
Expand Down

0 comments on commit 15bf4b6

Please sign in to comment.