From 69aa6477a6e28763e0c0c860f13c0ec20323f99c Mon Sep 17 00:00:00 2001 From: Peter Siemens Date: Mon, 20 Apr 2020 15:31:09 -0700 Subject: [PATCH] Examples: reactor hash algorithms --- examples/deploy_contract/main.go | 2 +- examples/examples.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 }