Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

It's always false... #13330

Merged
merged 1 commit into from
Jun 9, 2023
Merged

It's always false... #13330

merged 1 commit into from
Jun 9, 2023

Conversation

gilescope
Copy link
Contributor

I'm a bit suspicious of this code as it stands. It looks to me like either we can do this simplification, or maybe, the && should be ||? (but if that's the case we need to revisit the tests as they've encoded the current behaviour). Thoughts?

@github-actions github-actions bot added the A0-please_review Pull request needs code review. label Feb 7, 2023
@gilescope gilescope added B0-silent Changes should not be mentioned in any release notes D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit C1-low C1-low PR touches the given topic and has a low impact on builders. labels Feb 7, 2023
@gui1117
Copy link
Contributor

gui1117 commented Mar 1, 2023

seems correct, assets don't provide provider reference, only sufficient reference.

also the doc seems to mention provider where sufficient seems to be meant.

diff --git a/frame/assets/src/lib.rs b/frame/assets/src/lib.rs
index 894f8f3a4ab..868b23472a0 100644
--- a/frame/assets/src/lib.rs
+++ b/frame/assets/src/lib.rs
@@ -270,7 +270,7 @@ pub mod pallet {
                #[pallet::constant]
                type AssetDeposit: Get<DepositBalanceOf<Self, I>>;
 
-               /// The amount of funds that must be reserved for a non-provider asset account to be
+               /// The amount of funds that must be reserved for a non-sufficient asset account to be
                /// maintained.
                #[pallet::constant]
                type AssetAccountDeposit: Get<DepositBalanceOf<Self, I>>;
@@ -1477,7 +1477,7 @@ pub mod pallet {
                        Self::do_transfer_approved(id, &owner, &delegate, &destination, amount)
                }
 
-               /// Create an asset account for non-provider assets.
+               /// Create an asset account for non-sufficient assets.
                ///
                /// A deposit will be taken from the signer account.
                ///
diff --git a/frame/assets/src/types.rs b/frame/assets/src/types.rs
index d50461ba598..183b91c249f 100644
--- a/frame/assets/src/types.rs
+++ b/frame/assets/src/types.rs
@@ -58,8 +58,8 @@ pub struct AssetDetails<Balance, AccountId, DepositBalance> {
        pub(super) deposit: DepositBalance,
        /// The ED for virtual accounts.
        pub(super) min_balance: Balance,
-       /// If `true`, then any account with this asset is given a provider reference. Otherwise, it
-       /// requires a consumer reference.
+       /// If `true`, then account with this asset can be given a sufficient reference. Otherwise, it
+       /// requires a consumer reference or a deposit hold.
        pub(super) is_sufficient: bool,
        /// The total number of accounts.
        pub(super) accounts: u32,

@stale
Copy link

stale bot commented Mar 31, 2023

Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the A3-stale label Mar 31, 2023
@stale stale bot closed this Apr 14, 2023
@gilescope gilescope reopened this Apr 15, 2023
@stale stale bot removed the A3-stale label Apr 15, 2023
frame/assets/src/functions.rs Show resolved Hide resolved
@ggwpez ggwpez added D9-needsaudit 👮 PR contains changes to fund-managing logic that should be properly reviewed and externally audited and removed D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels May 6, 2023
@louismerlin louismerlin added D1-audited 👍 PR contains changes to fund-managing logic that has been properly reviewed and externally audited and removed D9-needsaudit 👮 PR contains changes to fund-managing logic that should be properly reviewed and externally audited labels Jun 1, 2023
@gilescope
Copy link
Contributor Author

bot merge

@paritytech-processbot paritytech-processbot bot merged commit 6f7ec53 into master Jun 9, 2023
@paritytech-processbot paritytech-processbot bot deleted the giles-simplify-assets branch June 9, 2023 12:11
agryaznov pushed a commit that referenced this pull request Jun 9, 2023
nathanwhit pushed a commit to nathanwhit/substrate that referenced this pull request Jul 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D1-audited 👍 PR contains changes to fund-managing logic that has been properly reviewed and externally audited
Projects
Development

Successfully merging this pull request may close these issues.

7 participants