Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix token burn #263

Merged
merged 1 commit into from
May 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix token burn
  • Loading branch information
pasynkov committed May 5, 2023
commit 8a07ddeb98541ff0f2d9d9a467c0ab61af040e71
7 changes: 4 additions & 3 deletions apps/crawler/src/services/token/token.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ export class TokenService {
if (tokenId === 0) {
return;
}
const rand = Math.random();
const tokenData = await this.getTokenData(collectionId, tokenId, blockHash);

let result;
Expand Down Expand Up @@ -316,7 +315,8 @@ export class TokenService {
}
result = SubscriberAction.UPSERT;
} else {
const tokenOwnSelect = data[2].substrate || data[2].ethereum;
const tokenOwnSelect =
data[2].substrate || data[2].ethereum || data[2].value;
const ownerToken = normalizeSubstrateAddress(tokenOwnSelect);

await this.burnTokenOwnerPart({
Expand Down Expand Up @@ -438,7 +438,8 @@ export class TokenService {
'owner',
]);
this.logger.log(
`${eventName} token: ${tokenOwnerData.token_id} collection: ${tokenOwnerData.collection_id} in ${tokenOwnerData.block_number}`,
`${eventName} token: ${tokenOwnerData.token_id} collection:
${tokenOwnerData.collection_id} in ${tokenOwnerData.block_number}`,
);
}
}
Expand Down
3 changes: 2 additions & 1 deletion apps/crawler/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"declaration": false,
"outDir": "../../dist/apps/crawler"
"outDir": "../../dist/apps/crawler",
"sourceMap": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist", "test", "**/*spec.ts"]
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "polkastats-backend-uniquenetwork",
"version": "2.0.37",
"version": "2.0.38",
"description": "",
"author": "Unique Network Team",
"private": true,
Expand Down