Skip to content

Commit

Permalink
Fix doc: start_destroy doesn't need asset to be frozen (paritytech#5204)
Browse files Browse the repository at this point in the history
Fix paritytech#5184

`owner` can set himself as a `freezer` and freeze the asset so
requirement is not really needed. And requirement is not implemented.

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
  • Loading branch information
3 people authored Aug 16, 2024
1 parent 7426788 commit fd522b8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
13 changes: 13 additions & 0 deletions prdoc/pr_5204.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
title: "Pallet assets: fix doc: start_destroy never required asset to be frozen"

doc:
- audience: Runtime Dev
description: |
In pallet assets calling `start_destroy` doesn't require the asset to be frozen. Doc is fixed.


crates:
- name: pallet-assets
bump: patch
- name: frame-support
bump: patch
2 changes: 0 additions & 2 deletions substrate/frame/assets/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -801,8 +801,6 @@ pub mod pallet {
///
/// - `id`: The identifier of the asset to be destroyed. This must identify an existing
/// asset.
///
/// The asset class must be frozen before calling `start_destroy`.
#[pallet::call_index(2)]
pub fn start_destroy(origin: OriginFor<T>, id: T::AssetIdParameter) -> DispatchResult {
let maybe_check_owner = match T::ForceOrigin::try_origin(origin) {
Expand Down
2 changes: 1 addition & 1 deletion substrate/frame/support/src/traits/tokens/misc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pub enum WithdrawConsequence<Balance> {
/// There has been an overflow in the system. This is indicative of a corrupt state and
/// likely unrecoverable.
Overflow,
/// Not enough of the funds in the account are unavailable for withdrawal.
/// Not enough of the funds in the account are available for withdrawal.
Frozen,
/// Account balance would reduce to zero, potentially destroying it. The parameter is the
/// amount of balance which is destroyed.
Expand Down

0 comments on commit fd522b8

Please sign in to comment.