You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here I've renamed empty_pool to pool, and initialise it to the same variable.
The way we do init calls sequentially is a bit confusing and doesn't quite map to what Anchor is doing. There's more detail in my comments on #39 but basically we can't pass anything created in the function (in your case the pool variable) into an init call.
But you also can't use authority = empty_pool, because the Seahorse compiler won't let you use an empty account as an authority that might not have been initialised
So the workaround makes both Anchor and Seahorse happy: Anchor knows what pool is because it's an argument to the function, Seahorse can see that you're initialising it before using it as authority.
So I ran on this issue:

When I use new created account as authority in the same instruction, I get this error.
Here's the code:
The text was updated successfully, but these errors were encountered: