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

Create token component #17965

Closed
J-Son89 opened this issue Nov 22, 2023 · 3 comments · Fixed by #18018
Closed

Create token component #17965

J-Son89 opened this issue Nov 22, 2023 · 3 comments · Fixed by #18018
Assignees
Labels
community feature feature requests

Comments

@J-Son89
Copy link
Contributor

J-Son89 commented Nov 22, 2023

For the wallet designs the token image assets are all stored locally. Rather than have a long hardcoded list of assets it would be better to create a component similar to icon component which handles the resolving of token images. These assets should be resolved by their symbol - eg "SNT"

In the case of no asset being available for a given token there is a fallback image - align with Desktop/design for this image.

Also there is a community token which are passed as a base64 string

Consider creating a new folder for the assets if there is unused/old assets in the old tokens folder.

Acceptance criteria:
Token component to resolve by symbol, base64 string or fallback image.
Add some test coverage if possible.
Verify image assets are correct

@ulisesmac
Copy link
Contributor

Hey @J-Son89, about:

Also there is a community token which are passed as a base64 string

Do you know where is it (namespace or file)?

@J-Son89
Copy link
Contributor Author

J-Son89 commented Nov 23, 2023

You can check with @mohsen-ghafouri . You need to get invite to a token gated community link with custom asset to see how this data structure looks. @FFFra or @ajayesivan might know about this too

@mohsen-ghafouri
Copy link
Contributor

@J-Son89 @ulisesmac there is an issue with latest changes that we can't see token gated community with custom assets, but here is relevant codes

https://github.com/status-im/status-mobile/blob/develop/src/status_im2/contexts/communities/overview/view.cljs#L137
https://github.com/status-im/status-mobile/blob/develop/src/status_im/communities/core.cljs#L85

ulisesmac added a commit that referenced this issue Dec 8, 2023
* Create token component

* Replace token images by new token component

The new component is being used in the following components:
 - token-input
 - network-amount
 - token-tag
 - summary-tag
 - context-tag
 - token-value
 - token-network
 - preview-list

* Rename token image file: eth-token -> eth

* Remove resources/get-token function
yevh-berdnyk pushed a commit that referenced this issue Dec 8, 2023
* Create token component

* Replace token images by new token component

The new component is being used in the following components:
 - token-input
 - network-amount
 - token-tag
 - summary-tag
 - context-tag
 - token-value
 - token-network
 - preview-list

* Rename token image file: eth-token -> eth

* Remove resources/get-token function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community feature feature requests
Development

Successfully merging a pull request may close this issue.

3 participants