Improve storage_alias and make UnlockAndUnreserveAllFunds independent of the pallet (#14773)

* Make `storage_alias` more generic over the `prefix`

* Make `UnlockAndUnreserveAllFunds` indepenend from the pallet

* FMT

* Fix error reporting

* Rename prefix type

* Add test

* Apply suggestions from code review

Co-authored-by: Sam Johnson <sam@durosoft.com>

* ".git/.scripts/commands/fmt/fmt.sh"

---------

Co-authored-by: Sam Johnson <sam@durosoft.com>
Co-authored-by: command-bot <>
This commit is contained in:
authored and GitHub committed 2023-08-16 08:15:32 +00:00
1 parent 67964d25a3
commit 04b1e4fbd8
8 files changed
+1103 -916

No files matched your search

@@ -547,8 +547,8 @@ pub fn __create_tt_macro(input: TokenStream) -> TokenStream {
}
#[proc_macro_attribute]
pub fn storage_alias(_: TokenStream, input: TokenStream) -> TokenStream {
storage_alias::storage_alias(input.into())
pub fn storage_alias(attributes: TokenStream, input: TokenStream) -> TokenStream {
storage_alias::storage_alias(attributes.into(), input.into())
.unwrap_or_else(|r| r.into_compile_error())
.into()
}