Commit dfbf224a authored by 贾浩@五瓣科技's avatar 贾浩@五瓣科技

update

parent 2fbee294
......@@ -46,7 +46,7 @@ func (d *Dao) GetClaimedAmount(address string) (amt *decimal.Decimal, err error)
Select("sum(claimed_amount) as claimed_amount").
Scan(amt).Error
if err != nil {
if strings.Contains(err.Error(), "record not found") {
if strings.Contains(err.Error(), "could not convert value '<nil>'") {
err = nil
}
return
......
......@@ -9,30 +9,33 @@ services:
ports:
- "13306:3306"
volumes:
- ./data:/var/lib/mysql
- ./mysql-conf.d:/etc/mysql/conf.d
- ./data/claim-monitor/db:/var/lib/mysql
- ./conf/claim-monitor/db/conf.d:/etc/mysql/conf.d
environment:
MYSQL_ROOT_PASSWORD: "XN2UARuys3zy4Oux"
MYSQL_DATABASE: "agi"
sync:
image: docker.aigic.ai/caduceus/claim-monitor:v0.0.1
image: caduceus/claim-monitor:v0.0.1
depends_on:
- db
volumes:
- ./conf/claim-monitor/config.toml:/config.toml
command:
- "/bin/sh"
- "-c"
- "/usr/bin/sync -c /config.toml"
restart:
unless-stopped
api:
image: docker.aigic.ai/caduceus/claim-monitor:v0.0.1
image: caduceus/claim-monitor:v0.0.1
ports:
- "28080:8080"
depends_on:
- db
- sync
volumes:
- ./conf/claim-monitor/config.toml:/config.toml
command:
- "/bin/sh"
- "-c"
......
......@@ -16,6 +16,7 @@ func (srv *Service) GetRecord(address string, page, pageSize int) (resp *http.Ge
log.WithField("address", address).WithError(err).Error("failed to get contract")
return
}
resp.Records = make([]http.Record, 0)
ether := big.NewInt(1000000000000000000)
for _, record := range records {
amt, _ := big.NewFloat(0).Quo(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment