1
1
package addressbook
2
2
3
3
import (
4
- "context"
5
4
"encoding/json"
6
5
"fmt"
7
6
"github.com/tonkeeper/opentonapi/pkg/core"
@@ -19,7 +18,6 @@ import (
19
18
"time"
20
19
21
20
"github.com/shopspring/decimal"
22
- "github.com/shurcooL/graphql"
23
21
"github.com/tonkeeper/tongo"
24
22
"go.uber.org/zap"
25
23
"golang.org/x/exp/maps"
@@ -489,19 +487,13 @@ func (b *Book) getGGWhitelist() error {
489
487
}
490
488
491
489
func fetchGetGemsVerifiedCollections () ([]tongo.AccountID , error ) {
492
- client := graphql .NewClient ("https://api.getgems.io/graphql" , nil )
493
- ctx , cancel := context .WithTimeout (context .Background (), time .Minute )
494
- defer cancel ()
495
- var q struct {
496
- GetAddressesOfVerifiedCollections []graphql.String `graphql:"getAddressesOfVerifiedCollections"`
497
- }
498
- err := client .Query (ctx , & q , nil )
490
+ res , err := downloadJson [string ]("https://api.getgems.io/public/api/verified-collections" )
499
491
if err != nil {
500
492
return nil , err
501
493
}
502
- accountIDs := make ([]tongo.AccountID , 0 , len (q . GetAddressesOfVerifiedCollections ))
503
- for _ , collection := range q . GetAddressesOfVerifiedCollections {
504
- account , err := tongo .ParseAddress (string ( collection ) )
494
+ accountIDs := make ([]tongo.AccountID , 0 , len (res ))
495
+ for _ , collection := range res {
496
+ account , err := tongo .ParseAddress (collection )
505
497
if err != nil {
506
498
return nil , err
507
499
}
0 commit comments