Skip to content

Quitar hardcode #11

@ArielRobotti

Description

@ArielRobotti

extraer el valor de 'props.task[0]?.task.token.decimals'

lo mismo con el Token Name. Extraerlo de 'props.task[0]?.task.token.symbol'
Queraria algo asi

const displayBids = computed(() => {
  return props.bids.map(([principal, offer], index) => {
    return {
      id: principal.toText(),
      image: 'https://api.dicebear.com/7.x/identicon/svg?seed=' + principal.toText(),
      name: principal.toText().slice(0, 10) + '...',
      amount: Number(offer.amount) / 10 ** Number(props.task[0]?.task.token.decimals),
      tokenName: props.task[0]?.task.token.symbol,
    }
  })
})

Y en las referencias

<p class="text-lg font-bold text-emerald-600">
        {{ selectedBid.amount }} {{selectedBid.tokenName}}
</p>

y

<p class="text-sm text-gray-500 dark:text-gray-400">
    {{ bid.amount }} {{ bid.tokenName }}
</p>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions