|
@@ -2,8 +2,8 @@ package chain
|
|
|
|
|
|
import (
|
|
import (
|
|
v1 "birdcall/api/chain/v1"
|
|
v1 "birdcall/api/chain/v1"
|
|
- "birdcall/internal/consts"
|
|
|
|
"birdcall/internal/library/birdeye/defi"
|
|
"birdcall/internal/library/birdeye/defi"
|
|
|
|
+ "birdcall/internal/library/birdeye/token"
|
|
"birdcall/internal/service"
|
|
"birdcall/internal/service"
|
|
"context"
|
|
"context"
|
|
|
|
|
|
@@ -17,6 +17,7 @@ func init() {
|
|
}
|
|
}
|
|
|
|
|
|
var dm defi.Defi
|
|
var dm defi.Defi
|
|
|
|
+var tk token.Token
|
|
|
|
|
|
func (s *sChain) NetWork(ctx context.Context, req *v1.NetWorkReq) (*v1.CommonRes, error) {
|
|
func (s *sChain) NetWork(ctx context.Context, req *v1.NetWorkReq) (*v1.CommonRes, error) {
|
|
|
|
|
|
@@ -34,7 +35,7 @@ func (s *sChain) NetWork(ctx context.Context, req *v1.NetWorkReq) (*v1.CommonRes
|
|
}
|
|
}
|
|
|
|
|
|
func (s *sChain) TokenPrice(ctx context.Context, req *v1.TokenPriceReq) (*v1.CommonRes, error) {
|
|
func (s *sChain) TokenPrice(ctx context.Context, req *v1.TokenPriceReq) (*v1.CommonRes, error) {
|
|
- birdRes, err := dm.MultiplePrice(req.ChainName, 100, true, req.Address, consts.GET)
|
|
|
|
|
|
+ birdRes, err := tk.GetListV1(req.ChainName, "v24hUSD", "desc", 0, 50, 100)
|
|
if err != nil {
|
|
if err != nil {
|
|
return nil, err
|
|
return nil, err
|
|
}
|
|
}
|