Explicitly note that existing AccountIdConversion is truncating and add fallible try_into... (#10719)

* note truncating, add fallible try_into

* fmt

* migrate all to `truncating`

* typo

* uno mas

* Update primitives/runtime/src/traits.rs

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* check the bytes before and after are sensible

* fmt

* Update lib.rs

* Update primitives/runtime/src/traits.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2022-05-17 21:12:02 +00:00
1 parent 558daec697
commit 27f08fec3a
9 files changed
+87 -24

No files matched your search

@@ -72,7 +72,7 @@ impl PalletIdCmd {
"Cannot convert argument to palletid: argument should be 8-character string"
})?;
let account_id: R::AccountId = PalletId(id_fixed_array).into_account();
let account_id: R::AccountId = PalletId(id_fixed_array).into_account_truncating();
with_crypto_scheme!(
self.crypto_scheme.scheme,