Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bee344 committed Dec 21, 2023
1 parent fe49e9f commit cd3b554
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/dist/app.bundle.js

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions docs/src/openapi-v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,13 @@ paths:
schema:
type: boolean
default: false
- name: noFees
in: query
description: When set to `true`, the fee won't be calculated for the extrinsics.
required: false
schema:
type: boolean
default: false
responses:
"200":
description: successful operation
Expand Down Expand Up @@ -621,6 +628,13 @@ paths:
schema:
type: boolean
default: false
- name: noFees
in: query
description: When set to `true`, the fee won't be calculated for the extrinsics.
required: false
schema:
type: boolean
default: false
responses:
"200":
description: successful operation
Expand Down Expand Up @@ -748,6 +762,13 @@ paths:
schema:
type: boolean
default: false
- name: noFees
in: query
description: When set to `true`, the fee won't be calculated for the extrinsics.
required: false
schema:
type: boolean
default: false
responses:
"200":
description: successful operation
Expand Down
4 changes: 2 additions & 2 deletions src/controllers/blocks/BlocksController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export default class BlocksController extends AbstractController<BlocksService>
const queryFinalizedHead = !this.options.finalizes ? false : true;
const omitFinalizedTag = !this.options.finalizes ? true : false;
const noFeesArg = noFees === 'true';

const options = {
eventDocs: eventDocsArg,
extrinsicDocs: extrinsicDocsArg,
Expand Down Expand Up @@ -243,7 +243,7 @@ export default class BlocksController extends AbstractController<BlocksService>
checkFinalized: false,
queryFinalizedHead,
omitFinalizedTag,
noFees: noFeesArg
noFees: noFeesArg,
};

const pQueue = new PromiseQueue(4);
Expand Down
1 change: 0 additions & 1 deletion src/services/blocks/BlocksService.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ describe('BlocksService', () => {
queryFinalizedHead: false,
omitFinalizedTag: false,
noFees: false,

};

expect(sanitizeNumbers(await blocksService.fetchBlock(blockHash789629, mockHistoricApi, options))).toMatchObject(
Expand Down
5 changes: 2 additions & 3 deletions src/services/blocks/BlocksService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ export class BlocksService extends AbstractService {

for (let idx = 0; idx < block.extrinsics.length; ++idx) {
if (noFees === true) {
extrinsics[idx].info = {}
continue
extrinsics[idx].info = {};
continue;
}

if (!extrinsics[idx].paysFee || !block.extrinsics[idx].isSigned) {
Expand Down Expand Up @@ -292,7 +292,6 @@ export class BlocksService extends AbstractService {
partialFee: api.registry.createType('Balance', finalPartialFee),
kind: dispatchFeeType,
};

}

const response = {
Expand Down

0 comments on commit cd3b554

Please sign in to comment.