Skip to content

Commit

Permalink
⚡ save swap in nft if it is enabled by schema
Browse files Browse the repository at this point in the history
  • Loading branch information
vikiival committed Aug 2, 2024
1 parent 6fefe71 commit f1bbe87
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/mappings/nfts/createSwap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,14 @@ export async function handleCreateSwap(context: Context): Promise<void> {
final.status = final.blockNumber >= deadline ? TradeStatus.EXPIRED : TradeStatus.ACTIVE
final.updatedAt = event.timestamp

// TODO: SAVE SOMEWHERE
await context.store.save(final)

// DEV_NOTE: need to be first enabled by schema (line 82)
// if ('swap' in nft) {
// nft.swap = final
// await context.store.save(nft)
// }

success(OPERATION, `${id} by ${event.caller} by ${event.caller}`)

// SwapCreated {
Expand Down

0 comments on commit f1bbe87

Please sign in to comment.