neo-one
neo-one copied to clipboard
Generated createClient does not wait for account setup
Description
generated createClient does not wait for accounts to be created.
Steps to Reproduce
- in a neo-one project, run
yarn neo-one build
-
const client = createClient()
const helloWorld = createHelloWorldSmartContract()
client.getUserAccounts()
await helloWorld.hello.confirmed('foo')
Expected behavior: [What you expect to happen]
client.getUserAccounts
result is list of pre-loaded accounts
helloWorld.hello.confirmed('foo')
performs invocation
Actual behavior: [What actually happens]
client.getUserAccounts
is an empty list
helloWorld.hello.confirmed('foo')
throws [NO_ACCOUNT] error
Reproduces how often: [What percentage of the time does it reproduce?] 100%, but the issue goes away if you just make the program wait a small amount of time before using the client.
Versions
@neo-one/suite 2.3.1