From 10def3c2c4e9a5a55fcb241f3dcec160b136b496 Mon Sep 17 00:00:00 2001 From: MOZGIII Date: Mon, 10 Oct 2022 13:28:23 +0400 Subject: [PATCH] Allow taking out raw bytes from a SubmittableExtrinsic (#683) --- subxt/src/tx/tx_client.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/subxt/src/tx/tx_client.rs b/subxt/src/tx/tx_client.rs index 7e686ebdc5..494ec0f91a 100644 --- a/subxt/src/tx/tx_client.rs +++ b/subxt/src/tx/tx_client.rs @@ -350,6 +350,12 @@ where pub fn encoded(&self) -> &[u8] { &self.encoded.0 } + + /// Consumes [`SubmittableExtrinsic`] and returns the SCALE encoded + /// extrinsic bytes. + pub fn into_encoded(self) -> Vec { + self.encoded.0 + } } impl SubmittableExtrinsic