diff --git a/internal/app/api/v1/account.go b/internal/app/api/v1/account.go index 3b3ac61..f2a6a1c 100644 --- a/internal/app/api/v1/account.go +++ b/internal/app/api/v1/account.go @@ -56,18 +56,18 @@ func GetCollection(c *gin.Context) { func GetContract(c *gin.Context) { address := c.Param("address") account := c.GetString("address") - if utils.IsValidSolanaAddress(address) { - response.OkWithDetailed(nil, "Success", c) - return - if list, err := service.GetSolanaContract(address, account); err != nil { + if utils.IsValidAddress(address) { + address = strings.ToLower(address) + if list, err := service.GetContract(address, account); err != nil { global.LOG.Error("Error!", zap.Error(err)) response.FailWithMessage("Error", c) } else { response.OkWithDetailed(list, "Success", c) } - } else if utils.IsValidAddress(address) { - address = strings.ToLower(address) - if list, err := service.GetContract(address, account); err != nil { + } else if utils.IsValidSolanaAddress(address) { + response.OkWithDetailed(nil, "Success", c) + return + if list, err := service.GetSolanaContract(address, account); err != nil { global.LOG.Error("Error!", zap.Error(err)) response.FailWithMessage("Error", c) } else { diff --git a/internal/app/initialize/gorm.go b/internal/app/initialize/gorm.go index 1400caa..c618110 100644 --- a/internal/app/initialize/gorm.go +++ b/internal/app/initialize/gorm.go @@ -25,8 +25,8 @@ func RegisterTables(db *gorm.DB) { model.Account{}, model.ContractDefault{}, model.Ens{}, - model.CollectionSolana{}, - model.ContractSolana{}, + //model.CollectionSolana{}, + //model.ContractSolana{}, ) if err != nil { global.LOG.Error("register table failed", zap.Error(err))