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,