aeternity / aepp-sdk-go

Golang SDK to interact with the Æternity blockchain
ISC License
18 stars 10 forks source link

Design of the SDK permits one to screw up when using 2 accounts #63

Closed randomshinichi closed 4 years ago

randomshinichi commented 5 years ago

When one first generates a aeternity.Cli: aeClient := aeternity.NewCli(nodeURL, false).WithAccount(acc) aeClient's helper functions assume that any txs made will be signed by this account, but there is nothing stopping the user from signing with another account, thus producing a transaction that fails signature validation.

Keeping HTTP client to the node logically separate from the 'helper' that contains the state will solve the issue. One helper object = one account.