Skip to content

Commit

Permalink
Remove hard-coded expiration block value. Replace with +1 MIL
Browse files Browse the repository at this point in the history
  • Loading branch information
atodorov committed Oct 2, 2023
1 parent 490156a commit 57d7173
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion creditcoin-js/src/examples/loan-cycle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ export const fullLoanCycleExample = async (
};
};

const expBlock = 100_000_000;
// AskOrder/BidOrder/Offer will expire 1M blocks from the current one
const lastHeader = await api.rpc.chain.getHeader();
const expBlock = lastHeader.number.toNumber() + 1_000_000;
const loanTerms: LoanTerms = {
amount: new BN(100),
interestRate: {
Expand Down

0 comments on commit 57d7173

Please sign in to comment.