Skip to content

Commit

Permalink
Examples: reactor hash algorithms
Browse files Browse the repository at this point in the history
  • Loading branch information
psiemens committed Apr 20, 2020
1 parent bc018c7 commit 69aa647
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/deploy_contract/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion examples/examples.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 69aa647

Please sign in to comment.