pub async fn new() -> Result<Self, Error> {
        println!("Instantiate TransactionHandler");
        let runtime = ClientBuilder::new()
            .set_url(String::from("ws://127.0.0.1:9944"))
            .build()
            .await?
            .to_runtime_api::<fennel::RuntimeApi<DefaultConfig, DefaultExtra<DefaultConfig>>>();
        //Maybe we shouldn't couple
        //database functionality here
        //let identity_db = get_identity_database_handle();
        //let messages_db = get_message_database_handle();

        Ok(Self {
            runtime,
            //identity_db,
            //messages_db,
        })
    }
/// Set up a new transaction handler with all needed resources.
Set up a new transaction handler with all needed resources.
Set up a new transaction handler with all needed resources .
pub async fn new() -> Result<Self, Error> {
        println!("Instantiate TransactionHandler");
        let runtime = ClientBuilder::new()
            .set_url(String::from("ws://127.0.0.1:9944"))
            .build()
            .await?
            .to_runtime_api::<fennel::RuntimeApi<DefaultConfig, DefaultExtra<DefaultConfig>>>();
        //Maybe we shouldn't couple
        //database functionality here
        //let identity_db = get_identity_database_handle();
        //let messages_db = get_message_database_handle();
        Ok(Self {
            runtime,
            //identity_db,
            //messages_db,
        })
    }
pub async fn new ( ) -> Result < Self , Error > { println ! ( " " ) ; let runtime = ClientBuilder :: new ( ) . set_url ( String :: from ( " " ) ) . build ( ) . await ? . to_runtime_api :: < fennel :: RuntimeApi < DefaultConfig , DefaultExtra < DefaultConfig > > > ( ) ; //Maybe we shouldn't couple //database functionality here //let identity_db = get_identity_database_handle(); //let messages_db = get_message_database_handle(); Ok ( Self { runtime , //identity_db, //messages_db, } ) }
Set up a new transaction handler with all needed resources.
Set up a new transaction handler with all needed resources .