Skip to content

Commit

Permalink
Simplify OEV GW response format
Browse files Browse the repository at this point in the history
  • Loading branch information
amarthadan committed Mar 20, 2023
1 parent d9a8f2e commit 8a302ae
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
14 changes: 2 additions & 12 deletions packages/airnode-node/src/handlers/sign-oev-data.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,7 @@ describe('signOevData', () => {
expect(err).toBeNull();
expect(res!.success).toBeTruthy();
expect(res!.data).toEqual([
{
signature:
'0xa8339565d47b5a80ae35702df0a4656809dfc0152c9bbd22a8a94ce6501690e077ad3b5d1fa7f9198eff3db0b74b8196c30c0f931677e2a09ba5e2c96621b08b1b',
},
'0xa8339565d47b5a80ae35702df0a4656809dfc0152c9bbd22a8a94ce6501690e077ad3b5d1fa7f9198eff3db0b74b8196c30c0f931677e2a09ba5e2c96621b08b1b',
]);
});

Expand All @@ -161,13 +158,6 @@ describe('signOevData', () => {

expect(err).toBeNull();
expect(res!.success).toBeTruthy();
expect(res!.data).toEqual([
{
signature: signatures[0],
},
{
signature: signatures[1],
},
]);
expect(res!.data).toEqual(signatures);
});
});
4 changes: 1 addition & 3 deletions packages/airnode-node/src/handlers/sign-oev-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@ export async function signOevData(
null,
{
success: true,
data: signatures.map((signature) => ({
signature,
})),
data: signatures,
},
];
}
2 changes: 1 addition & 1 deletion packages/airnode-node/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ export interface HttpSignedDataApiCallSuccessResponse {

export interface SignOevDataResponse {
success: true;
data: { signature: string }[];
data: string[];
}

export interface ApiCallErrorResponse {
Expand Down

0 comments on commit 8a302ae

Please sign in to comment.