Giter Club home page Giter Club logo

Comments (2)

EnoRage avatar EnoRage commented on May 24, 2024

@hewigovens can you please describe more info about the problem and some suggestions to solve it, please?

from go-libs.

hewigovens avatar hewigovens commented on May 24, 2024

coins.go is generated from coins.yml, it has a Coins map which key is taken from symbol field

var Coins = map[uint]Coin{
	ETH: {
		ID:               60,
		Handle:           "ethereum",
		Symbol:           "ETH",
		Name:             "Ethereum",
		Decimals:         18,
		BlockTime:        10000,
		MinConfirmations: 0,
		SampleAddr:       "0xfc10cab6a50a1ab10c56983c80cc82afc6559cf1",
	},
}

In smart chain case, it shares same symbol with binance chain (should be same case for other layer 2 networks), so the key in map is not unique, to solve this, my first attempt was: trustwallet/blockatlas@cb717e1: generated the const and key from name not symbol, name is usually uniqu. The best option might be using id somehow instead

from go-libs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.