Skip to content

Commit a0789d0

Browse files
committed
simplify src/transaction/bundlr.rs Data
1 parent eca121d commit a0789d0

File tree

5 files changed

+176
-118
lines changed

5 files changed

+176
-118
lines changed

Cargo.lock

Lines changed: 110 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ sha2 = "0.10.2"
4444
strum = { version = "0.24", features = ["derive"] }
4545
strum_macros = "0.24"
4646
thiserror = "1.0.30"
47-
tokio = { version = "1.14.0", features = [ "fs" ]}
48-
tokio-util = "0.6.9"
47+
tokio = { version = "1.37.0", features = [ "fs" ]}
48+
tokio-util = { version = "0.6.9", features = [ "io" ]}
4949
validator = { version = "0.16", features = ["derive"] }
5050
web3 = { version = "0.19.0", optional = true, default-features = false, features = ["http-rustls-tls", "signing"]}
5151

src/bundlr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ where
266266
/// ```
267267
pub fn create_transaction(
268268
&self,
269-
data: Vec<u8>,
269+
data: tokio::fs::File,
270270
additional_tags: Vec<Tag>,
271271
) -> Result<BundlrTx, BundlrError> {
272272
BundlrTx::new(vec![], data, additional_tags)
@@ -352,7 +352,7 @@ where
352352
/// # }
353353
/// ```
354354
pub async fn send_transaction(&self, tx: BundlrTx) -> Result<Value, BundlrError> {
355-
let tx = tx.as_bytes()?;
355+
let tx = tx.as_bytes().await?;
356356

357357
let response = self
358358
.client

0 commit comments

Comments
 (0)