Skip to content

Commit

Permalink
[FeatFix] fix method name burn for nft detail
Browse files Browse the repository at this point in the history
  • Loading branch information
tamvb2391 committed Jun 11, 2024
1 parent 9e91ad6 commit ff8b07f
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/app/pages/evm-token/evm-nft-detail/evm-nft-detail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,21 @@ export class EvmNFTDetailComponent implements OnInit {
return this.transactionService.getListMappingName(listMethodId).pipe(
map((element) => {
if (erc721Activities?.length > 0) {
return erc721Activities.map((tx) => {
return erc721Activities.map((tx, idx) => {
const methodId = _.get(tx, 'evm_transaction.data')?.substring(0, 8);
let methodType = mappingMethodName(element, methodId);

if (methodType === 'Burn') {
if (idx > 0 && erc721Activities[idx - 1].tempType === 'Burn') {
methodType = 'Approval';
} else {
methodType = 'Transfer';
tx.tempType = 'Burn';
}
}
return {
...tx,
type: mappingMethodName(element, methodId),
type: methodType,
};
});
}
Expand Down

0 comments on commit ff8b07f

Please sign in to comment.