|
@@ -323,9 +323,9 @@ export class Api {
|
|
|
|
|
|
public estimateAcceptApplicationsFee(module: WorkingGroups): BN {
|
|
|
return this.estimateTxFee(
|
|
|
- (this.api.tx[module].acceptApplications(this.api.createType('OpeningId', 0)) as unknown) as SubmittableExtrinsic<
|
|
|
- 'promise'
|
|
|
- >
|
|
|
+ (this.api.tx[module].acceptApplications(
|
|
|
+ this.api.createType('OpeningId', 0)
|
|
|
+ ) as unknown) as SubmittableExtrinsic<'promise'>
|
|
|
)
|
|
|
}
|
|
|
|
|
@@ -362,17 +362,19 @@ export class Api {
|
|
|
|
|
|
public estimateIncreaseStakeFee(module: WorkingGroups): BN {
|
|
|
return this.estimateTxFee(
|
|
|
- (this.api.tx[module].increaseStake(this.api.createType('WorkerId', 0), 0) as unknown) as SubmittableExtrinsic<
|
|
|
- 'promise'
|
|
|
- >
|
|
|
+ (this.api.tx[module].increaseStake(
|
|
|
+ this.api.createType('WorkerId', 0),
|
|
|
+ 0
|
|
|
+ ) as unknown) as SubmittableExtrinsic<'promise'>
|
|
|
)
|
|
|
}
|
|
|
|
|
|
public estimateDecreaseStakeFee(module: WorkingGroups): BN {
|
|
|
return this.estimateTxFee(
|
|
|
- (this.api.tx[module].decreaseStake(this.api.createType('WorkerId', 0), 0) as unknown) as SubmittableExtrinsic<
|
|
|
- 'promise'
|
|
|
- >
|
|
|
+ (this.api.tx[module].decreaseStake(
|
|
|
+ this.api.createType('WorkerId', 0),
|
|
|
+ 0
|
|
|
+ ) as unknown) as SubmittableExtrinsic<'promise'>
|
|
|
)
|
|
|
}
|
|
|
|
|
@@ -421,9 +423,10 @@ export class Api {
|
|
|
|
|
|
public estimateSlashStakeFee(module: WorkingGroups): BN {
|
|
|
return this.estimateTxFee(
|
|
|
- (this.api.tx[module].slashStake(this.api.createType('WorkerId', 0), 0) as unknown) as SubmittableExtrinsic<
|
|
|
- 'promise'
|
|
|
- >
|
|
|
+ (this.api.tx[module].slashStake(
|
|
|
+ this.api.createType('WorkerId', 0),
|
|
|
+ 0
|
|
|
+ ) as unknown) as SubmittableExtrinsic<'promise'>
|
|
|
)
|
|
|
}
|
|
|
|
|
@@ -1478,9 +1481,12 @@ export class Api {
|
|
|
type: string,
|
|
|
module: WorkingGroups
|
|
|
): SubmittableExtrinsic<'promise'> {
|
|
|
- return (this.api.tx[module].addOpening(actiavteAt, commitment, text, type) as unknown) as SubmittableExtrinsic<
|
|
|
- 'promise'
|
|
|
- >
|
|
|
+ return (this.api.tx[module].addOpening(
|
|
|
+ actiavteAt,
|
|
|
+ commitment,
|
|
|
+ text,
|
|
|
+ type
|
|
|
+ ) as unknown) as SubmittableExtrinsic<'promise'>
|
|
|
}
|
|
|
|
|
|
public async acceptApplications(
|
|
@@ -1654,9 +1660,10 @@ export class Api {
|
|
|
module: WorkingGroups
|
|
|
): Promise<ISubmittableResult> {
|
|
|
return this.sender.signAndSend(
|
|
|
- (this.api.tx[module].updateRewardAccount(workerId, newRewardAccount) as unknown) as SubmittableExtrinsic<
|
|
|
- 'promise'
|
|
|
- >,
|
|
|
+ (this.api.tx[module].updateRewardAccount(
|
|
|
+ workerId,
|
|
|
+ newRewardAccount
|
|
|
+ ) as unknown) as SubmittableExtrinsic<'promise'>,
|
|
|
worker,
|
|
|
false
|
|
|
)
|
|
@@ -1832,9 +1839,9 @@ export class Api {
|
|
|
}
|
|
|
|
|
|
public async getApplicationsIdsByRoleAccount(address: string, module: WorkingGroups): Promise<ApplicationId[]> {
|
|
|
- const applicationsAndIds: [StorageKey, Application][] = await this.api.query[module].applicationById.entries<
|
|
|
- Application
|
|
|
- >()
|
|
|
+ const applicationsAndIds: [StorageKey, Application][] = await this.api.query[
|
|
|
+ module
|
|
|
+ ].applicationById.entries<Application>()
|
|
|
return applicationsAndIds
|
|
|
.map((applicationWithId) => {
|
|
|
const application: Application = applicationWithId[1]
|