diff --git a/CHANGELOG.md b/CHANGELOG.md index f8c9fcb4..9feac9b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- changed: Add signature header support to Exolix - changed: Add index for orderId - changed: Add EVM chainId, pluginId, and tokenId fields to StandardTx - changed: Update Lifi to provide chainId, pluginId, and tokenId diff --git a/src/partners/exolix.ts b/src/partners/exolix.ts index 261598b1..54dfc8da 100644 --- a/src/partners/exolix.ts +++ b/src/partners/exolix.ts @@ -30,7 +30,8 @@ const asExolixPluginParams = asObject({ latestIsoDate: asOptional(asString, EXOLIX_START_DATE) }), apiKeys: asObject({ - apiKey: asOptional(asString) + apiKey: asOptional(asString), + signature: asOptional(asString) }) }) @@ -230,10 +231,10 @@ export async function queryExolix( ): Promise { const { log } = pluginParams const { settings, apiKeys } = asExolixPluginParams(pluginParams) - const { apiKey } = apiKeys + const { apiKey, signature } = apiKeys let { latestIsoDate } = settings - if (apiKey == null) { + if (apiKey == null || signature == null) { return { settings: { latestIsoDate }, transactions: [] } } @@ -252,7 +253,8 @@ export async function queryExolix( method: 'GET', headers: { 'Content-Type': 'application/json', - Authorization: `${apiKey}` + Authorization: `${apiKey}`, + signature: `${signature}` } }