Skip to content

Commit

Permalink
fix!: update FundInfo fields, and update polkadot deps
Browse files Browse the repository at this point in the history
  • Loading branch information
TarikGul committed May 31, 2021
1 parent fa83ad9 commit 3312b73
Show file tree
Hide file tree
Showing 7 changed files with 138 additions and 138 deletions.
2 changes: 1 addition & 1 deletion docs/dist/app.bundle.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/src/openapi-v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2386,10 +2386,10 @@ components:
enum:
- preEnding
- ending
firstSlot:
firstPeriod:
type: string
format: unsignedInteger
lastSlot:
lastPeriod:
type: string
format: unsignedInteger
trieIndex:
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
"test:init-runtime-tests": "python3 ./scripts/run_chain_tests.py"
},
"dependencies": {
"@polkadot/api": "^4.11.2",
"@polkadot/api": "^4.12.1",
"@polkadot/apps-config": "^0.91.2",
"@polkadot/util-crypto": "^6.5.1",
"@polkadot/util-crypto": "^6.6.1",
"@substrate/calc": "^0.2.0",
"confmgr": "^1.0.6",
"express": "^4.17.1",
Expand Down
4 changes: 2 additions & 2 deletions src/services/paras/ParasService.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ describe('ParasService', () => {
end: '200000',
cap: '100000000000000000',
lastContribution: { preEnding: '6' },
firstSlot: '13',
lastSlot: '16',
firstPeriod: '13',
lastPeriod: '16',
trieIndex: '60',
};

Expand Down
4 changes: 2 additions & 2 deletions src/services/paras/ParasService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ export class ParasService extends AbstractService {
let fundInfo, leasePeriods;
if (fund.isSome) {
fundInfo = fund.unwrap();
const firstSlot = fundInfo.firstSlot.toNumber();
const firstSlot = fundInfo.firstPeriod.toNumber();
// number of lease periods this crowdloan covers
const leasePeriodCount = fundInfo.lastSlot.toNumber() - firstSlot + 1;
const leasePeriodCount = fundInfo.lastPeriod.toNumber() - firstSlot + 1;
leasePeriods = Array(leasePeriodCount)
.fill(0)
.map((_, i) => i + firstSlot);
Expand Down
4 changes: 2 additions & 2 deletions src/services/test-helpers/mock/mockApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,8 @@ const funds = {
lastContribution: rococoRegistry.createType('LastContribution', {
preEnding: 6,
}),
firstSlot: rococoRegistry.createType('LeasePeriod', 13),
lastSlot: rococoRegistry.createType('LeasePeriod', 16),
firstPeriod: rococoRegistry.createType('LeasePeriod', 13),
lastPeriod: rococoRegistry.createType('LeasePeriod', 16),
trieIndex: rococoRegistry.createType('TrieIndex', 60),
};

Expand Down
Loading

0 comments on commit 3312b73

Please sign in to comment.