Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: James Bayly <[email protected]>
  • Loading branch information
bgodlin and jamesbayly authored Nov 27, 2023
1 parent fca0769 commit a49e98c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Near/near-ref-finance/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SubQuery - Example Project for NEAR
# SubQuery - Example Project for Ref Finance on NEAR

[SubQuery](https://subquery.network) is a fast, flexible, and reliable open-source data indexer that provides you with custom APIs for your web3 project across all of our supported networks. To learn about how to get started with SubQuery, [visit our docs](https://academy.subquery.network).

Expand Down
1 change: 0 additions & 1 deletion Near/near-ref-finance/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ services:
- -f=/app
- --db-schema=app
- --workers=4
- --batch-size=1
healthcheck:
test: ["CMD", "curl", "-f", "http://subquery-node:3000/ready"]
interval: 3s
Expand Down
3 changes: 2 additions & 1 deletion Near/near-ref-finance/src/mappings/mappingHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Swap, Token, Pool } from "../types";
import { NearAction } from "@subql/types-near";

export async function handleAction(action: NearAction): Promise<void> {
logger.info(`Swap found at block ${action.transaction.block_height}`);
// An Action can belong to either a transaction or a receipt
// To check which one, we can check if action.transaction is null
// If it is null, then it belongs to a receipt
Expand All @@ -21,7 +22,7 @@ export async function handleAction(action: NearAction): Promise<void> {
await getOrCreatePool(JSON.stringify(actions[i]["token_out"]))
).id,
}).save();
logger.warn("Swap is saved");
logger.info("Swap is saved");
}
}

Expand Down

0 comments on commit a49e98c

Please sign in to comment.