mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 01:41:03 +00:00
Relay balance metrics (#1291)
* relay balance metrics * convert balance to "main" tokens in balance metrics * add balances widgets to maintenance dashboard
This commit is contained in:
committed by
Bastian Köcher
parent
25008a5166
commit
fe34a526bb
@@ -541,6 +541,15 @@ impl<C: Chain> Client<C> {
|
||||
.await
|
||||
}
|
||||
|
||||
/// Return `tokenDecimals` property from the set of chain properties.
|
||||
pub async fn token_decimals(&self) -> Result<Option<u64>> {
|
||||
self.jsonrpsee_execute(move |client| async move {
|
||||
let system_properties = Substrate::<C>::system_properties(&*client).await?;
|
||||
Ok(system_properties.get("tokenDecimals").and_then(|v| v.as_u64()))
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
/// Return new justifications stream.
|
||||
pub async fn subscribe_justifications(&self) -> Result<Subscription<Bytes>> {
|
||||
let subscription = self
|
||||
|
||||
Reference in New Issue
Block a user