Skip to content

Commit

Permalink
fix: collection revoke on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
wkolod committed Jan 12, 2024
1 parent c00da6a commit 80f9acd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ class CollectionService extends NodeService<Collection> {
}

if (mintedItems.length !== items.length) {
const nodeService = new NodeService<Collection>(this.wallet, this.api);
await nodeService.revoke(collectionId, vaultId);
const service = new CollectionService(this.wallet, this.api);
await service.revoke(collectionId, vaultId);
throw new InternalError("Something went wrong, please try again later or contact Akord support.");
}

Expand All @@ -77,8 +77,8 @@ class CollectionService extends NodeService<Collection> {
items: nfts
}
} catch (error) {
const nodeService = new NodeService<Collection>(this.wallet, this.api);
await nodeService.revoke(collectionId, vaultId);
const service = new CollectionService(this.wallet, this.api);
await service.revoke(collectionId, vaultId);
throw new InternalError("Something went wrong, please try again later or contact Akord support.");
}
}
Expand Down

0 comments on commit 80f9acd

Please sign in to comment.