Skip to content

Commit

Permalink
Merge pull request #533 from tonkeeper/save-pubkeys
Browse files Browse the repository at this point in the history
add ctx
  • Loading branch information
mr-tron authored Nov 13, 2024
2 parents 29ca2e1 + 5af00e7 commit af84b4f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/api/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ type storage interface {
GetAccountState(ctx context.Context, a tongo.AccountID) (tlb.ShardAccount, error)
GetLibraries(ctx context.Context, libraries []tongo.Bits256) (map[tongo.Bits256]*boc.Cell, error)

SearchAccountsByPubKey(pubKey ed25519.PublicKey) ([]tongo.AccountID, error)
SearchAccountsByPubKey(ctx context.Context, pubKey ed25519.PublicKey) ([]tongo.AccountID, error)

// TrimmedConfigBase64 returns the current trimmed blockchain config in a base64 format.
TrimmedConfigBase64() (string, error)
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/wallet_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (h *Handler) GetWalletsByPublicKey(ctx context.Context, params oas.GetWalle
if err != nil {
return nil, toError(http.StatusBadRequest, err)
}
walletAddresses, err := h.storage.SearchAccountsByPubKey(publicKey)
walletAddresses, err := h.storage.SearchAccountsByPubKey(ctx, publicKey)
if err != nil {
return nil, toError(http.StatusBadRequest, err)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/litestorage/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (s *LiteStorage) AccountStatusAndInterfaces(addr tongo.AccountID) (tlb.Acco
return account.Status, account.Interfaces, err
}

func (s *LiteStorage) SearchAccountsByPubKey(pubKey ed25519.PublicKey) ([]tongo.AccountID, error) {
func (s *LiteStorage) SearchAccountsByPubKey(ctx context.Context, pubKey ed25519.PublicKey) ([]tongo.AccountID, error) {
versions := []tongoWallet.Version{
tongoWallet.V1R1, tongoWallet.V1R2, tongoWallet.V1R3,
tongoWallet.V2R1, tongoWallet.V2R2,
Expand Down

0 comments on commit af84b4f

Please sign in to comment.