diff --git a/pkg/api/interfaces.go b/pkg/api/interfaces.go index c6d861a5..b10bc038 100644 --- a/pkg/api/interfaces.go +++ b/pkg/api/interfaces.go @@ -187,7 +187,7 @@ type SpamFilter interface { CheckActions(actions []oas.Action, viewer *ton.AccountID, initiator ton.AccountID) bool JettonTrust(address tongo.AccountID, symbol, name, image string) core.TrustType AccountTrust(address tongo.AccountID) core.TrustType - NftTrust(address tongo.AccountID, collection *ton.AccountID, description, image string) core.TrustType + NftTrust(ctx context.Context, address tongo.AccountID, collection *ton.AccountID, description, image string) core.TrustType } type verifierSource interface { diff --git a/pkg/api/nft_converters.go b/pkg/api/nft_converters.go index 7861fd81..15ad659b 100644 --- a/pkg/api/nft_converters.go +++ b/pkg/api/nft_converters.go @@ -77,7 +77,7 @@ func (h *Handler) convertNFT(ctx context.Context, item core.NftItem, book addres if len(nftItem.ApprovedBy) > 0 && nftItem.Verified { nftItem.Trust = oas.TrustType(core.TrustWhitelist) } else { - nftItem.Trust = oas.TrustType(h.spamFilter.NftTrust(item.Address, item.CollectionAddress, description, image)) + nftItem.Trust = oas.TrustType(h.spamFilter.NftTrust(ctx, item.Address, item.CollectionAddress, description, image)) } if image == "" { image = references.Placeholder diff --git a/pkg/spam/spam.go b/pkg/spam/spam.go index 4d94e91c..f4851a0c 100644 --- a/pkg/spam/spam.go +++ b/pkg/spam/spam.go @@ -1,6 +1,7 @@ package spam import ( + "context" "github.com/tonkeeper/opentonapi/pkg/core" "github.com/tonkeeper/opentonapi/pkg/oas" rules "github.com/tonkeeper/scam_backoffice_rules" @@ -46,7 +47,7 @@ func (f Filter) JettonTrust(address tongo.AccountID, symbol, name, image string) return core.TrustNone } -func (f Filter) NftTrust(address tongo.AccountID, collection *ton.AccountID, description, image string) core.TrustType { +func (f Filter) NftTrust(ctx context.Context, address tongo.AccountID, collection *ton.AccountID, description, image string) core.TrustType { return core.TrustNone }