Skip to content

Refactor GenericMethod params and WalletMethod components#112

Merged
annielinnik merged 5 commits into
wallet-apifrom
fix/wallet-api-params
Apr 7, 2026
Merged

Refactor GenericMethod params and WalletMethod components#112
annielinnik merged 5 commits into
wallet-apifrom
fix/wallet-api-params

Conversation

@annielinnik
Copy link
Copy Markdown
Collaborator

Unified PathParams and QueryParams into a shared Params component

  • Extracted common rendering logic from PathParams and QueryParams into a new Params.tsx component and a shared ParamsList.tsx
  • Renamed PathParams.module.css → Params.module.css, removed the now-redundant PathParamsList.tsx, QueryParamsList.tsx, PathParamsList.module.css, QueryParamsList.module.css
  • Simplified prop names: pathParams/pathParamsType → params/paramsType on both components
  • Removed the unused isRESTApi prop from PathParams and QueryParams

Removed redundant type aliases

  • Dropped PathParamProp and QueryParamProp from params/types.ts — they were identical to ReqResParam[] with no added value

Replaced dual url/url1 props with a single array

  • Changed GenericMethod url prop type from two separate string | undefined fields to string | string[]

Moved shared defaults into WalletMethod

  • WalletMethod now sets isRESTApi={true}, network="", and responseParamsDescription="" as defaults, so each individual wallet method component no longer needs to repeat them

Removed GenericMethodPropsReplacing pass-through from all wallet method components

  • All 19 WalletMethod_* components no longer accept props or spread {...props} — they are now fully self-contained with no external overrides

@annielinnik annielinnik merged commit f07461b into wallet-api Apr 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant