Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NB.
[P1-L-04]
1.1 OK
1.2 The suggestions are incorrect. While it's possible to check if an ATA exists, to be able to both close it and verify its existence, you would need to pass them in
remaining_accounts
anyway. Also, it's impossible to verify if the user had created any vault without passing that vault inremaining_accounts
. Hence, a reliable method of handling different ATA closings in such opaque circumstances I consider extremely hard to implement since we will rely on information provided byremaining_accounts
in any case. (sic! originalVSR
closes only accounts [except for avoter
] that have been passed in remaining_accounts, so the situation when thevoter
is closed andATA
s are not is possible)5.1 Do we really want PDA double-checking? It's an expensive operation.
5.2 OK
6 It is possible to implement, and it will increase reliability, albeit will make testing utterly inconvenient (E.g. hardcoding will prevent us from having multiple DAO for testing at once)