Skip to content

Commit

Permalink
feat: contract events arguments mismatch (#686)
Browse files Browse the repository at this point in the history
  • Loading branch information
janmichek authored Mar 21, 2024
1 parent 6d49a4c commit 5d4474d
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/components/ContractEventCellBurn.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<template>
<value-hash-ellipsed
:hash="contractDetails.id"
:link-to="`/contracts/${contractDetails.id}`"/>

<transaction-arrow-right-icon/>

<app-chip size="sm">
{{ tokenValue }}
</app-chip>
Expand All @@ -13,8 +7,6 @@
<script setup>
import { formatNumber, formatReduceDecimals } from '@/utils/format'
import AppChip from '@/components/AppChip'
import TransactionArrowRightIcon from '@/components/TransactionArrowRightIcon'
import ValueHashEllipsed from '@/components/ValueHashEllipsed'
const props = defineProps({
contractDetails: {
Expand All @@ -30,11 +22,11 @@ const props = defineProps({
const eventData = computed(() => props.event.data)
const tokenValue = computed(() => {
if (!props.contractDetails.tokenDetails || props.contractDetails.contractType === 'AEX-141') {
return eventData.value[0]
return eventData.value[1]
}
return formatNumber(
formatReduceDecimals(eventData.value[0], props.contractDetails.tokenDetails.decimals),
formatReduceDecimals(eventData.value[1], props.contractDetails.tokenDetails.decimals),
) + ` ${props.contractDetails.tokenDetails.symbol}`
})
</script>

0 comments on commit 5d4474d

Please sign in to comment.