-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix * fix * fix * add theme setting * fix rust lint * fix test && publish sdk package * fix sdk test
- Loading branch information
Showing
46 changed files
with
979 additions
and
838 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 25 additions & 25 deletions
50
crates/rooch/src/commands/transaction/commands/get_tx_by_hash.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
// Copyright (c) RoochNetwork | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
use crate::cli_types::{CommandAction, WalletContextOptions}; | ||
use async_trait::async_trait; | ||
use rooch_rpc_api::jsonrpc_types::TransactionView; | ||
use rooch_types::{error::RoochResult, H256}; | ||
// use crate::cli_types::{CommandAction, WalletContextOptions}; | ||
// use async_trait::async_trait; | ||
// use rooch_rpc_api::jsonrpc_types::TransactionView; | ||
// use rooch_types::{error::RoochResult, H256}; | ||
|
||
/// Get transaction by hash | ||
#[derive(Debug, clap::Parser)] | ||
pub struct GetByHashCommand { | ||
/// Transaction's hash | ||
#[clap(long)] | ||
pub hash: H256, | ||
|
||
#[clap(flatten)] | ||
pub(crate) context_options: WalletContextOptions, | ||
} | ||
|
||
#[async_trait] | ||
impl CommandAction<Option<TransactionView>> for GetByHashCommand { | ||
async fn execute(self) -> RoochResult<Option<TransactionView>> { | ||
let client = self.context_options.build().await?.get_client().await?; | ||
|
||
let resp = client.get_transactions_by_hash(self.hash).await?; | ||
|
||
Ok(resp) | ||
} | ||
} | ||
// Get transaction by hash | ||
// #[derive(Debug, clap::Parser)] | ||
// pub struct GetByHashCommand { | ||
// /// Transaction's hash | ||
// #[clap(long)] | ||
// pub hash: H256, | ||
// | ||
// #[clap(flatten)] | ||
// pub(crate) context_options: WalletContextOptions, | ||
// } | ||
// | ||
// #[async_trait] | ||
// impl CommandAction<Option<TransactionView>> for GetByHashCommand { | ||
// async fn execute(self) -> RoochResult<Option<TransactionView>> { | ||
// let client = self.context_options.build().await?.get_client().await?; | ||
// | ||
// let resp = client.get_transactions_by_hash(self.hash).await?; | ||
// | ||
// Ok(resp) | ||
// } | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright (c) RoochNetwork | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
pub mod get_tx_by_hash; | ||
// pub mod get_tx_by_hash; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.