mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-10-22 19:56:20 +00:00
Simplify runtime api error handling (#8114)
* Ahh * Work work work * Fix all the compilation errors * Fix test * More fixes...
This commit is contained in:
1 parent
b5e692104c
commit
33f9becf41
48 files changed
+270
-415
No files matched your search
@@ -132,10 +132,10 @@ impl<Client, Storage, Block> OffchainWorkers<
|
||||
) -> impl Future<Output = ()> {
|
||||
let runtime = self.client.runtime_api();
|
||||
let at = BlockId::hash(header.hash());
|
||||
let has_api_v1 = runtime.has_api_with::<dyn OffchainWorkerApi<Block, Error = ()>, _>(
|
||||
let has_api_v1 = runtime.has_api_with::<dyn OffchainWorkerApi<Block>, _>(
|
||||
&at, |v| v == 1
|
||||
);
|
||||
let has_api_v2 = runtime.has_api_with::<dyn OffchainWorkerApi<Block, Error = ()>, _>(
|
||||
let has_api_v2 = runtime.has_api_with::<dyn OffchainWorkerApi<Block>, _>(
|
||||
&at, |v| v == 2
|
||||
);
|
||||
let version = match (has_api_v1, has_api_v2) {
|
||||
|
||||
Reference in new issue
Block a user