[aptos-framework] Remove balance checks in DFA#16313
Merged
runtian-zhou merged 1 commit intomainfrom Apr 17, 2025
Merged
Conversation
⏱️ 41m total CI duration on this PR
|
94a1f9a to
d67254f
Compare
Contributor
Author
|
Drafted AIP for discussion and justification for this change: aptos-foundation/AIPs#582 |
movekevin
reviewed
Apr 14, 2025
|
|
||
| #[test(creator = @0xcafe)] | ||
| #[expected_failure(abort_code=0x70002, location=aptos_framework::dispatchable_fungible_asset)] | ||
| fun test_nil_op_token( |
Contributor
There was a problem hiding this comment.
Can you update the test name to record the new expected behavior now?
movekevin
approved these changes
Apr 14, 2025
Contributor
|
Can you add a test where the override function clamps down the amount to max amount users can withdraw? |
Contributor
Author
|
Test added |
d67254f to
12b0f38
Compare
lightmark
approved these changes
Apr 16, 2025
| @@ -0,0 +1,89 @@ | |||
| #[test_only] | |||
Contributor
There was a problem hiding this comment.
what does clamped mean here?
add some comments?
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
0907b12 to
edf8d8c
Compare
edf8d8c to
cd8b091
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Contributor
✅ Forge suite
|
Contributor
✅ Forge suite
|
Contributor
✅ Forge suite
|
lwedge99
pushed a commit
to sentioxyz/aptos-core
that referenced
this pull request
May 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Description
This PR removes the balance check in the
dispatchable_fungible_assetmodule that was verifying the withdrawn amount matched the requested amount. The check was unnecessary and was causing tests to fail. Additionally, it enhances theten_x_tokentest module by implementing and registering proper withdraw and deposit dispatch functions.How Has This Been Tested?
The changes have been tested through the existing
nil_op_token_testswhich previously expected a failure but now passes correctly. The test verifies that withdrawal and deposit operations work properly without the balance check.Key Areas to Review
dispatchable_fungible_asset.movewhich was comparing start and end balancesten_x_token.movetest moduleType of Change
Which Components or Systems Does This Change Impact?
Checklist