Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: correct the /transaction/material docs for metadata #1377

Merged
merged 3 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/dist/app.bundle.js

Large diffs are not rendered by default.

12 changes: 5 additions & 7 deletions docs/src/openapi-v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1049,17 +1049,17 @@ paths:
format: unsignedInteger or $hex
- name: noMeta
in: query
description: DEPRECATED! This is no longer supported
schema:
type: boolean
description: DEPRECATED! This is no longer supported
default: false
- name: metadata
in: query
description: Specifies the format of the metadata to be returned. Accepted values are
'json', and 'scale'. 'json' being the decoded metadata, and 'scale' being the SCALE encoded metadata.
When `metadata` is not inputted, the `metadata` field will be absent.
schema:
type: string
description: Specifies the format of the metadata to be returned. Accepted values are
'json', and 'scale'. 'json' being the decoded metadata, and 'scale' being the SCALE encoded metadata.
When `metadata` is not inputted, the `metadata` field will be absent.
responses:
"200":
description: successful operation
Expand Down Expand Up @@ -4236,9 +4236,7 @@ components:
does not change `txVersion`.
metadata:
type: string
description: The chain's metadata. It's default return value is hex, but may be returned in
decoded json format.
format: hex
description: The chain's metadata. It will only be present when the metadata query param is used.
description: >-
Note: `chainName`, `specName`, and `specVersion` are used to define a type registry with a set
of signed extensions and types. For Polkadot and Kusama, `chainName` is not used in defining
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export type MetadataOpts = 'json' | 'scale';
* GET all the network information needed to construct a transaction offline.
*
* Query
* - (Optional) `noMeta`: If true, does not return metadata hex. This is useful when metadata is not
* needed and response time is a concern. Defaults to false.
* - (Optional) `metadata`: It accepts `json`, or `scale` values. If it is not present, the
TarikGul marked this conversation as resolved.
Show resolved Hide resolved
* the metadata field will not be included.
* - (Optional) `at`: Block hash or number at which to query. If not provided, queries
* finalized head.
*
Expand Down Expand Up @@ -79,14 +79,11 @@ export default class TransactionMaterialController extends AbstractController<Tr
/**
* The metadata args have two options. `json`, and `scale`.
*
* @param noMeta
* @param metadata
*/
private parseMetadataArgs(metadata: unknown): MetadataOpts | false {
/**
* Checks to see if the `metadata` query param is inputted, if it isnt,
* it will default to the old behavior. This is to be removed once after
* the `noMeta` query param is fully deprecated.
* Checks to see if the `metadata` query param is inputted.
*/
if (metadata) {
switch (metadata) {
Expand Down
Loading