* 6.7.1

* packgeInfo

* voteLockingPeriod
This commit is contained in:
Jaco
2021-11-07 11:09:03 +02:00
committed by GitHub
parent 3facbf00eb
commit a5c69a42fc
22 changed files with 83 additions and 74 deletions
+10 -2
View File
@@ -25,7 +25,11 @@ function parseEnd (api: ApiInterfaceRx, vote: Vote, { approved, end }: Referendu
return [
end,
(approved.isTrue && vote.isAye) || (approved.isFalse && vote.isNay)
? end.add(api.consts.democracy.enactmentPeriod.muln(LOCKUPS[vote.conviction.index]))
? end.add(
(
api.consts.democracy.voteLockingPeriod ||
api.consts.democracy.enactmentPeriod
).muln(LOCKUPS[vote.conviction.index]))
: BN_ZERO
];
}
@@ -50,7 +54,11 @@ function delegateLocks (api: ApiInterfaceRx, { balance, conviction, target }: Vo
referendumId,
unlockAt: unlockAt.isZero()
? unlockAt
: referendumEnd.add(api.consts.democracy.enactmentPeriod.muln(LOCKUPS[conviction.index])),
: referendumEnd.add(
(
api.consts.democracy.voteLockingPeriod ||
api.consts.democracy.enactmentPeriod
).muln(LOCKUPS[conviction.index])),
vote: api.registry.createType('Vote', { aye: vote.isAye, conviction })
}))
)
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/api-derive', version: '6.6.2-27' };
export const packageInfo = { name: '@polkadot/api-derive', version: '6.7.0' };