File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ use futures_util::{Stream, StreamExt};
77
88use crate :: api:: blob:: BlobsAtHeight ;
99use crate :: client:: ClientInner ;
10+ use crate :: state:: AsyncGrpcCall ;
1011use crate :: tx:: { TxConfig , TxInfo } ;
1112use crate :: types:: nmt:: { Namespace , NamespaceProof } ;
1213use crate :: types:: { Blob , Commitment } ;
@@ -53,8 +54,17 @@ impl BlobApi {
5354 /// ```
5455 ///
5556 /// [`StateApi::submit_pay_for_blob`]: crate::api::StateApi::submit_pay_for_blob
56- pub async fn submit ( & self , blobs : & [ Blob ] , cfg : TxConfig ) -> Result < TxInfo > {
57- Ok ( self . inner . grpc ( ) ?. submit_blobs ( blobs, cfg) . await ?)
57+ pub fn submit ( & self , blobs : & [ Blob ] , cfg : TxConfig ) -> AsyncGrpcCall < TxInfo > {
58+ let inner = self . inner . clone ( ) ;
59+ let blobs = blobs. to_vec ( ) ;
60+
61+ AsyncGrpcCall :: new ( move |context| async move {
62+ Ok ( inner
63+ . grpc ( ) ?
64+ . submit_blobs ( & blobs, cfg)
65+ . context ( & context)
66+ . await ?)
67+ } )
5868 }
5969
6070 /// Retrieves the blob by commitment under the given namespace and height.
You can’t perform that action at this time.
0 commit comments