Skip to content

Commit

Permalink
perf
Browse files Browse the repository at this point in the history
  • Loading branch information
justraman committed Sep 13, 2023
1 parent 956c8d6 commit 3c5e892
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/publish_image.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: Publish docker image

on:
workflow_dispatch:
push:
branches:
- 'perf/remove-metadata'
tags:
- v*

Expand Down
8 changes: 4 additions & 4 deletions src/mappings/multiTokens/events/attribute_set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ export async function attributeSet(
if (!token.metadata) {
token.metadata = new Metadata()
}
token.metadata = await getMetadata(token.metadata, attribute)
// token.metadata = await getMetadata(token.metadata, attribute)
await ctx.store.save(token)
} else if (collection) {
if (!collection.metadata) {
collection.metadata = new Metadata()
}
collection.metadata = await getMetadata(collection.metadata, attribute)
// collection.metadata = await getMetadata(collection.metadata, attribute)
await ctx.store.save(collection)
}
await ctx.store.save(attribute)
Expand All @@ -117,14 +117,14 @@ export async function attributeSet(
if (!token.metadata) {
token.metadata = new Metadata()
}
token.metadata = await getMetadata(token.metadata, attribute)
// token.metadata = await getMetadata(token.metadata, attribute)
token.attributeCount += 1
await ctx.store.save(token)
} else if (collection) {
if (!collection.metadata) {
collection.metadata = new Metadata()
}
collection.metadata = await getMetadata(collection.metadata, attribute)
// collection.metadata = await getMetadata(collection.metadata, attribute)
collection.attributeCount += 1
await ctx.store.save(collection)
}
Expand Down
3 changes: 2 additions & 1 deletion src/mappings/multiTokens/events/token_created.ts
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,8 @@ export async function tokenCreated(
let metadata: Metadata | null | undefined = null
const collectionUri = collection.attributes.find((e) => e.key === 'uri')
if (collectionUri && (collectionUri.value.includes('{id}.json') || collectionUri.value.includes('%7Bid%7D.json'))) {
metadata = await getMetadata(new Metadata(), collectionUri)
// metadata = await getMetadata(new Metadata(), collectionUri)
metadata = new Metadata()
if (metadata) {
const collectionWithTokens = await ctx.store.findOneOrFail<Collection>(Collection, {
where: { id: eventData.collectionId.toString() },
Expand Down

0 comments on commit 3c5e892

Please sign in to comment.