diff --git a/examples/deploy_contract/main.go b/examples/deploy_contract/main.go index 2968bb1e7..061ca4c08 100644 --- a/examples/deploy_contract/main.go +++ b/examples/deploy_contract/main.go @@ -34,7 +34,7 @@ func DeployContractDemo() { FromPrivateKey(myPrivateKey). SetHashAlgo(crypto.SHA3_256). SetWeight(flow.AccountKeyWeightThreshold) - mySigner := crypto.NewNaiveSigner(myPrivateKey, crypto.SHA3_256) + mySigner := crypto.NewNaiveSigner(myPrivateKey, myAcctKey.HashAlgo) // Generate an account creation script createAccountScript, err := templates.CreateAccount([]*flow.AccountKey{myAcctKey}, nil) diff --git a/examples/examples.go b/examples/examples.go index eceaba580..e4e92392d 100644 --- a/examples/examples.go +++ b/examples/examples.go @@ -77,7 +77,7 @@ func CreateAccount() (flow.Address, *flow.AccountKey, crypto.Signer) { nil, ) - signer := crypto.NewNaiveSigner(privateKey, crypto.SHA3_256) + signer := crypto.NewNaiveSigner(privateKey, accountKey.HashAlgo) return addr, accountKey, signer }