File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,18 @@ import { StatusCodes } from "http-status-codes";
44import { TransactionDB } from "../../../shared/db/transactions/db" ;
55import { standardResponseSchema } from "../../schemas/shared-api-schemas" ;
66
7+ // SPECIAL LOGIC FOR AMEX
8+ // added two admin routes to backfill tx hashes to the backfill table
9+ // loadBackfillRoute and clearBackfillRoute
10+ // loadBackfillRoute is used to load tx hashes to the backfill table
11+ // clearBackfillRoute is used to clear the backfill table
12+ // these routes are used by the AMEX script to backfill tx hashes to the backfill table
13+ // see https://github.com/thirdweb-dev/solutions-customer-scripts/blob/main/amex/scripts/load-backfill-via-api.ts
14+ // loadBackfillRoute is used to load tx hashes to the backfill table
15+ // clearBackfillRoute is used to clear the backfill table
16+ // these routes are used by the AMEX script to backfill tx hashes to the backfill table
17+ // see https://github.com/thirdweb-dev/solutions-customer-scripts/blob/main/amex/scripts/load-backfill-via-api.ts
18+
719const loadRequestBodySchema = Type . Object ( {
820 entries : Type . Array (
921 Type . Object ( {
Original file line number Diff line number Diff line change @@ -160,6 +160,10 @@ export async function getTransactionLogs(fastify: FastifyInstance) {
160160 hash = transaction . transactionHash ;
161161 }
162162
163+ // SPECIAL LOGIC FOR AMEX
164+ // AMEX uses this endpoint to get logs for transactions they didn't receive webhooks for
165+ // the queue ID's were cleaned out of REDIS so we backfilled tx hashes to this backfill table
166+ // see https://github.com/thirdweb-dev/solutions-customer-scripts/blob/main/amex/scripts/load-backfill-via-api.ts
163167 // Fallback to backfill table if enabled and not found
164168 if ( ! hash && env . ENABLE_TX_BACKFILL_FALLBACK ) {
165169 const backfillHash = await TransactionDB . getBackfillHash ( queueId ) ;
You can’t perform that action at this time.
0 commit comments