Skip to content

Commit 168ebba

Browse files
committed
fix lint error
1 parent 568c393 commit 168ebba

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

src/controllers/contracts/ContractsInkController.ts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,19 @@
1515
// along with this program. If not, see <http://www.gnu.org/licenses/>.
1616

1717
import { ContractPromise } from '@polkadot/api-contract';
18+
import { hexToU8a } from '@polkadot/util';
1819
import { RequestHandler } from 'express';
1920
import { BadRequest } from 'http-errors';
2021

2122
import { validateAddress } from '../../middleware';
2223
import { ContractsInkService } from '../../services';
23-
import { IBodyContractMetadata, IContractDryParams, IContractQueryParam, IPostRequestHandler } from '../../types/requests';
24+
import {
25+
IBodyContractMetadata,
26+
IContractDryParams,
27+
IContractQueryParam,
28+
IPostRequestHandler,
29+
} from '../../types/requests';
2430
import AbstractController from '../AbstractController';
25-
import { hexToU8a } from '@polkadot/util';
2631

2732
export default class ContractsInkController extends AbstractController<ContractsInkService> {
2833
static controllerName = 'ContractsInk';
@@ -72,20 +77,18 @@ export default class ContractsInkController extends AbstractController<Contracts
7277
* @param res
7378
*/
7479
private dryRun: IPostRequestHandler<IBodyContractMetadata, IContractDryParams> = async (
75-
{ params: { address }, query: { caller, payValue = "0", inputData } },
80+
{ params: { address }, query: { caller, payValue = '0', inputData } },
7681
res,
7782
): Promise<void> => {
78-
const dryRunResult: any = await this.api.call.reviveApi.call(
83+
const dryRunResult = await this.api.call.reviveApi.call(
7984
caller,
8085
address,
8186
this.api.registry.createType('Balance', BigInt(payValue)),
8287
null,
8388
null,
8489
hexToU8a(inputData) ?? '',
85-
)
86-
ContractsInkController.sanitizedSend(
87-
res,
88-
dryRunResult.toHuman(),
8990
);
91+
92+
ContractsInkController.sanitizedSend(res, dryRunResult.toHuman());
9093
};
9194
}

0 commit comments

Comments
 (0)