fix error processing (#97)

This commit is contained in:
Svyatoslav Nikolsky
2020-05-18 16:10:43 +03:00
committed by Bastian Köcher
parent 7ddff25912
commit f42905186d
@@ -235,13 +235,15 @@ pub async fn submit_signed_ethereum_headers(
to_value(Bytes(transaction.encode())).map_err(|e| Error::RequestSerialization(e)),
client
);
let (client, _) = call_rpc(
let (client, _) = bail_on_error!(
call_rpc(
client,
"author_submitExtrinsic",
Params::Array(vec![encoded_transaction]),
|_| Ok(()),
)
.await;
.await
);
(client, Ok(ids))
}