Skip to content

Commit

Permalink
Merge branch 'pol' into dev
Browse files Browse the repository at this point in the history
# Conflicts:
#	go.mod
#	go.sum
  • Loading branch information
scorpiotzh committed Sep 14, 2024
2 parents cc29996 + 63b792e commit 2acb474
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
13 changes: 13 additions & 0 deletions dao/dao.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,19 @@ var tokenList = []TableTokenPriceInfo{
DisplayName: "CKB",
Icon: "ckbccc",
},
{
TokenId: "polygon_pol",
ChainType: 1,
CoinType: common.CoinTypeMatic,
GeckoId: "polygon_pol",
Name: "Polygon",
Symbol: "POL",
Decimals: 18,
Logo: "https://app.did.id/images/components/polygon.svg",
LastUpdatedAt: time.Now().Unix(),
DisplayName: "Polygon",
Icon: "polygon",
},
}

func (d *DbDao) Transaction(fn func(tx *gorm.DB) error) error {
Expand Down
3 changes: 2 additions & 1 deletion timer/timer_gecko.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type GeckoTokenInfo struct {
// https://binance-docs.github.io/apidocs/spot/cn/#8ff46b58de
func GetTokenPriceNew(ids []string) ([]GeckoTokenInfo, error) {
var symbols []string
symbols = append(symbols, "BTCUSDT", "CKBUSDT", "ETHUSDT", "TRXUSDT", "BNBUSDT", "MATICUSDT", "DOGEUSDT")
symbols = append(symbols, "BTCUSDT", "CKBUSDT", "ETHUSDT", "TRXUSDT", "BNBUSDT", "DOGEUSDT", "POLUSDT")

symbolStr := ""
for _, v := range symbols {
Expand Down Expand Up @@ -72,6 +72,7 @@ var TokenIdMap = map[string][]string{
"TRXUSDT": {"tron_trx"},
"MATICUSDT": {"polygon_matic"},
"DOGEUSDT": {"doge_doge"},
"POLUSDT": {"polygon_pol"},
}

func TokenPriceNewToList(res []TokenPriceNew) []GeckoTokenInfo {
Expand Down

0 comments on commit 2acb474

Please sign in to comment.