Change v13 constants from an Option a plain Vec (#9)

It was a mistakenly translated from v12 as an Option
This commit is contained in:
Andrew Jones
2021-04-28 09:52:07 +01:00
committed by GitHub
parent 86bf2b374c
commit 7922e2351d
+2 -4
View File
@@ -134,7 +134,7 @@ pub struct ModuleMetadata<T: Form = MetaForm> {
pub storage: Option<StorageMetadata<T>>,
pub calls: Option<Vec<FunctionMetadata<T>>>,
pub event: Option<Vec<EventMetadata<T>>>,
pub constants: Option<Vec<ModuleConstantMetadata<T>>>,
pub constants: Vec<ModuleConstantMetadata<T>>,
pub errors: Vec<ErrorMetadata<T>>,
/// Define the index of the module, this index will be used for the encoding of module event,
/// call and origin variants.
@@ -150,9 +150,7 @@ impl IntoPortable for ModuleMetadata {
storage: self.storage.map(|storage| storage.into_portable(registry)),
calls: self.calls.map(|calls| registry.map_into_portable(calls)),
event: self.event.map(|event| registry.map_into_portable(event)),
constants: self
.constants
.map(|constant| registry.map_into_portable(constant)),
constants: registry.map_into_portable(self.constants),
errors: registry.map_into_portable(self.errors),
index: self.index,
}