feat: FileStorage#94
Conversation
There was a problem hiding this comment.
Bugbot free trial expires on July 29, 2025
Learn more in the Cursor dashboard.
| /// Get metadata about the file (owner, size, timestamps, etc.) | ||
| fn get_metadata(self: @ComponentState<TContractState>, file_id: felt252) -> FileMetadata { | ||
| self.get_metadata(file_id) | ||
| } |
There was a problem hiding this comment.
Bug: Infinite Recursion in Metadata Retrieval
The get_metadata function recursively calls itself (self.get_metadata(file_id)) instead of reading from the storage map. This leads to infinite recursion and a stack overflow. It should instead read from the metadata storage map using self.metadata.read(file_id).
| pub enum Event {} | ||
|
|
||
|
|
||
| #[embeddable_as(DepositImpl)] |
There was a problem hiding this comment.
Bug: Incorrect Embeddable Attribute for FileStorage
The #[embeddable_as] attribute for the FileStorage component is incorrectly set to DepositImpl instead of FileStorageImpl (or similar), likely due to a copy-paste error from another component.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #94 +/- ##
=======================================
Coverage ? 87.18%
=======================================
Files ? 43
Lines ? 1561
Branches ? 0
=======================================
Hits ? 1361
Misses ? 200
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This change is