chore_: move uniswap token downloading to makefile target (#5891)
* chore_: move uniswap token downloading to makefile target * fix_: uniswap url and output path * feat_: upgrade uniswap tokens
This commit is contained in:
parent
031b5342f1
commit
3e69092ae5
3
Makefile
3
Makefile
|
@ -320,6 +320,9 @@ generate: ##@other Regenerate assets and other auto-generated stuff
|
|||
generate-appdatabase:
|
||||
go generate ./appdatabase/...
|
||||
|
||||
download-uniswap-tokens:
|
||||
go run ./services/wallet/token/downloader/main.go
|
||||
|
||||
prepare-release: clean-release
|
||||
mkdir -p $(RELEASE_DIR)
|
||||
mv build/bin/statusgo.aar $(RELEASE_DIR)/status-go-android.aar
|
||||
|
|
|
@ -15,8 +15,11 @@ import (
|
|||
"github.com/xeipuuv/gojsonschema"
|
||||
)
|
||||
|
||||
const uniswapTokensURL = "https://gateway.ipfs.io/ipns/tokens.uniswap.org" // nolint:gosec
|
||||
const tokenListSchemaURL = "https://uniswap.org/tokenlist.schema.json" // nolint:gosec
|
||||
const (
|
||||
uniswapTokensURL = "https://ipfs.io/ipns/tokens.uniswap.org" // nolint:gosec
|
||||
tokenListSchemaURL = "https://uniswap.org/tokenlist.schema.json" // nolint:gosec
|
||||
outputFile = "services/wallet/token/uniswap.go"
|
||||
)
|
||||
|
||||
const templateText = `
|
||||
package token
|
||||
|
@ -100,7 +103,7 @@ func main() {
|
|||
tmpl := template.Must(template.New("tokens").Parse(templateText))
|
||||
|
||||
// Create the output Go file
|
||||
file, err := os.Create("uniswap.go")
|
||||
file, err := os.Create(outputFile)
|
||||
if err != nil {
|
||||
fmt.Printf("Failed to create go file: %v\n", err)
|
||||
return
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
package token
|
||||
|
||||
//go:generate go run ./downloader/main.go
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue