mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Replace substrate/client's use of Payload with usage of RuntimeCall
Gains explicit typing.
This commit is contained in:
@@ -2,10 +2,10 @@ use core::time::Duration;
|
||||
|
||||
use tokio::time::sleep;
|
||||
|
||||
use serai_client::{subxt::utils::Encoded, Serai};
|
||||
use serai_client::Serai;
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub async fn publish_tx(serai: &Serai, tx: &Encoded) -> [u8; 32] {
|
||||
pub async fn publish_tx(serai: &Serai, tx: &[u8]) -> [u8; 32] {
|
||||
let mut latest =
|
||||
serai.block(serai.latest_block_hash().await.unwrap()).await.unwrap().unwrap().number();
|
||||
|
||||
@@ -34,7 +34,7 @@ pub async fn publish_tx(serai: &Serai, tx: &Encoded) -> [u8; 32] {
|
||||
};
|
||||
|
||||
for transaction in block.transactions() {
|
||||
if transaction.0 == tx.0[2 ..] {
|
||||
if transaction.0 == tx[2 ..] {
|
||||
return block.hash();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user