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

Feature/multi assets #380

Merged
merged 21 commits into from
Feb 26, 2021
Merged

Feature/multi assets #380

merged 21 commits into from
Feb 26, 2021

Conversation

jplorek-atix
Copy link
Contributor

@jplorek-atix jplorek-atix commented Jan 20, 2021

This PR adds support for multiassets on the transaction and address pages

the assets are displayed on the following fields:

  • address balance tokens,
  • transaction minted tokens
  • transaction burned tokens
  • transaction outputs address
  • transaction input address

each field has:

  • asset fingerprint
  • -quantity

For this implementation the multi assets branch on the cardano graphql was used
https://github.com/input-output-hk/cardano-graphql/tree/feature/multi-asset

The @cardano-graphql/client-ts dependency version should be updated once the next cardano-graphql release containing multi-asset support is out

when a transaction output has one or more tokens, a list is displayed under the value on ada

Ref: EX-1124
this add a list of minted and burned tokens on the detail of a transaction. if it doesn't has any, the respective fields won't be displayed

Ref: EX-1124
this add the token fields to the gql query and modify the transaction details transformer. the component to display this has been modified on the 9f99e17 commit

Ref: EX-1124
this add a list of tokens with the balances of each one for an address details

Ref: EX-1123

feat: add filter for defined values on assetBalances array

Ref: EX-1123

feat: add multiassets stories for transaction info and address summary

Ref: EX-1123 EX-1124

feat: add policy id to address token balance

this adds the policy id to gql query and adds a tooltip component to display it as a description, this tooltip is being used on each asset

Ref: EX-1123

feat: add policy id for transaction assets

this adds the policy id on minted, burned, inputs and outputs tokens

Ref: EX-1124
feat: add message if address has not tokens

Ref: EX-1123
when the token list is greater than 5 the scrollbar is display

Ref: EX-1123 EX-1124
@lgobbi-atix lgobbi-atix force-pushed the feature/transaction-multi-asset branch from 21568f6 to f9e5b51 Compare January 20, 2021 16:32
@cleverca22
Copy link
Contributor

is packages-cache/bignumber.js-9.0.1.tgz supposed to be included in the git repo? i would expect it to be downloaded automatically

@lgobbi-atix
Copy link
Collaborator

is packages-cache/bignumber.js-9.0.1.tgz supposed to be included in the git repo? i would expect it to be downloaded automatically

I think so, maybe @rhyslbw can clarify?

@rhyslbw
Copy link
Collaborator

rhyslbw commented Feb 2, 2021

is packages-cache/bignumber.js-9.0.1.tgz supposed to be included in the git repo?

Yes, we use yarn offline package cache to facilitate reproducible builds.

@rhyslbw rhyslbw self-requested a review February 2, 2021 05:26
Copy link
Collaborator

@rhyslbw rhyslbw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work. We just need DE and JA translations for the following phrases:

  • Ada Balance
  • Tokens balance
  • Policy ID
  • This address has no tokens
  • Minted tokens
  • Burned tokens

I'll sort this out.

@eddyjlhaigh
Copy link

Here are the Japanese translations:

Ada Balance ADA残高
Tokens balance トークン残高
Policy ID ポリシーID
This address has no tokens このアドレスにはトークンがありません
Minted tokens 鋳造済みトークン
Burned tokens バーン済みトークン

@rhyslbw rhyslbw force-pushed the feature/transaction-multi-asset branch 2 times, most recently from 12db667 to a4151fe Compare February 3, 2021 13:10
@rhyslbw rhyslbw force-pushed the feature/transaction-multi-asset branch from a4151fe to c409b15 Compare February 3, 2021 13:30
Copy link

@eddyjlhaigh eddyjlhaigh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good accept for one minor issue. The "Tokens balance" is not horizontally aligned with an addresses tokens, as seen here https://explorer.mary-qa.dev.cardano.org/en/address.html?address=addr_test1qz3gkzmatgtvw7zdkttvchftja4fys79krn7rue6x7dc43t939ww4vt849h8wpjv38czxt4q97vc8438tte28amvwm3qm63e2w. I played with the element and found changing the margin-top from 5px to 0px on the TransactionTokenList_token fixed this.

@DominikGuzei
Copy link
Contributor

Hey @rhyslbw I have pushed the DE translations … not sure if it's relevant but I saw this error when running yarn dev:
grafik

@rhyslbw
Copy link
Collaborator

rhyslbw commented Feb 4, 2021

Thanks @DominikGuzei
Ah sorry I should have warned you about the dev backend needed to be rebuilt. The error is just reflecting it's not in sync yet

@rhyslbw rhyslbw force-pushed the feature/transaction-multi-asset branch from 30f1618 to 73c4fc0 Compare February 25, 2021 06:16
@rhyslbw rhyslbw merged commit 3c94cee into develop Feb 26, 2021
@rhyslbw rhyslbw deleted the feature/transaction-multi-asset branch February 26, 2021 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants