Skip to content

Commit

Permalink
Complete Payments documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nkostoulas committed Nov 21, 2019
1 parent 79d2863 commit 50d10d4
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/payments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,17 @@ fn calculate_bid_payment(fees_amount: &Amount, fee_percentage: u64, num_bids: u6
Ok(total_amount / num_bids) // amount per bid
}

/// TODO: add comments
/// Payment Struct holding data and logic required to pay bids at the end of the
/// service request
pub struct Payments {
storage: Arc<dyn Storage + Send + Sync>,
config: ClientChainConfig,
client: OceanClient,
addr_params: &'static AddressParams,
/// Thread safe storage instance
pub storage: Arc<dyn Storage + Send + Sync>,
/// Client config required for fee payments
pub config: ClientChainConfig,
/// Ocean rpc connectivity to client chain
pub client: OceanClient,
/// Clientchain address params required for fee payments
pub addr_params: &'static AddressParams,
}

impl Payments {
Expand Down

0 comments on commit 50d10d4

Please sign in to comment.