From 4652991f3971b4c4c70052c1cee7abcd019e8d77 Mon Sep 17 00:00:00 2001 From: scorpiotzh <835598264@qq.com> Date: Tue, 24 Sep 2024 14:30:42 +0800 Subject: [PATCH] feat: update pol --- dao/dao.go | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/dao/dao.go b/dao/dao.go index 442b8b5..9a0d81c 100644 --- a/dao/dao.go +++ b/dao/dao.go @@ -109,6 +109,11 @@ func Initialize(db *gorm.DB) (*DbDao, error) { } } + if err := db.Where("token_id='polygon_matic'"). + Delete(&TableTokenPriceInfo{}).Error; err != nil { + log.Error("del polygon_matic err: %s", err.Error()) + } + return &DbDao{db: db}, nil } @@ -178,19 +183,19 @@ var tokenList = []TableTokenPriceInfo{ DisplayName: "Binance", Icon: "binance-smart-chain", }, - { - TokenId: "polygon_matic", - ChainType: 1, - CoinType: common.CoinTypeMatic, - GeckoId: "matic-network", - Name: "Polygon", - Symbol: "MATIC", - Decimals: 18, - Logo: "https://app.did.id/images/components/polygon.svg", - LastUpdatedAt: time.Now().Unix(), - DisplayName: "Polygon", - Icon: "polygon", - }, + //{ + // TokenId: "polygon_matic", + // ChainType: 1, + // CoinType: common.CoinTypeMatic, + // GeckoId: "matic-network", + // Name: "Polygon", + // Symbol: "MATIC", + // Decimals: 18, + // Logo: "https://app.did.id/images/components/polygon.svg", + // LastUpdatedAt: time.Now().Unix(), + // DisplayName: "Polygon", + // Icon: "polygon", + //}, { TokenId: "doge_doge", ChainType: 7,