Repository navigation
fix(vault): remove storage mutation from view getters - #1220
Conversation
|
@Mamavee001 is attempting to deploy a commit to the Collins' projects Team on Vercel. A member of the Team first needs to authorize it. |
collinsezedike
left a comment
There was a problem hiding this comment.
@Mamavee001 the change itself is right, but three things need fixing. Soroban Contract Tests fails on cargo fmt --check for the new test, so run cargo fmt. Commit Messages fails with a 79 character header. This also duplicates #1163 and #1166, which are the same fix for #1041, so consolidate into one PR and close the other two.
|
@Mamavee001 this stays as the single path for #1041, and #1163 and #1166 are being closed because they make the same fix. Four items remain before this can merge. Run |
24571ee to
a4186a5
Compare
collinsezedike
left a comment
There was a problem hiding this comment.
The view getters no longer write storage when the position is zero. The new unit test seeds legacy Entry and Principal records and verifies both reads return zero while leaving them untouched, and cargo test -p meridian-vault passes with 100 tests. The architecture docs now describe the read-only behavior.
|
@Mamavee001 Thank you for your contribution, and please star the repository if you found Meridian useful. |
Make
get_entry_timeandget_principaltrue read-only views by removing theclear_position_recordsstorage write when an address has zero position balance. Update the architecture docs.Closes #1041