deserializeAccount static method
Deserializes the provided value
into an AccountI instance.
Implementation
static AccountI deserializeAccount(Any value) {
_ensureInit();
AccountImpl? impl;
try {
impl = _accountImpls.singleWhere(
(element) => value.typeUrl.contains(element.typeUrl),
);
} catch (e) {
throw Exception(
'Account of type ${value.typeUrl} cannot be deserialized properly. '
'Please register this type using Codec.registerAccountImpl',
);
}
return impl.deserializer(value);
}