mirror of
https://github.com/Instadapp/trustwallet-assets.git
synced 2024-07-29 22:37:31 +00:00
parent
d933dc394e
commit
a915edc893
6
go.mod
6
go.mod
|
@ -5,9 +5,9 @@ go 1.17
|
|||
require (
|
||||
github.com/sirupsen/logrus v1.8.1
|
||||
github.com/spf13/cobra v1.3.0
|
||||
github.com/trustwallet/assets-go-libs v0.0.26
|
||||
github.com/trustwallet/go-libs v0.2.23
|
||||
github.com/trustwallet/go-primitives v0.0.20
|
||||
github.com/trustwallet/assets-go-libs v0.0.30
|
||||
github.com/trustwallet/go-libs v0.2.24
|
||||
github.com/trustwallet/go-primitives v0.0.24
|
||||
)
|
||||
|
||||
require (
|
||||
|
|
12
go.sum
12
go.sum
|
@ -340,12 +340,12 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc
|
|||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
|
||||
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
|
||||
github.com/trustwallet/assets-go-libs v0.0.26 h1:CtqSfhu/sNV/q256977UF6niIabmEvzrJVUwD4GJlDg=
|
||||
github.com/trustwallet/assets-go-libs v0.0.26/go.mod h1:UKacopV6UfT2JKRO4mkNSOVij9ChOO/NOXLscd9VhLk=
|
||||
github.com/trustwallet/go-libs v0.2.23 h1:CUB2OubedAoUbgPcraIC7wqpJHKQ5o3NJdINzH418WQ=
|
||||
github.com/trustwallet/go-libs v0.2.23/go.mod h1:7QdAp1lcteKKI0DYqGoaO8KO4eTNYjGmg8vHy0YXkKc=
|
||||
github.com/trustwallet/go-primitives v0.0.20 h1:srXOScQzub2Usrj5mRq5d2/3+0Y3TBXh2wD6JXYH1No=
|
||||
github.com/trustwallet/go-primitives v0.0.20/go.mod h1:jLqd7rm+4EYG5JdpxhngM9HwbqfEXzKy/wK4vUB7STs=
|
||||
github.com/trustwallet/assets-go-libs v0.0.30 h1:KBxK9opl6PLg8fbnQ+NfOFO1ftdkytJGM3kUWPNOtOA=
|
||||
github.com/trustwallet/assets-go-libs v0.0.30/go.mod h1:UzDwJQPNQ9MXfBJAYarlTKIh+KuGHfx94d9iT4Sk8Nc=
|
||||
github.com/trustwallet/go-libs v0.2.24 h1:wte7oifZMkcuHO4Mbv7fJsKcGPpczXCRrnNvnpiuHSs=
|
||||
github.com/trustwallet/go-libs v0.2.24/go.mod h1:7QdAp1lcteKKI0DYqGoaO8KO4eTNYjGmg8vHy0YXkKc=
|
||||
github.com/trustwallet/go-primitives v0.0.24 h1:C1QGcX3dRL7gS2miJvSrRT732zRjob1Gd4D4dJvVwq8=
|
||||
github.com/trustwallet/go-primitives v0.0.24/go.mod h1:jLqd7rm+4EYG5JdpxhngM9HwbqfEXzKy/wK4vUB7STs=
|
||||
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
|
||||
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
|
|
|
@ -154,7 +154,7 @@ func (s *Service) FixAssetInfo(f *file.AssetFile) error {
|
|||
isModified = true
|
||||
}
|
||||
|
||||
expectedExplorerURL, err := coin.GetCoinExploreURL(f.Chain(), f.Asset())
|
||||
expectedExplorerURL, err := coin.GetCoinExploreURL(f.Chain(), f.Asset(), assetType)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ func fetchMissingAssets(chain coin.Coin, assets []explorer.Bep2Asset) error {
|
|||
}
|
||||
|
||||
assetLogoPath := path.GetAssetLogoPath(chain.Handle, a.Asset)
|
||||
if fileLib.FileExists(assetLogoPath) {
|
||||
if fileLib.Exists(assetLogoPath) {
|
||||
continue
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,7 @@ func createLogo(assetLogoPath string, a explorer.Bep2Asset) error {
|
|||
}
|
||||
|
||||
func createInfoJSON(chain coin.Coin, a explorer.Bep2Asset) error {
|
||||
explorerURL, err := coin.GetCoinExploreURL(chain, a.Asset)
|
||||
explorerURL, err := coin.GetCoinExploreURL(chain, a.Asset, "")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ func (s *Service) ValidateJSON(f *file.AssetFile) error {
|
|||
return err
|
||||
}
|
||||
|
||||
err = validation.ValidateJson(buf.Bytes())
|
||||
err = validation.ValidateJSON(buf.Bytes())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ func (s *Service) ValidateChainInfoFile(f *file.AssetFile) error {
|
|||
|
||||
_, err = file.Seek(0, io.SeekStart)
|
||||
if err != nil {
|
||||
return fmt.Errorf("%w: failed to seek reader", validation.ErrInvalidJson)
|
||||
return fmt.Errorf("%w: failed to seek reader", validation.ErrInvalidJSON)
|
||||
}
|
||||
|
||||
var payload info.CoinModel
|
||||
|
@ -239,7 +239,7 @@ func (s *Service) ValidateChainInfoFile(f *file.AssetFile) error {
|
|||
tags[i] = t.ID
|
||||
}
|
||||
|
||||
err = info.ValidateCoin(payload, f.Chain(), f.Asset(), tags)
|
||||
err = info.ValidateCoin(payload, tags)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -261,7 +261,7 @@ func (s *Service) ValidateAssetInfoFile(f *file.AssetFile) error {
|
|||
|
||||
_, err = file.Seek(0, io.SeekStart)
|
||||
if err != nil {
|
||||
return fmt.Errorf("%w: failed to seek reader", validation.ErrInvalidJson)
|
||||
return fmt.Errorf("%w: failed to seek reader", validation.ErrInvalidJSON)
|
||||
}
|
||||
|
||||
var payload info.AssetModel
|
||||
|
|
Loading…
Reference in New Issue
Block a user