Skip to content

Commit ecf1791

Browse files
committed
CLN: Move the fix to lambda API
1 parent f9014f2 commit ecf1791

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/components/StatsBoxGrid.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,10 +459,10 @@ const StatsBoxGrid: React.FC<IProps> = () => {
459459

460460
const fetchTxCount = async (): Promise<void> => {
461461
try {
462-
const { result } = await getData<Array<IFetchTxResponse>>(
462+
const response = await getData<Array<IFetchTxResponse>>(
463463
`${process.env.GATSBY_FUNCTIONS_PATH}/txs`
464464
)
465-
const data = result
465+
const data = response
466466
.map(({ unixTimeStamp, transactionCount }) => ({
467467
timestamp: parseInt(unixTimeStamp) * 1000, // unix milliseconds
468468
value: transactionCount,

src/lambda/txs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const lambda = async (apiKey: string): Promise<HandlerResponse> => {
1919
const { data } = response
2020
return {
2121
statusCode: 200,
22-
body: JSON.stringify(data),
22+
body: JSON.stringify(data.result),
2323
}
2424
} catch (error) {
2525
console.error(error)

0 commit comments

Comments
 (0)