flow-core-contracts
flow-core-contracts copied to clipboard
Balance Capability target check
Issue To Be Solved
The target of the balance capability in Flow core contracts here:
- https://github.com/onflow/flow-core-contracts/blob/ed4310c774493f584d4eaea665c3b5e87617179d/contracts/FlowStorageFees.cdc#L69
- https://github.com/onflow/flow-core-contracts/blob/ed4310c774493f584d4eaea665c3b5e87617179d/contracts/FlowStorageFees.cdc#L119
- https://github.com/onflow/flow-core-contracts/blob/ed4310c774493f584d4eaea665c3b5e87617179d/contracts/FlowServiceAccount.cdc#L53
Is not verified that it is in fact targeting the default FLOW vault.
Suggest A Solution
This can be verified, using the getLinkTarget method.
But you are currently not able to due paths not being comparable https://github.com/onflow/cadence/issues/1815. A workaround would be to compare the "path.toString()" values, but this seems dirty.