Skip to content

Commit

Permalink
fix: add leaseOffset to leasesCurrent end calc (#801)
Browse files Browse the repository at this point in the history
* fix: add leaseOffset to leasesCurrent end calc

* fix: eslint fix by using --fix flag
  • Loading branch information
sawvox committed Dec 24, 2021
1 parent 856b5ed commit 4d83dcb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/services/paras/ParasService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,10 @@ export class ParasService extends AbstractService {

const leasePeriod = historicApi.consts.slots.leasePeriod as BlockNumber;
const leasePeriodIndex = this.leasePeriodIndexAt(historicApi, blockNumber);
const leaseOffset =
(historicApi.consts.slots.leaseOffset as BlockNumber) || BN_ZERO;
const endOfLeasePeriod = leasePeriodIndex
? leasePeriodIndex.mul(leasePeriod).add(leasePeriod)
? leasePeriodIndex.mul(leasePeriod).add(leasePeriod).add(leaseOffset)
: null;

return {
Expand Down

0 comments on commit 4d83dcb

Please sign in to comment.