mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 23:51:05 +00:00
Do not call externalities without Ext being set (#3436)
* Do not call externalities without `Ext` being set * Fix compare and set * Bump runtime version. * Bump hashmap_core
This commit is contained in:
committed by
Gavin Wood
parent
017752df41
commit
3b0af8bbf4
@@ -206,7 +206,7 @@ impl CryptoApi for () {
|
||||
ext::with(|ext| {
|
||||
ext.keystore()
|
||||
.expect("No `keystore` associated for the current context!")
|
||||
.write()
|
||||
.read()
|
||||
.ed25519_public_keys(id)
|
||||
}).expect("`ed25519_public_keys` cannot be called outside of an Externalities-provided environment.")
|
||||
}
|
||||
@@ -233,7 +233,7 @@ impl CryptoApi for () {
|
||||
.expect("No `keystore` associated for the current context!")
|
||||
.read()
|
||||
.ed25519_key_pair(id, &pub_key)
|
||||
.map(|k| k.sign(msg.as_ref()).into())
|
||||
.map(|k| k.sign(msg.as_ref()))
|
||||
}).expect("`ed25519_sign` cannot be called outside of an Externalities-provided environment.")
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ impl CryptoApi for () {
|
||||
ext::with(|ext| {
|
||||
ext.keystore()
|
||||
.expect("No `keystore` associated for the current context!")
|
||||
.write()
|
||||
.read()
|
||||
.sr25519_public_keys(id)
|
||||
}).expect("`sr25519_public_keys` cannot be called outside of an Externalities-provided environment.")
|
||||
}
|
||||
@@ -272,7 +272,7 @@ impl CryptoApi for () {
|
||||
.expect("No `keystore` associated for the current context!")
|
||||
.read()
|
||||
.sr25519_key_pair(id, &pub_key)
|
||||
.map(|k| k.sign(msg.as_ref()).into())
|
||||
.map(|k| k.sign(msg.as_ref()))
|
||||
}).expect("`sr25519_sign` cannot be called outside of an Externalities-provided environment.")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user