From 8373301807ead2eb145cbc88da83ad4c53510d7d Mon Sep 17 00:00:00 2001 From: wphan Date: Wed, 10 Apr 2024 12:48:17 -0700 Subject: [PATCH] add marketType and marketIndex to priorityFee response --- src/index.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 3ee92bc..a2d403d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -464,7 +464,11 @@ const main = async (): Promise => { parseInt(process.env.HELIUS_REDIS_HOST_INDEX) ?? 0 ].client.get(`priorityFees_${marketType}_${marketIndex}`); if (fees) { - res.status(200).json(JSON.parse(fees)); + res.status(200).json({ + ...JSON.parse(fees), + marketType, + marketIndex, + }); return; } else { res.writeHead(404); @@ -500,7 +504,11 @@ const main = async (): Promise => { ].client.get( `priorityFees_${normedParam['marketType']}_${normedParam['marketIndex']}` ); - return JSON.parse(fees); + return { + ...JSON.parse(fees), + marketType, + marketIndex, + }; }) );