-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add submission result type flag
- Loading branch information
1 parent
e9763ff
commit 0ea6109
Showing
11 changed files
with
606 additions
and
207 deletions.
There are no files selected for viewing
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,33 @@ | ||
pub mod market; | ||
pub mod storage_provider; | ||
pub mod system; | ||
|
||
use storagext::runtime::{HashOfPsc, SubmissionResult}; | ||
|
||
use crate::OutputFormat; | ||
|
||
pub(crate) fn display_submission_result<Event>( | ||
opt_result: Option<SubmissionResult<HashOfPsc, Event>>, | ||
_output_format: OutputFormat, | ||
) -> Result<(), anyhow::Error> | ||
where | ||
Event: subxt::events::StaticEvent, | ||
{ | ||
if let Some(result) = opt_result { | ||
// TODO(@neutrinoks,24.10.24): Check if we can return as root event instead to enable this | ||
// display possibility again. | ||
// let output = output_format.format(&result.event)?; | ||
// match output_format { | ||
// OutputFormat::Plain => println!("[{}] {}", result.hash, output), | ||
// OutputFormat::Json => println!("{}", output), | ||
// } | ||
println!( | ||
"[{}] {}::{}", | ||
result.hash, | ||
<Event as subxt::events::StaticEvent>::PALLET, | ||
<Event as subxt::events::StaticEvent>::EVENT | ||
); | ||
} | ||
|
||
Ok(()) | ||
} |
Oops, something went wrong.