diff --git a/.env.example b/.env.example index 397a0336..743de715 100644 --- a/.env.example +++ b/.env.example @@ -42,7 +42,8 @@ DATABASE_URL=postgres://postgres:postgres@localhost:5432/grants_stack_indexer # METIS_ANDROMEDA_RPC_URL #COINGECKO_API_KEY= -#IPFS_GATEWAY= +#IPFS_GATEWAYs=[] +#WHITELISTED_ADDRESSES=["0x123..","0x456.."] # optional, enable the Postgraphile Pro plugin: https://www.npmjs.com/package/@graphile/pro #GRAPHILE_LICENSE diff --git a/src/config.ts b/src/config.ts index 04348d49..80cae777 100644 --- a/src/config.ts +++ b/src/config.ts @@ -20,7 +20,7 @@ type CoingeckoSupportedChainId = | 42220 | 1088; -const CHAIN_DATA_VERSION = "81"; +const CHAIN_DATA_VERSION = "82"; const IPFS_DATA_VERSION = "1"; const PRICE_DATA_VERSION = "1"; diff --git a/src/database/index.ts b/src/database/index.ts index 2a0b70a2..2fddeabe 100644 --- a/src/database/index.ts +++ b/src/database/index.ts @@ -1008,13 +1008,6 @@ export class Database { .where("chainId", "=", chainId) .execute(); - this.#logger.info("Deleting applications payouts"); - await trx - .withSchema(this.chainDataSchemaName) - .deleteFrom("prices") - .where("chainId", "=", chainId) - .execute(); - this.#logger.info("Deleting applications payouts"); await trx .withSchema(this.chainDataSchemaName) diff --git a/src/http/app.ts b/src/http/app.ts index 6c44a231..34ecf97e 100644 --- a/src/http/app.ts +++ b/src/http/app.ts @@ -270,8 +270,9 @@ const recoverEthereumAddress = async ({ if (!address || !timestamp || !signature) { return false; } - const whitelistedAddresses = - process.env.WHITELISTED_ADDRESSES?.split(",") || []; + const whitelistedAddresses: string[] = JSON.parse( + process.env.WHITELISTED_ADDRESSES! + ); // Check timestamp validity const currentTime = Date.now();