Created
June 22, 2018 18:35
-
-
Save travisdmathis/8f1976480671c9d6b9ca0c4506fee6d3 to your computer and use it in GitHub Desktop.
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
let debtRequest = this.state.debtRequest; | |
let payload = { | |
amortizationUnit: debtRequest.amortizationUnit, | |
collateralAmount: new BigNumber(debtRequest.collateralAmount), | |
collateralTokenSymbol: debtRequest.collateralTokenSymbol, | |
description: '', | |
gracePeriodInDays: new BigNumber(debtRequest.gracePeriodInDays), | |
interestRate: new BigNumber(debtRequest.interestRate), | |
principalAmount: new BigNumber(debtRequest.principalAmount), | |
principalTokenSymbol: debtRequest.principalTokenSymbol, | |
termLength: new BigNumber(debtRequest.termLength), | |
}; | |
console.log( | |
'dharma', | |
dharma, | |
'debtRequest', | |
debtRequest, | |
'payLoad', | |
payload, | |
'account', | |
this.props.account, | |
); | |
let debtOrderInstance = await dharma.adapters.collateralizedSimpleInterestLoan.toDebtOrder( | |
payload, | |
); | |
debtOrderInstance.debtor = this.props.account.accountAddress; | |
let issuanceHash = await dharma.order.getIssuanceHash(debtOrderInstance); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment