-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Conversation
frame/assets/src/tests.rs
Outdated
//force asset status to change min_balance > balance | ||
assert_ok!(Assets::force_asset_status(Origin::root(), 0, 1, 1, 1, 1, 101, true, false)); | ||
assert_eq!(Assets::balance(0, 1), 100); | ||
//asset in practice becomes frozen until balance >= min_balance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allows for accounts to have less than min balance, not sure if that is problematic or not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens when you transfer 1 asset to this user. Will they accept the 1 asset or will it kill the account?
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
@ferrell-code please add one check about the behavior of an account with below min-balance after |
I dont think you quite tested what I was interested to see. A asset has min balance 30, and the user has 50 balance. Then we increase asset min balance to 100. Currently the user's account is alive with 50 balance. Then we give the user 1 balance so they have 51. Their new balance, still under the min balance, should trigger cleanup. |
But otherwise I am happy to merge. Very nice tests 👍 |
bot merge |
Trying merge. |
Merge failed: "At least 2 approving reviews are required by reviewers with write access." |
@ferrell-code do you have a Polkadot or Kusama address? Please post it here. |
Not with any thing in them 👀, use these 15zKd25HoSDPHCn1HjuuHTioXLT7PA2pZQ8gYjFsHW4r96qS |
* tests for assets * Update frame/assets/src/tests.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update frame/assets/src/tests.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * add force asset status check * remove TODO * actually remove TODO * add force asset status tests Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
A few tests for assets pallet relates to #8470 :).