Skip to content

Commit

Permalink
subDigest -> subdigest
Browse files Browse the repository at this point in the history
  • Loading branch information
attente committed Sep 3, 2024
1 parent 874ea0d commit f4d9a6d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions core/v1/v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func (s *signature) Recover(ctx context.Context, digest core.Digest, wallet comm
return s.RecoverSubdigest(ctx, subdigest, provider, signerSignatures...)
}

func (s *signature) RecoverSubdigest(ctx context.Context, subDigest core.Subdigest, provider *ethrpc.Provider, signerSignatures ...core.SignerSignatures) (*WalletConfig, *big.Int, error) {
func (s *signature) RecoverSubdigest(ctx context.Context, subdigest core.Subdigest, provider *ethrpc.Provider, signerSignatures ...core.SignerSignatures) (*WalletConfig, *big.Int, error) {
if len(signerSignatures) == 0 {
signerSignatures = []core.SignerSignatures{nil}
}
Expand All @@ -165,7 +165,7 @@ func (s *signature) RecoverSubdigest(ctx context.Context, subDigest core.Subdige
var total big.Int

for i, leaf := range s.leaves {
signer, weight, err := leaf.recover(ctx, subDigest, provider, signerSignatures[0])
signer, weight, err := leaf.recover(ctx, subdigest, provider, signerSignatures[0])
if err != nil {
return nil, nil, fmt.Errorf("unable to recover signer for leaf %v: %w", i, err)
}
Expand Down
4 changes: 2 additions & 2 deletions core/v2/v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,12 @@ func (s *regularSignature) Recover(ctx context.Context, digest core.Digest, wall
return s.RecoverSubdigest(ctx, digest.Subdigest(wallet, chainID), provider, signerSignatures...)
}

func (s *regularSignature) RecoverSubdigest(ctx context.Context, subDigest core.Subdigest, provider *ethrpc.Provider, signerSignatures ...core.SignerSignatures) (*WalletConfig, *big.Int, error) {
func (s *regularSignature) RecoverSubdigest(ctx context.Context, subdigest core.Subdigest, provider *ethrpc.Provider, signerSignatures ...core.SignerSignatures) (*WalletConfig, *big.Int, error) {
if len(signerSignatures) == 0 {
signerSignatures = []core.SignerSignatures{nil}
}

tree, weight, err := s.tree.recover(ctx, subDigest, provider, signerSignatures[0])
tree, weight, err := s.tree.recover(ctx, subdigest, provider, signerSignatures[0])
if err != nil {
return nil, nil, fmt.Errorf("unable to recover wallet config: %w", err)
}
Expand Down

0 comments on commit f4d9a6d

Please sign in to comment.