mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 14:41:11 +00:00
Insufficient asset quota and deposits (#10382)
* Allow asset accounts to exist by deposit * Place limit on consumers (and therefore freebie asset accounts) * Maximum number of assets * Fixes * Fixes * Formatting * Docs * Formatting * Destroyed assets are properly tidied * Update frame/assets/src/types.rs Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com> * Docs * Docs * Formatting * Docs * Docs * Fixes * Fixes Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
@@ -494,6 +494,8 @@ pub enum DispatchError {
|
||||
ConsumerRemaining,
|
||||
/// There are no providers so the account cannot be created.
|
||||
NoProviders,
|
||||
/// There are too many consumers so the account cannot be created.
|
||||
TooManyConsumers,
|
||||
/// An error to do with tokens.
|
||||
Token(TokenError),
|
||||
/// An arithmetic error.
|
||||
@@ -629,6 +631,7 @@ impl From<DispatchError> for &'static str {
|
||||
DispatchError::Module { message, .. } => message.unwrap_or("Unknown module error"),
|
||||
DispatchError::ConsumerRemaining => "Consumer remaining",
|
||||
DispatchError::NoProviders => "No providers",
|
||||
DispatchError::TooManyConsumers => "Too many consumers",
|
||||
DispatchError::Token(e) => e.into(),
|
||||
DispatchError::Arithmetic(e) => e.into(),
|
||||
}
|
||||
@@ -660,6 +663,7 @@ impl traits::Printable for DispatchError {
|
||||
},
|
||||
Self::ConsumerRemaining => "Consumer remaining".print(),
|
||||
Self::NoProviders => "No providers".print(),
|
||||
Self::TooManyConsumers => "Too many consumers".print(),
|
||||
Self::Token(e) => {
|
||||
"Token error: ".print();
|
||||
<&'static str>::from(*e).print();
|
||||
|
||||
Reference in New Issue
Block a user