Skip to content

Commit

Permalink
Remove incorrect unused type (#207)
Browse files Browse the repository at this point in the history
`complete_transactions` does not return an `EntryHashB64`.

It's possible we need to provide a type here (for `zome_call_typed` to
work), but given that we don't consume it, I'm hoping not.

If we do need to provide a type, the exact type is about to change
  • Loading branch information
robbiecarlton authored Aug 30, 2024
1 parent 6a58c8d commit 0f4a66d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crates/core_app_cli/src/actions/pay_invoices.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use holochain_types::prelude::{
};
use hpos_hc_connect::app_connection::CoreAppRoleName;
use hpos_hc_connect::hha_agent::CoreAppAgent;
use hpos_hc_connect::holofuel_types::Pending;
use hpos_hc_connect::holofuel_types::{CounterSigningResponse, Pending};
use serde::{Deserialize, Serialize};

pub async fn get() -> Result<()> {
Expand Down Expand Up @@ -48,7 +48,7 @@ pub async fn get() -> Result<()> {
println!("Accepted tx: {:?}", hash);
println!("Trying to complete, if this fails it will be completed by your schedular");

let _: EntryHashB64 = agent
let countersigning_response: CounterSigningResponse = agent
.app
.zome_call_typed(
CoreAppRoleName::Holofuel.into(),
Expand All @@ -57,6 +57,8 @@ pub async fn get() -> Result<()> {
hash,
)
.await?;

println!("CounterSigningResponse {:?}", countersigning_response);
} else {
println!("===================");
println!("No pending invoices");
Expand Down
8 changes: 8 additions & 0 deletions crates/hpos_connect_hc/src/holofuel_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ pub struct Actionable {
pub promise_actionable: Vec<Transaction>,
}

#[derive(Serialize, Deserialize, SerializedBytes, Debug, Clone, PartialEq)]
pub enum CounterSigningResponse {
Successful(EntryHashB64),
UnableToReachCounterparty(String),
FeeDropOff(String),
TimeDelayWait(String),
}

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, SerializedBytes)]
#[serde(rename_all = "snake_case")]
pub enum POS {
Expand Down

0 comments on commit 0f4a66d

Please sign in to comment.