When displaying the loan details in the UI we want to show how much the user has to pay when repaying the loan.
At the moment we can only access the collateral amount but not the repayment amount.
I guess the function repayment_amount on CollateralContrtact just needs to be public for that.
|
fn repayment_amount<C>(&self, secp: &Secp256k1<C>) -> Result<Amount> |
|
where |
|
C: Verification, |
|
{ |
|
let TxOutSecrets { value, .. } = self |
|
.repayment_principal_output |
|
.unblind(secp, self.repayment_principal_output_blinder)?; |
|
|
|
Ok(Amount::from_sat(value)) |
|
} |
This functionality is needed in :
comit-network/waves#242
When displaying the loan details in the UI we want to show how much the user has to pay when repaying the loan.
At the moment we can only access the collateral amount but not the repayment amount.
I guess the function
repayment_amountonCollateralContrtactjust needs to be public for that.baru/src/loan.rs
Lines 418 to 427 in 87b7677
This functionality is needed in :
comit-network/waves#242