JSPM

  • Created
  • Published
  • Downloads 378
  • Score
    100M100P100Q92966F
  • License MIT

React component to display token images with fallbacks and unknown state.

Package Exports

  • @depay/react-token-image
  • @depay/react-token-image/dist/cjs/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@depay/react-token-image) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Quickstart

yarn add depay-react-token-image

or

npm install --save depay-react-token-image
import { TokenImage } from 'depay-react-token-image'

render() {
  return(
    <TokenImage
      blockchain={'ethereum'}
      address={'0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb'}
    />
  )
}

Functionalities

TokenImage

The TokenImage component tries to display a token image for a given blockchain and address by:

  1. Trying to fetch the image from https://github.com/trustwallet/assets

  2. Trying to fetch the image from DePay API

  3. Falling back to trying to fetch it from

Development

Get started

yarn install
yarn dev

Release

npm publish

Testing