feat: allow for withdraw to a different player's inventory #3
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.
This pull request introduces a significant refactor and enhancement of the storage system's withdrawal logic, primarily by splitting the previous
withdrawfunction into two distinct operations:withdraw(now simplified) and a newtransferToPlayerfunction. The changes clarify the semantics of withdrawing items from storage buckets, improve authorization checks, and add more granular control over item transfers. Test coverage is updated and expanded to reflect and verify the new logic.Core Storage Logic Refactor:
transferToPlayerfunction inStorageSystem, enabling direct transfers from a bucket to a specified player’s ephemeral inventory, with improved authorization and clearer separation of responsibilities. The originalwithdrawfunction is now a wrapper that callstransferToPlayerfor the message initiator. [1] [2]StorageSystemLibto include new internal and root call wrappers fortransferToPlayer, and refactored thewithdrawwrappers to remove theuseOwnerInventoryparameter, aligning with the new function signatures. [1] [2] [3]Test Suite Updates and Additions:
withdrawfunction in tests to use either the newwithdrawortransferToPlayeras appropriate, including updating parameters and expected behaviors. [1] [2] [3] [4] [5] [6] [7] [8] [9]testWithdrawFullFromBucketToPlayerto verify the full withdrawal and transfer process, including authorization checks, balance updates, and cleanup of inventory records.Other Changes:
0.2.3to0.2.4to reflect the breaking and additive changes.StoreAuthDelegatedAccessTestfor future proxy transfer system tests.