Make keystore return None when a key doesn't exist (#8163)

* Make keystore return `None` when a key doesn't exist

* Fixes

* More fixes

* Update comment

* Update primitives/keystore/src/lib.rs

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

* Update client/keystore/src/local.rs

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

* Address comments

* Update client/keystore/src/local.rs

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
This commit is contained in:
Bastian KöcherandAndré Silva authored and GitHub committed 2021-02-22 14:24:09 +00:00
1 parent ecf4404903
commit 4f4a0c5b38
12 files changed
+174 -118

No files matched your search

@@ -400,7 +400,7 @@ where
AuthorityId::ID,
&public.to_public_crypto_pair(),
&encoded[..],
).ok()?.try_into().ok()?;
).ok().flatten()?.try_into().ok()?;
Some(grandpa::SignedMessage {
message,