From 0b98df79bafafa1c814680155ee2bbe57a720c92 Mon Sep 17 00:00:00 2001 From: Anna Linnik Date: Tue, 7 Apr 2026 11:27:23 +0200 Subject: [PATCH 1/5] refactor PathParams and QueryParams --- components/GenericMethod/GenericMethod.tsx | 34 ++++--- ...athParams.module.css => Params.module.css} | 0 components/GenericMethod/params/Params.tsx | 56 ++++++++++++ ...sList.module.css => ParamsList.module.css} | 0 .../{QueryParamsList.tsx => ParamsList.tsx} | 23 ++--- .../GenericMethod/params/PathParams.tsx | 57 +----------- .../params/PathParamsList.module.css | 29 ------ .../GenericMethod/params/PathParamsList.tsx | 89 ------------------- .../params/QueryParams.module.css | 31 ------- .../GenericMethod/params/QueryParams.tsx | 57 +----------- .../params/QueryParamsList.module.css | 29 ------ .../GenericMethod/params/RequestParams.tsx | 8 +- .../params/RequestParamsList.tsx | 89 ------------------- 13 files changed, 96 insertions(+), 406 deletions(-) rename components/GenericMethod/params/{PathParams.module.css => Params.module.css} (100%) create mode 100644 components/GenericMethod/params/Params.tsx rename components/GenericMethod/params/{RequestParamsList.module.css => ParamsList.module.css} (100%) rename components/GenericMethod/params/{QueryParamsList.tsx => ParamsList.tsx} (84%) delete mode 100644 components/GenericMethod/params/PathParamsList.module.css delete mode 100644 components/GenericMethod/params/PathParamsList.tsx delete mode 100644 components/GenericMethod/params/QueryParams.module.css delete mode 100644 components/GenericMethod/params/QueryParamsList.module.css delete mode 100644 components/GenericMethod/params/RequestParamsList.tsx diff --git a/components/GenericMethod/GenericMethod.tsx b/components/GenericMethod/GenericMethod.tsx index 305ddb6..98279cc 100644 --- a/components/GenericMethod/GenericMethod.tsx +++ b/components/GenericMethod/GenericMethod.tsx @@ -86,7 +86,7 @@ export default function GenericMethod({ isRESTApi, }: GenericMethodProps) { const [snippet, setSnippet] = React.useState( - codeSnippets?.[0]?.language || null + codeSnippets?.[0]?.language || null, ); const snippetCode = React.useMemo(() => { @@ -101,7 +101,7 @@ export default function GenericMethod({ ) { return codeSnippetString.replaceAll( replaceCodeSnippetsURLFrom, - replaceCodeSnippetsURLTo + replaceCodeSnippetsURLTo, ); } return codeSnippetString; @@ -197,24 +197,22 @@ export default function GenericMethod({ {isRESTApi && ( - - - -)} + + + + )} {isRESTApi && ( - - - -)} + + + + )} + + + {title} + + + + +
+ +
+ + Parameters + + + {getParamsType(paramsType)} + +
+ + {params && params.length > 0 ? ( + + ) : null} +
+
+ + ); +} diff --git a/components/GenericMethod/params/RequestParamsList.module.css b/components/GenericMethod/params/ParamsList.module.css similarity index 100% rename from components/GenericMethod/params/RequestParamsList.module.css rename to components/GenericMethod/params/ParamsList.module.css diff --git a/components/GenericMethod/params/QueryParamsList.tsx b/components/GenericMethod/params/ParamsList.tsx similarity index 84% rename from components/GenericMethod/params/QueryParamsList.tsx rename to components/GenericMethod/params/ParamsList.tsx index a8cee10..cf02336 100644 --- a/components/GenericMethod/params/QueryParamsList.tsx +++ b/components/GenericMethod/params/ParamsList.tsx @@ -1,31 +1,32 @@ import { Group } from "@mantine/core"; import { Fira_Mono } from "next/font/google"; import { RequestParamProp } from "./types"; -import classes from "./QueryParamsList.module.css"; +import classes from "./ParamsList.module.css"; import { Text } from "../../Text"; import { TParamType } from "../types"; import { getParamsType } from "../getParamsType"; import cx from "clsx"; type Props = { - queryParams: RequestParamProp; - queryParamsType: TParamType; + params: RequestParamProp; + paramsType: TParamType; isChild?: boolean; }; const fira = Fira_Mono({ subsets: ["latin"], weight: ["400"] }); -export function QueryParamsList({ queryParams, queryParamsType }: Props) { +export function ParamsList({ params, paramsType }: Props) { + const paramsTypeText = getParamsType(paramsType); return (
-
+ {paramsTypeText &&
- {getParamsType(queryParamsType)} + {paramsTypeText} -
+
} {/* Iterate through and render each param */} - {queryParams?.map((param) => ( + {params?.map((param) => (
@@ -75,9 +76,9 @@ export function QueryParamsList({ queryParams, queryParamsType }: Props) { {/* If param has children params, render them */} {param.childrenParams ? (
-
diff --git a/components/GenericMethod/params/PathParams.tsx b/components/GenericMethod/params/PathParams.tsx index be72e77..ea7f859 100644 --- a/components/GenericMethod/params/PathParams.tsx +++ b/components/GenericMethod/params/PathParams.tsx @@ -1,56 +1,7 @@ -import { Grid } from "@mantine/core"; -import classes from "./PathParams.module.css"; -import { PathParamsList } from "./PathParamsList"; -import { TParamType } from "../types"; -import { getParamsType } from "../getParamsType"; -import { Text } from "../../Text"; -import { ReqResParam } from "./types"; +import { Params, type Props as ParamsProps } from "./Params"; -type Props = { - pathParamsType: TParamType; - pathParams: ReqResParam[] | null; - isRESTApi?: boolean; -}; +type Props = Omit; -export function PathParams({ - pathParams, - pathParamsType, - isRESTApi, -}: Props) { - return ( - - - - Path params - - - - -
- -
- - Parameters - - - {getParamsType(pathParamsType)} - -
- - {pathParams && pathParams.length > 0 ? ( - - ) : null} -
-
-
- ); +export function PathParams(props: Props) { + return ; } diff --git a/components/GenericMethod/params/PathParamsList.module.css b/components/GenericMethod/params/PathParamsList.module.css deleted file mode 100644 index e9edd28..0000000 --- a/components/GenericMethod/params/PathParamsList.module.css +++ /dev/null @@ -1,29 +0,0 @@ -RequestParamsList.module.css.root { - background-color: #0f0f0f; - border-radius: 12px; - border: 1px solid rgba(255, 255, 255, 0.1); - display: flex; - width: 100%; - margin: 0 12px 12px; - flex-wrap: wrap; -} -.line { - padding: 12px; - border-bottom: 1px solid rgba(255, 255, 255, 0.1); - flex: 1 0 100%; - gap: 10px; -} -.line:last-child { - border-bottom: none; -} -.paramEnums { - border-radius: 8px; - background: #181818; - padding: 10px; - margin-top: 10px; -} -.paramEnumsUl { - color: #c2c2c2; - list-style-type: disc; - margin-left: 16px; -} diff --git a/components/GenericMethod/params/PathParamsList.tsx b/components/GenericMethod/params/PathParamsList.tsx deleted file mode 100644 index 8f657c3..0000000 --- a/components/GenericMethod/params/PathParamsList.tsx +++ /dev/null @@ -1,89 +0,0 @@ -import { Group } from "@mantine/core"; -import { Fira_Mono } from "next/font/google"; -import { RequestParamProp } from "./types"; -import classes from "./PathParamsList.module.css"; -import { Text } from "../../Text"; -import { TParamType } from "../types"; -import { getParamsType } from "../getParamsType"; -import cx from "clsx"; - -type Props = { - pathParams: RequestParamProp; - pathParamsType: TParamType; - isChild?: boolean; -}; - -const fira = Fira_Mono({ subsets: ["latin"], weight: ["400"] }); - -export function PathParamsList({ pathParams, pathParamsType }: Props) { - return ( -
-
- - {getParamsType(pathParamsType)} - -
- - {/* Iterate through and render each param */} - {pathParams?.map((param) => ( -
- - - {param.paramName} - - - {param.type} - - - - - - {param.paramDescription} - - - - {/* If param has enum values, render them */} - {param.paramEnum ? ( -
-
    - {param.paramEnum.map((enumItem) => ( -
  • - - - - {enumItem.value} - {" "} - {enumItem.isDefault ? "[default]" : ""}{" "} - {`- ${enumItem.description}`} - - -
  • - ))} -
-
- ) : null} - - {/* If param has children params, render them */} - {param.childrenParams ? ( -
- -
- ) : null} -
- ))} -
- ); -} diff --git a/components/GenericMethod/params/QueryParams.module.css b/components/GenericMethod/params/QueryParams.module.css deleted file mode 100644 index 3f9fced..0000000 --- a/components/GenericMethod/params/QueryParams.module.css +++ /dev/null @@ -1,31 +0,0 @@ -.root { - display: flex; - flex-direction: row; - justify-content: flex-start; - align-items: flex-start; - background-color: #181818; - flex-wrap: wrap; - border-radius: 12px; - border: 1px solid rgba(255, 255, 255, 0.1); -} - -.line { - display: flex; - flex-direction: row; - justify-content: flex-start; - align-items: center; - padding: 12px; - border-bottom: 1px solid rgba(255, 255, 255, 0.1); - width: 100%; - gap: 10px; -} - -.params { - display: flex; - flex-direction: row; - justify-content: flex-start; - align-items: center; - padding: 12px; - width: 100%; - gap: 10px; -} diff --git a/components/GenericMethod/params/QueryParams.tsx b/components/GenericMethod/params/QueryParams.tsx index 5f9cf83..2c09ac5 100644 --- a/components/GenericMethod/params/QueryParams.tsx +++ b/components/GenericMethod/params/QueryParams.tsx @@ -1,56 +1,7 @@ -import { Grid } from "@mantine/core"; -import classes from "./QueryParams.module.css"; -import { QueryParamsList } from "./QueryParamsList"; -import { TParamType } from "../types"; -import { getParamsType } from "../getParamsType"; -import { Text } from "../../Text"; -import { ReqResParam } from "./types"; +import { Params, type Props as ParamsProps } from "./Params"; -type Props = { - queryParamsType: TParamType; - queryParams: ReqResParam[] | null; - isRESTApi?: boolean; -}; +type Props = Omit; -export function QueryParams({ - queryParams, - queryParamsType, - isRESTApi, -}: Props) { - return ( - - - - Query params - - - - -
- -
- - Parameters - - - {getParamsType(queryParamsType)} - -
- - {queryParams && queryParams.length > 0 ? ( - - ) : null} -
-
-
- ); +export function QueryParams(props: Props) { + return ; } diff --git a/components/GenericMethod/params/QueryParamsList.module.css b/components/GenericMethod/params/QueryParamsList.module.css deleted file mode 100644 index e9edd28..0000000 --- a/components/GenericMethod/params/QueryParamsList.module.css +++ /dev/null @@ -1,29 +0,0 @@ -RequestParamsList.module.css.root { - background-color: #0f0f0f; - border-radius: 12px; - border: 1px solid rgba(255, 255, 255, 0.1); - display: flex; - width: 100%; - margin: 0 12px 12px; - flex-wrap: wrap; -} -.line { - padding: 12px; - border-bottom: 1px solid rgba(255, 255, 255, 0.1); - flex: 1 0 100%; - gap: 10px; -} -.line:last-child { - border-bottom: none; -} -.paramEnums { - border-radius: 8px; - background: #181818; - padding: 10px; - margin-top: 10px; -} -.paramEnumsUl { - color: #c2c2c2; - list-style-type: disc; - margin-left: 16px; -} diff --git a/components/GenericMethod/params/RequestParams.tsx b/components/GenericMethod/params/RequestParams.tsx index 2a49f54..7a90f11 100644 --- a/components/GenericMethod/params/RequestParams.tsx +++ b/components/GenericMethod/params/RequestParams.tsx @@ -1,6 +1,6 @@ import { Grid } from "@mantine/core"; import classes from "./RequestParams.module.css"; -import { RequestParamsList } from "./RequestParamsList"; +import { ParamsList } from "./ParamsList"; import { TParamType } from "../types"; import { getParamsType } from "../getParamsType"; import { Text } from "../../Text"; @@ -72,9 +72,9 @@ export function RequestParams({
{requestParams && requestParams.length > 0 ? ( - ) : null} diff --git a/components/GenericMethod/params/RequestParamsList.tsx b/components/GenericMethod/params/RequestParamsList.tsx deleted file mode 100644 index baacab6..0000000 --- a/components/GenericMethod/params/RequestParamsList.tsx +++ /dev/null @@ -1,89 +0,0 @@ -import { Group } from "@mantine/core"; -import { Fira_Mono } from "next/font/google"; -import { RequestParamProp } from "./types"; -import classes from "./RequestParamsList.module.css"; -import { Text } from "../../Text"; -import { TParamType } from "../types"; -import { getParamsType } from "../getParamsType"; -import cx from "clsx"; - -type Props = { - requestParams: RequestParamProp; - requestParamsType: TParamType; - isChild?: boolean; -}; - -const fira = Fira_Mono({ subsets: ["latin"], weight: ["400"] }); - -export function RequestParamsList({ requestParams, requestParamsType }: Props) { - return ( -
-
- - {getParamsType(requestParamsType)} - -
- - {/* Iterate through and render each param */} - {requestParams?.map((param) => ( -
- - - {param.paramName} - - - {param.type} - - - - - - {param.paramDescription} - - - - {/* If param has enum values, render them */} - {param.paramEnum ? ( -
-
    - {param.paramEnum.map((enumItem) => ( -
  • - - - - {enumItem.value} - {" "} - {enumItem.isDefault ? "[default]" : ""}{" "} - {`- ${enumItem.description}`} - - -
  • - ))} -
-
- ) : null} - - {/* If param has children params, render them */} - {param.childrenParams ? ( -
- -
- ) : null} -
- ))} -
- ); -} From 4b0b8de843ebd4fef34b406db5af10d917f331c7 Mon Sep 17 00:00:00 2001 From: Anna Linnik Date: Tue, 7 Apr 2026 11:37:32 +0200 Subject: [PATCH 2/5] refactor param types --- components/GenericMethod/params/types.ts | 2 -- .../method-docs/wallet/WalletMethod_getaggregatedpnl.tsx | 5 ++--- components/method-docs/wallet/WalletMethod_getaprhistory.tsx | 5 ++--- .../method-docs/wallet/WalletMethod_getevmportfolio.tsx | 5 ++--- .../wallet/WalletMethod_gethistoricalnetworth.tsx | 5 ++--- .../method-docs/wallet/WalletMethod_getnftcollections.tsx | 5 ++--- .../method-docs/wallet/WalletMethod_getnftmetadatabyid.tsx | 5 ++--- .../method-docs/wallet/WalletMethod_getnonevmportfolio.tsx | 5 ++--- .../wallet/WalletMethod_getpnlformultiplewallets.tsx | 5 ++--- components/method-docs/wallet/WalletMethod_getpnlhistory.tsx | 5 ++--- .../wallet/WalletMethod_getsupportedchainbyid.tsx | 5 ++--- .../method-docs/wallet/WalletMethod_getsupportedchains.tsx | 5 ++--- .../wallet/WalletMethod_getsupportedpricesymbols.tsx | 5 ++--- .../method-docs/wallet/WalletMethod_getsupportedtokens.tsx | 5 ++--- .../method-docs/wallet/WalletMethod_gettokeninfobyid.tsx | 5 ++--- .../wallet/WalletMethod_gettransactionshistory.tsx | 5 ++--- components/method-docs/wallet/WalletMethod_getwalletnfts.tsx | 5 ++--- .../wallet/WalletMethod_getyieldrecommendations.tsx | 5 ++--- .../method-docs/wallet/WalletMethod_refreshnftmetadata.tsx | 5 ++--- .../wallet/WalletMethod_searchhistoricalprices.tsx | 5 ++--- 20 files changed, 38 insertions(+), 59 deletions(-) diff --git a/components/GenericMethod/params/types.ts b/components/GenericMethod/params/types.ts index a1ef1c4..e3751cd 100644 --- a/components/GenericMethod/params/types.ts +++ b/components/GenericMethod/params/types.ts @@ -14,5 +14,3 @@ export type ReqResParam = { }; export type RequestParamProp = ReqResParam[] | null; -export type PathParamProp = ReqResParam[] | null; -export type QueryParamProp = ReqResParam[] | null; diff --git a/components/method-docs/wallet/WalletMethod_getaggregatedpnl.tsx b/components/method-docs/wallet/WalletMethod_getaggregatedpnl.tsx index 4a3d991..ece9514 100644 --- a/components/method-docs/wallet/WalletMethod_getaggregatedpnl.tsx +++ b/components/method-docs/wallet/WalletMethod_getaggregatedpnl.tsx @@ -2,8 +2,7 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, - RequestParamProp, - PathParamProp + RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; @@ -245,7 +244,7 @@ const RESPONSE_JSON = `{ ] }`; -const PATH_PARAMS: PathParamProp = [ +const PATH_PARAMS: ReqResParam[] = [ { paramName: "chain", type: "string", diff --git a/components/method-docs/wallet/WalletMethod_getaprhistory.tsx b/components/method-docs/wallet/WalletMethod_getaprhistory.tsx index 3f5e6bd..8f1a069 100644 --- a/components/method-docs/wallet/WalletMethod_getaprhistory.tsx +++ b/components/method-docs/wallet/WalletMethod_getaprhistory.tsx @@ -2,8 +2,7 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, - RequestParamProp, - PathParamProp + RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; @@ -150,7 +149,7 @@ const RESPONSE_JSON = `{ ] }`; -const PATH_PARAMS: PathParamProp = [ +const PATH_PARAMS: ReqResParam[] = [ { paramName: "key", type: "string", diff --git a/components/method-docs/wallet/WalletMethod_getevmportfolio.tsx b/components/method-docs/wallet/WalletMethod_getevmportfolio.tsx index 6d2e796..4ac4a2e 100644 --- a/components/method-docs/wallet/WalletMethod_getevmportfolio.tsx +++ b/components/method-docs/wallet/WalletMethod_getevmportfolio.tsx @@ -2,8 +2,7 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, - RequestParamProp, - PathParamProp + RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; @@ -282,7 +281,7 @@ const RESPONSE_JSON = `{ } }`; -const PATH_PARAMS: PathParamProp = [ +const PATH_PARAMS: ReqResParam[] = [ { paramName: "chain", type: "string", diff --git a/components/method-docs/wallet/WalletMethod_gethistoricalnetworth.tsx b/components/method-docs/wallet/WalletMethod_gethistoricalnetworth.tsx index e50dd22..04309a7 100644 --- a/components/method-docs/wallet/WalletMethod_gethistoricalnetworth.tsx +++ b/components/method-docs/wallet/WalletMethod_gethistoricalnetworth.tsx @@ -2,8 +2,7 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, - RequestParamProp, - PathParamProp + RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; @@ -148,7 +147,7 @@ const RESPONSE_JSON = `{ } }`; -const PATH_PARAMS: PathParamProp = [ +const PATH_PARAMS: ReqResParam[] = [ { paramName: "chain", type: "string", diff --git a/components/method-docs/wallet/WalletMethod_getnftcollections.tsx b/components/method-docs/wallet/WalletMethod_getnftcollections.tsx index dfc4abc..a73c318 100644 --- a/components/method-docs/wallet/WalletMethod_getnftcollections.tsx +++ b/components/method-docs/wallet/WalletMethod_getnftcollections.tsx @@ -2,8 +2,7 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, - RequestParamProp, - PathParamProp + RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; @@ -169,7 +168,7 @@ const RESPONSE_JSON = `{ ] }`; -const PATH_PARAMS: PathParamProp = [ +const PATH_PARAMS: ReqResParam[] = [ { paramName: "chain", type: "string", diff --git a/components/method-docs/wallet/WalletMethod_getnftmetadatabyid.tsx b/components/method-docs/wallet/WalletMethod_getnftmetadatabyid.tsx index 68cc4d8..c1e4d0a 100644 --- a/components/method-docs/wallet/WalletMethod_getnftmetadatabyid.tsx +++ b/components/method-docs/wallet/WalletMethod_getnftmetadatabyid.tsx @@ -2,8 +2,7 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, - RequestParamProp, - PathParamProp + RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; @@ -160,7 +159,7 @@ const RESPONSE_JSON = `{ } } }`; -const PATH_PARAMS: PathParamProp = [ +const PATH_PARAMS: ReqResParam[] = [ { paramName: "chain", type: "string", diff --git a/components/method-docs/wallet/WalletMethod_getnonevmportfolio.tsx b/components/method-docs/wallet/WalletMethod_getnonevmportfolio.tsx index 057c699..246509c 100644 --- a/components/method-docs/wallet/WalletMethod_getnonevmportfolio.tsx +++ b/components/method-docs/wallet/WalletMethod_getnonevmportfolio.tsx @@ -2,8 +2,7 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, - RequestParamProp, - PathParamProp + RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; @@ -282,7 +281,7 @@ const RESPONSE_JSON = `{ } }`; -const PATH_PARAMS: PathParamProp = [ +const PATH_PARAMS: ReqResParam[] = [ { paramName: "chain", type: "string", diff --git a/components/method-docs/wallet/WalletMethod_getpnlformultiplewallets.tsx b/components/method-docs/wallet/WalletMethod_getpnlformultiplewallets.tsx index a2b5ef6..6b38589 100644 --- a/components/method-docs/wallet/WalletMethod_getpnlformultiplewallets.tsx +++ b/components/method-docs/wallet/WalletMethod_getpnlformultiplewallets.tsx @@ -2,8 +2,7 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, - RequestParamProp, - PathParamProp + RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; @@ -211,7 +210,7 @@ const RESPONSE_JSON = `{ ] }`; -const PATH_PARAMS: PathParamProp = [ +const PATH_PARAMS: ReqResParam[] = [ { paramName: "chain", type: "string", diff --git a/components/method-docs/wallet/WalletMethod_getpnlhistory.tsx b/components/method-docs/wallet/WalletMethod_getpnlhistory.tsx index 9ab66dc..7aebe15 100644 --- a/components/method-docs/wallet/WalletMethod_getpnlhistory.tsx +++ b/components/method-docs/wallet/WalletMethod_getpnlhistory.tsx @@ -2,8 +2,7 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, - RequestParamProp, - PathParamProp + RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; @@ -199,7 +198,7 @@ const RESPONSE_JSON = `{ ] }`; -const PATH_PARAMS: PathParamProp = [ +const PATH_PARAMS: ReqResParam[] = [ { paramName: "chain", type: "string", diff --git a/components/method-docs/wallet/WalletMethod_getsupportedchainbyid.tsx b/components/method-docs/wallet/WalletMethod_getsupportedchainbyid.tsx index 4a3d1f8..3f3c27b 100644 --- a/components/method-docs/wallet/WalletMethod_getsupportedchainbyid.tsx +++ b/components/method-docs/wallet/WalletMethod_getsupportedchainbyid.tsx @@ -2,8 +2,7 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, - RequestParamProp, - PathParamProp + RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; @@ -134,7 +133,7 @@ const RESPONSE_JSON = `{ } }`; -const PATH_PARAMS: PathParamProp = [ +const PATH_PARAMS: ReqResParam[] = [ { paramName: "key", type: "string", diff --git a/components/method-docs/wallet/WalletMethod_getsupportedchains.tsx b/components/method-docs/wallet/WalletMethod_getsupportedchains.tsx index 21de08e..4912bfd 100644 --- a/components/method-docs/wallet/WalletMethod_getsupportedchains.tsx +++ b/components/method-docs/wallet/WalletMethod_getsupportedchains.tsx @@ -2,8 +2,7 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, - RequestParamProp, - PathParamProp + RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; @@ -144,7 +143,7 @@ const RESPONSE_JSON = `{ } }`; -const PATH_PARAMS: PathParamProp = [ +const PATH_PARAMS: ReqResParam[] = [ { paramName: "key", type: "string", diff --git a/components/method-docs/wallet/WalletMethod_getsupportedpricesymbols.tsx b/components/method-docs/wallet/WalletMethod_getsupportedpricesymbols.tsx index 449befd..7471eca 100644 --- a/components/method-docs/wallet/WalletMethod_getsupportedpricesymbols.tsx +++ b/components/method-docs/wallet/WalletMethod_getsupportedpricesymbols.tsx @@ -2,8 +2,7 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, - RequestParamProp, - PathParamProp + RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; @@ -130,7 +129,7 @@ const RESPONSE_JSON = `{ ] }`; -const PATH_PARAMS: PathParamProp = [ +const PATH_PARAMS: ReqResParam[] = [ { paramName: "key", type: "string", diff --git a/components/method-docs/wallet/WalletMethod_getsupportedtokens.tsx b/components/method-docs/wallet/WalletMethod_getsupportedtokens.tsx index da532fa..a3acfde 100644 --- a/components/method-docs/wallet/WalletMethod_getsupportedtokens.tsx +++ b/components/method-docs/wallet/WalletMethod_getsupportedtokens.tsx @@ -2,8 +2,7 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, - RequestParamProp, - PathParamProp + RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; @@ -159,7 +158,7 @@ const RESPONSE_JSON = `{ } }`; -const PATH_PARAMS: PathParamProp = [ +const PATH_PARAMS: ReqResParam[] = [ { paramName: "key", type: "string", diff --git a/components/method-docs/wallet/WalletMethod_gettokeninfobyid.tsx b/components/method-docs/wallet/WalletMethod_gettokeninfobyid.tsx index 17993ca..334cec1 100644 --- a/components/method-docs/wallet/WalletMethod_gettokeninfobyid.tsx +++ b/components/method-docs/wallet/WalletMethod_gettokeninfobyid.tsx @@ -2,8 +2,7 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, - RequestParamProp, - PathParamProp + RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; @@ -150,7 +149,7 @@ const RESPONSE_JSON = `{ } }`; -const PATH_PARAMS: PathParamProp = [ +const PATH_PARAMS: ReqResParam[] = [ { paramName: "key", type: "string", diff --git a/components/method-docs/wallet/WalletMethod_gettransactionshistory.tsx b/components/method-docs/wallet/WalletMethod_gettransactionshistory.tsx index 4196b3e..5cc2342 100644 --- a/components/method-docs/wallet/WalletMethod_gettransactionshistory.tsx +++ b/components/method-docs/wallet/WalletMethod_gettransactionshistory.tsx @@ -2,8 +2,7 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, - RequestParamProp, - PathParamProp + RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; @@ -298,7 +297,7 @@ const RESPONSE_JSON = `{ ] }`; -const PATH_PARAMS: PathParamProp = [ +const PATH_PARAMS: ReqResParam[] = [ { paramName: "chain", type: "string", diff --git a/components/method-docs/wallet/WalletMethod_getwalletnfts.tsx b/components/method-docs/wallet/WalletMethod_getwalletnfts.tsx index 443be9d..16a320e 100644 --- a/components/method-docs/wallet/WalletMethod_getwalletnfts.tsx +++ b/components/method-docs/wallet/WalletMethod_getwalletnfts.tsx @@ -2,8 +2,7 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, - RequestParamProp, - PathParamProp + RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; @@ -178,7 +177,7 @@ const RESPONSE_JSON = `{ "next_page_token": "IjIi" }`; -const PATH_PARAMS: PathParamProp = [ +const PATH_PARAMS: ReqResParam[] = [ { paramName: "chain", type: "string", diff --git a/components/method-docs/wallet/WalletMethod_getyieldrecommendations.tsx b/components/method-docs/wallet/WalletMethod_getyieldrecommendations.tsx index a560365..e56e1fc 100644 --- a/components/method-docs/wallet/WalletMethod_getyieldrecommendations.tsx +++ b/components/method-docs/wallet/WalletMethod_getyieldrecommendations.tsx @@ -2,8 +2,7 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, - RequestParamProp, - PathParamProp + RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; @@ -183,7 +182,7 @@ const RESPONSE_JSON = `{ ] }`; -const PATH_PARAMS: PathParamProp = [ +const PATH_PARAMS: ReqResParam[] = [ { paramName: "key", type: "string", diff --git a/components/method-docs/wallet/WalletMethod_refreshnftmetadata.tsx b/components/method-docs/wallet/WalletMethod_refreshnftmetadata.tsx index 23cdc9a..380b64f 100644 --- a/components/method-docs/wallet/WalletMethod_refreshnftmetadata.tsx +++ b/components/method-docs/wallet/WalletMethod_refreshnftmetadata.tsx @@ -2,8 +2,7 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, - RequestParamProp, - PathParamProp + RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; @@ -128,7 +127,7 @@ const RESPONSE_JSON = `{ "status": "success", }`; -const PATH_PARAMS: PathParamProp = [ +const PATH_PARAMS: ReqResParam[] = [ { paramName: "chain", type: "string", diff --git a/components/method-docs/wallet/WalletMethod_searchhistoricalprices.tsx b/components/method-docs/wallet/WalletMethod_searchhistoricalprices.tsx index 030d2b7..b28c1b7 100644 --- a/components/method-docs/wallet/WalletMethod_searchhistoricalprices.tsx +++ b/components/method-docs/wallet/WalletMethod_searchhistoricalprices.tsx @@ -2,8 +2,7 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, - RequestParamProp, - PathParamProp + RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; @@ -147,7 +146,7 @@ const RESPONSE_JSON = `{ } }`; -const PATH_PARAMS: PathParamProp = [ +const PATH_PARAMS: ReqResParam[] = [ { paramName: "key", type: "string", From 5fa97624b446abded0d6f9363cec68b04ca452e6 Mon Sep 17 00:00:00 2001 From: Anna Linnik Date: Tue, 7 Apr 2026 11:43:16 +0200 Subject: [PATCH 3/5] refactor url prop --- components/GenericMethod/GenericMethod.tsx | 31 ++-- .../WalletMethod_gethistoricalnetworth.tsx | 20 ++- .../WalletMethod_getsupportedtokens.tsx | 152 +++++++++--------- .../WalletMethod_gettransactionshistory.tsx | 3 +- 4 files changed, 99 insertions(+), 107 deletions(-) diff --git a/components/GenericMethod/GenericMethod.tsx b/components/GenericMethod/GenericMethod.tsx index 98279cc..f2723c2 100644 --- a/components/GenericMethod/GenericMethod.tsx +++ b/components/GenericMethod/GenericMethod.tsx @@ -24,8 +24,7 @@ export type GenericMethodProps = { network: string; cu: number; description: string; - url?: string; - url1?: string; + url?: string | string[]; useCases: string[]; constraints: string[]; responseJSON: string; @@ -67,7 +66,6 @@ export default function GenericMethod({ cu, description, url, - url1, useCases, constraints, codeSnippets, @@ -143,16 +141,13 @@ export default function GenericMethod({ {description} - - - {url} - - - - - {url1} - - + {(Array.isArray(url) ? url : [url]).map((item, idx) => ( + + + {item} + + + ))}
@@ -198,19 +193,13 @@ export default function GenericMethod({ {isRESTApi && ( - + )} {isRESTApi && ( - + )} diff --git a/components/method-docs/wallet/WalletMethod_gethistoricalnetworth.tsx b/components/method-docs/wallet/WalletMethod_gethistoricalnetworth.tsx index 04309a7..326f123 100644 --- a/components/method-docs/wallet/WalletMethod_gethistoricalnetworth.tsx +++ b/components/method-docs/wallet/WalletMethod_gethistoricalnetworth.tsx @@ -2,19 +2,25 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, - RequestParamProp + RequestParamProp, } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; -export function WalletMethod_gethistoricalnetworth(props: GenericMethodPropsReplacing) { +export function WalletMethod_gethistoricalnetworth( + props: GenericMethodPropsReplacing, +) { return ( @@ -35,16 +39,15 @@ export function WalletMethod_getsupportedtokens(props: GenericMethodPropsReplaci } const CODE_SNIPPETS: Array = [ - { - language: "shell", - code: () => `curl --request GET \\ + language: "shell", + code: () => `curl --request GET \\ --url https://lb.drpc.live/{chain}/{key}/lambda/v1/tokens \\ --header 'accept: application/json'`, -}, -{ - language: "js", - code: () => `fetch("https://lb.drpc.live/{chain}/{key}/lambda/v1/tokens", { + }, + { + language: "js", + code: () => `fetch("https://lb.drpc.live/{chain}/{key}/lambda/v1/tokens", { method: "GET", headers: { "accept": "application/json" @@ -53,10 +56,10 @@ const CODE_SNIPPETS: Array = [ .then(res => res.json()) .then(console.log) .catch(console.error);`, -}, -{ - language: "node", - code: () => `import fetch from "node-fetch"; + }, + { + language: "node", + code: () => `import fetch from "node-fetch"; const res = await fetch("https://lb.drpc.live/{chain}/{key}/lambda/v1/tokens", { method: "GET", @@ -67,10 +70,10 @@ const res = await fetch("https://lb.drpc.live/{chain}/{key}/lambda/v1/tokens", { const data = await res.json(); console.log(data);`, -}, -{ - language: "go", - code: () => `package main + }, + { + language: "go", + code: () => `package main import ( "fmt" @@ -92,7 +95,7 @@ func main() { body, _ := io.ReadAll(resp.Body) fmt.Println(string(body)) }`, -}, + }, { language: "rust", code: () => `use reqwest::header::ACCEPT; @@ -113,9 +116,9 @@ async fn main() -> Result<(), Box> { Ok(()) }`, }, -{ - language: "python", - code: () => `import requests + { + language: "python", + code: () => `import requests url = "https://lb.drpc.live/{chain}/{key}/lambda/v1/tokens" headers = { @@ -124,7 +127,7 @@ headers = { response = requests.get(url, headers=headers) print(response.json())`, -} + }, ]; const RESPONSE_JSON = `{ @@ -159,38 +162,33 @@ const RESPONSE_JSON = `{ }`; const PATH_PARAMS: ReqResParam[] = [ - { + { paramName: "key", type: "string", - paramDescription: - "[Required] Your dRPC API key", + paramDescription: "[Required] Your dRPC API key", }, { paramName: "chain", type: "string", - paramDescription: - "Chain name (only for per-chain URL).", + paramDescription: "Chain name (only for per-chain URL).", }, - ]; +]; const QUERY_PARAMS: RequestParamProp = [ { paramName: "page_token", type: "string", - paramDescription: - "Token to retrieve next page.", + paramDescription: "Token to retrieve next page.", }, { paramName: "limit", type: "integer", - paramDescription: - "[Required] Amount of items to be retrieved.", + paramDescription: "[Required] Amount of items to be retrieved.", }, { paramName: "chain_id", type: "string", - paramDescription: - "Id of a chain. default: all chains", + paramDescription: "Id of a chain. default: all chains", }, ]; @@ -208,69 +206,69 @@ const RESPONSE_PARAMS: ReqResParam[] = [ paramDescription: "[Required] Chain data", childrenParamsType: "object", childrenParams: [ - { - paramName: "type", - type: "string", - paramDescription: "[Required] Item type", - }, - { - paramName: "id", - type: "string", - paramDescription: "[Required] Chain ID in Wallet API", - }, - { - paramName: "symbol", - type: "string", - paramDescription: "[Required] Symbol of the token", - }, - { - paramName: "name", - type: "string", - paramDescription: "[Required] Token name", - }, - { - paramName: "icon_url", - type: "string", - paramDescription: "URL to download icon of the token.", - }, + { + paramName: "type", + type: "string", + paramDescription: "[Required] Item type", + }, + { + paramName: "id", + type: "string", + paramDescription: "[Required] Chain ID in Wallet API", + }, + { + paramName: "symbol", + type: "string", + paramDescription: "[Required] Symbol of the token", + }, + { + paramName: "name", + type: "string", + paramDescription: "[Required] Token name", + }, + { + paramName: "icon_url", + type: "string", + paramDescription: "URL to download icon of the token.", + }, { paramName: "implementations", type: "array", - paramDescription: "[Required] List of chains where tokens are implemented.", + paramDescription: + "[Required] List of chains where tokens are implemented.", childrenParamsType: "object", childrenParams: [ { paramName: "chain_id", type: "string", - paramDescription: "[Required] id of a chain in Lambda API" + paramDescription: "[Required] id of a chain in Lambda API", }, { paramName: "chain_name", type: "string", - paramDescription: "[Required] name of a chain in Lambda API" + paramDescription: "[Required] name of a chain in Lambda API", }, { paramName: "chain_id_numeric", type: "integer", - paramDescription: "Numeric id of the chain" + paramDescription: "Numeric id of the chain", }, { paramName: "address", type: "string", - paramDescription: "[Required] Token contract address in related chain" + paramDescription: + "[Required] Token contract address in related chain", }, { paramName: "decimals", type: "integer", - paramDescription: "[Required] Decimals" - } + paramDescription: "[Required] Decimals", + }, ], - }, - ], -}, - ]; - + ], + }, +]; const USE_CASES = [ "Retrieve the list of all supported tokens", diff --git a/components/method-docs/wallet/WalletMethod_gettransactionshistory.tsx b/components/method-docs/wallet/WalletMethod_gettransactionshistory.tsx index 5cc2342..583a04e 100644 --- a/components/method-docs/wallet/WalletMethod_gettransactionshistory.tsx +++ b/components/method-docs/wallet/WalletMethod_gettransactionshistory.tsx @@ -13,8 +13,7 @@ export function WalletMethod_gettransactionshistory(props: GenericMethodPropsRep network="" cu={1837} description={"Returns a chronological list of blockchain transactions for the specified wallet address"} - url={"Per chain: GET https://lb.drpc.live/{chain}/{key}/lambda/v1/transactions/{address}/history"} - url1={"Multichain: GET https://lb.drpc.live/lambda/{key}/v1/transactions/{address}/history"} + url={["Per chain: GET https://lb.drpc.live/{chain}/{key}/lambda/v1/transactions/{address}/history", "Multichain: GET https://lb.drpc.live/lambda/{key}/v1/transactions/{address}/history"]} useCases={USE_CASES} constraints={CONSTRAINTS} codeSnippets={CODE_SNIPPETS} From 8f2bf09721ca90ff20b6978dc2686ac6c642bf6d Mon Sep 17 00:00:00 2001 From: Anna Linnik Date: Tue, 7 Apr 2026 11:54:12 +0200 Subject: [PATCH 4/5] refactor WalletMethod --- components/WalletMethod/WalletMethod.tsx | 16 ++++++++++++++-- .../wallet/WalletMethod_getaggregatedpnl.tsx | 3 --- .../wallet/WalletMethod_getaprhistory.tsx | 5 +---- .../wallet/WalletMethod_getevmportfolio.tsx | 3 --- .../WalletMethod_gethistoricalnetworth.tsx | 5 +---- .../wallet/WalletMethod_getnftcollections.tsx | 7 ++----- .../wallet/WalletMethod_getnftmetadatabyid.tsx | 3 --- .../wallet/WalletMethod_getnonevmportfolio.tsx | 3 --- .../WalletMethod_getpnlformultiplewallets.tsx | 3 --- .../wallet/WalletMethod_getpnlhistory.tsx | 3 --- .../WalletMethod_getsupportedchainbyid.tsx | 3 --- .../wallet/WalletMethod_getsupportedchains.tsx | 11 ++--------- .../WalletMethod_getsupportedpricesymbols.tsx | 3 --- .../wallet/WalletMethod_getsupportedtokens.tsx | 3 --- .../wallet/WalletMethod_gettokeninfobyid.tsx | 3 --- .../WalletMethod_gettransactionshistory.tsx | 3 --- .../wallet/WalletMethod_getwalletnfts.tsx | 3 --- .../WalletMethod_getyieldrecommendations.tsx | 3 --- .../wallet/WalletMethod_refreshnftmetadata.tsx | 3 --- .../WalletMethod_searchhistoricalprices.tsx | 3 --- 20 files changed, 20 insertions(+), 69 deletions(-) diff --git a/components/WalletMethod/WalletMethod.tsx b/components/WalletMethod/WalletMethod.tsx index b5606fc..cffe456 100644 --- a/components/WalletMethod/WalletMethod.tsx +++ b/components/WalletMethod/WalletMethod.tsx @@ -2,6 +2,18 @@ import GenericMethod, { GenericMethodProps, } from "../GenericMethod/GenericMethod"; -export default function WalletMethod(props: GenericMethodProps) { - return ; +type Props = Omit< + GenericMethodProps, + "network" | "isRESTApi" | "responseParamsDescription" +>; + +export default function WalletMethod(props: Props) { + return ( + + ); } diff --git a/components/method-docs/wallet/WalletMethod_getaggregatedpnl.tsx b/components/method-docs/wallet/WalletMethod_getaggregatedpnl.tsx index ece9514..d78f11e 100644 --- a/components/method-docs/wallet/WalletMethod_getaggregatedpnl.tsx +++ b/components/method-docs/wallet/WalletMethod_getaggregatedpnl.tsx @@ -10,11 +10,9 @@ export function WalletMethod_getaggregatedpnl(props: GenericMethodPropsReplacing return ( ); diff --git a/components/method-docs/wallet/WalletMethod_getaprhistory.tsx b/components/method-docs/wallet/WalletMethod_getaprhistory.tsx index 8f1a069..6f73994 100644 --- a/components/method-docs/wallet/WalletMethod_getaprhistory.tsx +++ b/components/method-docs/wallet/WalletMethod_getaprhistory.tsx @@ -10,11 +10,9 @@ export function WalletMethod_getaprhistory(props: GenericMethodPropsReplacing) { return ( ); diff --git a/components/method-docs/wallet/WalletMethod_getevmportfolio.tsx b/components/method-docs/wallet/WalletMethod_getevmportfolio.tsx index 4ac4a2e..65189f7 100644 --- a/components/method-docs/wallet/WalletMethod_getevmportfolio.tsx +++ b/components/method-docs/wallet/WalletMethod_getevmportfolio.tsx @@ -10,7 +10,6 @@ export function WalletMethod_getevmportfolio(props: GenericMethodPropsReplacing) return ( ); diff --git a/components/method-docs/wallet/WalletMethod_gethistoricalnetworth.tsx b/components/method-docs/wallet/WalletMethod_gethistoricalnetworth.tsx index 326f123..97b5513 100644 --- a/components/method-docs/wallet/WalletMethod_gethistoricalnetworth.tsx +++ b/components/method-docs/wallet/WalletMethod_gethistoricalnetworth.tsx @@ -12,7 +12,6 @@ export function WalletMethod_gethistoricalnetworth( return ( ); diff --git a/components/method-docs/wallet/WalletMethod_getnftcollections.tsx b/components/method-docs/wallet/WalletMethod_getnftcollections.tsx index a73c318..841cb31 100644 --- a/components/method-docs/wallet/WalletMethod_getnftcollections.tsx +++ b/components/method-docs/wallet/WalletMethod_getnftcollections.tsx @@ -9,12 +9,10 @@ import { CodeSnippetObject } from "../../GenericMethod/types"; export function WalletMethod_getnftcollections(props: GenericMethodPropsReplacing) { return ( ); diff --git a/components/method-docs/wallet/WalletMethod_getnftmetadatabyid.tsx b/components/method-docs/wallet/WalletMethod_getnftmetadatabyid.tsx index c1e4d0a..2099cc5 100644 --- a/components/method-docs/wallet/WalletMethod_getnftmetadatabyid.tsx +++ b/components/method-docs/wallet/WalletMethod_getnftmetadatabyid.tsx @@ -10,11 +10,9 @@ export function WalletMethod_getnftmetadatabyid(props: GenericMethodPropsReplaci return ( ); diff --git a/components/method-docs/wallet/WalletMethod_getnonevmportfolio.tsx b/components/method-docs/wallet/WalletMethod_getnonevmportfolio.tsx index 246509c..b98cdee 100644 --- a/components/method-docs/wallet/WalletMethod_getnonevmportfolio.tsx +++ b/components/method-docs/wallet/WalletMethod_getnonevmportfolio.tsx @@ -10,7 +10,6 @@ export function WalletMethod_getnonevmportfolio(props: GenericMethodPropsReplaci return ( ); diff --git a/components/method-docs/wallet/WalletMethod_getpnlformultiplewallets.tsx b/components/method-docs/wallet/WalletMethod_getpnlformultiplewallets.tsx index 6b38589..2bb7248 100644 --- a/components/method-docs/wallet/WalletMethod_getpnlformultiplewallets.tsx +++ b/components/method-docs/wallet/WalletMethod_getpnlformultiplewallets.tsx @@ -10,11 +10,9 @@ export function WalletMethod_getpnlformultiplewallets(props: GenericMethodPropsR return ( ); diff --git a/components/method-docs/wallet/WalletMethod_getpnlhistory.tsx b/components/method-docs/wallet/WalletMethod_getpnlhistory.tsx index 7aebe15..320ab43 100644 --- a/components/method-docs/wallet/WalletMethod_getpnlhistory.tsx +++ b/components/method-docs/wallet/WalletMethod_getpnlhistory.tsx @@ -10,11 +10,9 @@ export function WalletMethod_getpnlhistory(props: GenericMethodPropsReplacing) { return ( ); diff --git a/components/method-docs/wallet/WalletMethod_getsupportedchainbyid.tsx b/components/method-docs/wallet/WalletMethod_getsupportedchainbyid.tsx index 3f3c27b..f3fea13 100644 --- a/components/method-docs/wallet/WalletMethod_getsupportedchainbyid.tsx +++ b/components/method-docs/wallet/WalletMethod_getsupportedchainbyid.tsx @@ -10,7 +10,6 @@ export function WalletMethod_getsupportedchainbyid(props: GenericMethodPropsRepl return ( ); diff --git a/components/method-docs/wallet/WalletMethod_getsupportedchains.tsx b/components/method-docs/wallet/WalletMethod_getsupportedchains.tsx index 4912bfd..e25df52 100644 --- a/components/method-docs/wallet/WalletMethod_getsupportedchains.tsx +++ b/components/method-docs/wallet/WalletMethod_getsupportedchains.tsx @@ -10,12 +10,9 @@ export function WalletMethod_getsupportedchains(props: GenericMethodPropsReplaci return ( ); diff --git a/components/method-docs/wallet/WalletMethod_getsupportedpricesymbols.tsx b/components/method-docs/wallet/WalletMethod_getsupportedpricesymbols.tsx index 7471eca..a1e0488 100644 --- a/components/method-docs/wallet/WalletMethod_getsupportedpricesymbols.tsx +++ b/components/method-docs/wallet/WalletMethod_getsupportedpricesymbols.tsx @@ -10,11 +10,9 @@ export function WalletMethod_getsupportedpricesymbols(props: GenericMethodPropsR return ( ); diff --git a/components/method-docs/wallet/WalletMethod_getsupportedtokens.tsx b/components/method-docs/wallet/WalletMethod_getsupportedtokens.tsx index de56910..9afbef1 100644 --- a/components/method-docs/wallet/WalletMethod_getsupportedtokens.tsx +++ b/components/method-docs/wallet/WalletMethod_getsupportedtokens.tsx @@ -12,7 +12,6 @@ export function WalletMethod_getsupportedtokens( return ( ); diff --git a/components/method-docs/wallet/WalletMethod_gettokeninfobyid.tsx b/components/method-docs/wallet/WalletMethod_gettokeninfobyid.tsx index 334cec1..b94a5cb 100644 --- a/components/method-docs/wallet/WalletMethod_gettokeninfobyid.tsx +++ b/components/method-docs/wallet/WalletMethod_gettokeninfobyid.tsx @@ -10,7 +10,6 @@ export function WalletMethod_gettokeninfobyid(props: GenericMethodPropsReplacing return ( ); diff --git a/components/method-docs/wallet/WalletMethod_gettransactionshistory.tsx b/components/method-docs/wallet/WalletMethod_gettransactionshistory.tsx index 583a04e..b17bb98 100644 --- a/components/method-docs/wallet/WalletMethod_gettransactionshistory.tsx +++ b/components/method-docs/wallet/WalletMethod_gettransactionshistory.tsx @@ -10,7 +10,6 @@ export function WalletMethod_gettransactionshistory(props: GenericMethodPropsRep return ( ); diff --git a/components/method-docs/wallet/WalletMethod_getwalletnfts.tsx b/components/method-docs/wallet/WalletMethod_getwalletnfts.tsx index 16a320e..c3e01c3 100644 --- a/components/method-docs/wallet/WalletMethod_getwalletnfts.tsx +++ b/components/method-docs/wallet/WalletMethod_getwalletnfts.tsx @@ -10,11 +10,9 @@ export function WalletMethod_getwalletnfts(props: GenericMethodPropsReplacing) { return ( ); diff --git a/components/method-docs/wallet/WalletMethod_getyieldrecommendations.tsx b/components/method-docs/wallet/WalletMethod_getyieldrecommendations.tsx index e56e1fc..48f85d6 100644 --- a/components/method-docs/wallet/WalletMethod_getyieldrecommendations.tsx +++ b/components/method-docs/wallet/WalletMethod_getyieldrecommendations.tsx @@ -10,11 +10,9 @@ export function WalletMethod_getyieldrecommendations(props: GenericMethodPropsRe return ( ); diff --git a/components/method-docs/wallet/WalletMethod_refreshnftmetadata.tsx b/components/method-docs/wallet/WalletMethod_refreshnftmetadata.tsx index 380b64f..e8edc20 100644 --- a/components/method-docs/wallet/WalletMethod_refreshnftmetadata.tsx +++ b/components/method-docs/wallet/WalletMethod_refreshnftmetadata.tsx @@ -10,11 +10,9 @@ export function WalletMethod_refreshnftmetadata(props: GenericMethodPropsReplaci return ( ); diff --git a/components/method-docs/wallet/WalletMethod_searchhistoricalprices.tsx b/components/method-docs/wallet/WalletMethod_searchhistoricalprices.tsx index b28c1b7..be556b3 100644 --- a/components/method-docs/wallet/WalletMethod_searchhistoricalprices.tsx +++ b/components/method-docs/wallet/WalletMethod_searchhistoricalprices.tsx @@ -10,11 +10,9 @@ export function WalletMethod_searchhistoricalprices(props: GenericMethodPropsRep return ( ); From ed4d1ba5d5cb49a1d511c218aeab9ec9751afa6b Mon Sep 17 00:00:00 2001 From: Anna Linnik Date: Tue, 7 Apr 2026 11:56:36 +0200 Subject: [PATCH 5/5] remove props from WalletMethod_* components --- .../method-docs/wallet/WalletMethod_getaggregatedpnl.tsx | 4 +--- .../method-docs/wallet/WalletMethod_getaprhistory.tsx | 4 +--- .../method-docs/wallet/WalletMethod_getevmportfolio.tsx | 4 +--- .../wallet/WalletMethod_gethistoricalnetworth.tsx | 6 +----- .../method-docs/wallet/WalletMethod_getnftcollections.tsx | 4 +--- .../method-docs/wallet/WalletMethod_getnftmetadatabyid.tsx | 4 +--- .../method-docs/wallet/WalletMethod_getnonevmportfolio.tsx | 4 +--- .../wallet/WalletMethod_getpnlformultiplewallets.tsx | 4 +--- .../method-docs/wallet/WalletMethod_getpnlhistory.tsx | 4 +--- .../wallet/WalletMethod_getsupportedchainbyid.tsx | 4 +--- .../method-docs/wallet/WalletMethod_getsupportedchains.tsx | 4 +--- .../wallet/WalletMethod_getsupportedpricesymbols.tsx | 4 +--- .../method-docs/wallet/WalletMethod_getsupportedtokens.tsx | 6 +----- .../method-docs/wallet/WalletMethod_gettokeninfobyid.tsx | 4 +--- .../wallet/WalletMethod_gettransactionshistory.tsx | 4 +--- .../method-docs/wallet/WalletMethod_getwalletnfts.tsx | 4 +--- .../wallet/WalletMethod_getyieldrecommendations.tsx | 4 +--- .../method-docs/wallet/WalletMethod_refreshnftmetadata.tsx | 4 +--- .../wallet/WalletMethod_searchhistoricalprices.tsx | 4 +--- 19 files changed, 19 insertions(+), 61 deletions(-) diff --git a/components/method-docs/wallet/WalletMethod_getaggregatedpnl.tsx b/components/method-docs/wallet/WalletMethod_getaggregatedpnl.tsx index d78f11e..f136aa9 100644 --- a/components/method-docs/wallet/WalletMethod_getaggregatedpnl.tsx +++ b/components/method-docs/wallet/WalletMethod_getaggregatedpnl.tsx @@ -1,12 +1,11 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; -import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; -export function WalletMethod_getaggregatedpnl(props: GenericMethodPropsReplacing) { +export function WalletMethod_getaggregatedpnl() { return ( ); } diff --git a/components/method-docs/wallet/WalletMethod_getaprhistory.tsx b/components/method-docs/wallet/WalletMethod_getaprhistory.tsx index 6f73994..b3d86b1 100644 --- a/components/method-docs/wallet/WalletMethod_getaprhistory.tsx +++ b/components/method-docs/wallet/WalletMethod_getaprhistory.tsx @@ -1,12 +1,11 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; -import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; -export function WalletMethod_getaprhistory(props: GenericMethodPropsReplacing) { +export function WalletMethod_getaprhistory() { return ( ); } diff --git a/components/method-docs/wallet/WalletMethod_getevmportfolio.tsx b/components/method-docs/wallet/WalletMethod_getevmportfolio.tsx index 65189f7..7c09284 100644 --- a/components/method-docs/wallet/WalletMethod_getevmportfolio.tsx +++ b/components/method-docs/wallet/WalletMethod_getevmportfolio.tsx @@ -1,12 +1,11 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; -import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; -export function WalletMethod_getevmportfolio(props: GenericMethodPropsReplacing) { +export function WalletMethod_getevmportfolio() { return ( ); } diff --git a/components/method-docs/wallet/WalletMethod_gethistoricalnetworth.tsx b/components/method-docs/wallet/WalletMethod_gethistoricalnetworth.tsx index 97b5513..a361067 100644 --- a/components/method-docs/wallet/WalletMethod_gethistoricalnetworth.tsx +++ b/components/method-docs/wallet/WalletMethod_gethistoricalnetworth.tsx @@ -1,14 +1,11 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; -import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, RequestParamProp, } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; -export function WalletMethod_gethistoricalnetworth( - props: GenericMethodPropsReplacing, -) { +export function WalletMethod_gethistoricalnetworth() { return ( ); } diff --git a/components/method-docs/wallet/WalletMethod_getnftcollections.tsx b/components/method-docs/wallet/WalletMethod_getnftcollections.tsx index 841cb31..d4f429d 100644 --- a/components/method-docs/wallet/WalletMethod_getnftcollections.tsx +++ b/components/method-docs/wallet/WalletMethod_getnftcollections.tsx @@ -1,12 +1,11 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; -import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; -export function WalletMethod_getnftcollections(props: GenericMethodPropsReplacing) { +export function WalletMethod_getnftcollections() { return ( ); } diff --git a/components/method-docs/wallet/WalletMethod_getnftmetadatabyid.tsx b/components/method-docs/wallet/WalletMethod_getnftmetadatabyid.tsx index 2099cc5..648aaec 100644 --- a/components/method-docs/wallet/WalletMethod_getnftmetadatabyid.tsx +++ b/components/method-docs/wallet/WalletMethod_getnftmetadatabyid.tsx @@ -1,12 +1,11 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; -import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; -export function WalletMethod_getnftmetadatabyid(props: GenericMethodPropsReplacing) { +export function WalletMethod_getnftmetadatabyid() { return ( ); } diff --git a/components/method-docs/wallet/WalletMethod_getnonevmportfolio.tsx b/components/method-docs/wallet/WalletMethod_getnonevmportfolio.tsx index b98cdee..e4b46e0 100644 --- a/components/method-docs/wallet/WalletMethod_getnonevmportfolio.tsx +++ b/components/method-docs/wallet/WalletMethod_getnonevmportfolio.tsx @@ -1,12 +1,11 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; -import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; -export function WalletMethod_getnonevmportfolio(props: GenericMethodPropsReplacing) { +export function WalletMethod_getnonevmportfolio() { return ( ); } diff --git a/components/method-docs/wallet/WalletMethod_getpnlformultiplewallets.tsx b/components/method-docs/wallet/WalletMethod_getpnlformultiplewallets.tsx index 2bb7248..18fcbca 100644 --- a/components/method-docs/wallet/WalletMethod_getpnlformultiplewallets.tsx +++ b/components/method-docs/wallet/WalletMethod_getpnlformultiplewallets.tsx @@ -1,12 +1,11 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; -import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; -export function WalletMethod_getpnlformultiplewallets(props: GenericMethodPropsReplacing) { +export function WalletMethod_getpnlformultiplewallets() { return ( ); } diff --git a/components/method-docs/wallet/WalletMethod_getpnlhistory.tsx b/components/method-docs/wallet/WalletMethod_getpnlhistory.tsx index 320ab43..a18e55c 100644 --- a/components/method-docs/wallet/WalletMethod_getpnlhistory.tsx +++ b/components/method-docs/wallet/WalletMethod_getpnlhistory.tsx @@ -1,12 +1,11 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; -import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; -export function WalletMethod_getpnlhistory(props: GenericMethodPropsReplacing) { +export function WalletMethod_getpnlhistory() { return ( ); } diff --git a/components/method-docs/wallet/WalletMethod_getsupportedchainbyid.tsx b/components/method-docs/wallet/WalletMethod_getsupportedchainbyid.tsx index f3fea13..671bcfc 100644 --- a/components/method-docs/wallet/WalletMethod_getsupportedchainbyid.tsx +++ b/components/method-docs/wallet/WalletMethod_getsupportedchainbyid.tsx @@ -1,12 +1,11 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; -import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; -export function WalletMethod_getsupportedchainbyid(props: GenericMethodPropsReplacing) { +export function WalletMethod_getsupportedchainbyid() { return ( ); } diff --git a/components/method-docs/wallet/WalletMethod_getsupportedchains.tsx b/components/method-docs/wallet/WalletMethod_getsupportedchains.tsx index e25df52..f705733 100644 --- a/components/method-docs/wallet/WalletMethod_getsupportedchains.tsx +++ b/components/method-docs/wallet/WalletMethod_getsupportedchains.tsx @@ -1,12 +1,11 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; -import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; -export function WalletMethod_getsupportedchains(props: GenericMethodPropsReplacing) { +export function WalletMethod_getsupportedchains() { return ( ); } diff --git a/components/method-docs/wallet/WalletMethod_getsupportedpricesymbols.tsx b/components/method-docs/wallet/WalletMethod_getsupportedpricesymbols.tsx index a1e0488..073ac2f 100644 --- a/components/method-docs/wallet/WalletMethod_getsupportedpricesymbols.tsx +++ b/components/method-docs/wallet/WalletMethod_getsupportedpricesymbols.tsx @@ -1,12 +1,11 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; -import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; -export function WalletMethod_getsupportedpricesymbols(props: GenericMethodPropsReplacing) { +export function WalletMethod_getsupportedpricesymbols() { return ( ); } diff --git a/components/method-docs/wallet/WalletMethod_getsupportedtokens.tsx b/components/method-docs/wallet/WalletMethod_getsupportedtokens.tsx index 9afbef1..dd18524 100644 --- a/components/method-docs/wallet/WalletMethod_getsupportedtokens.tsx +++ b/components/method-docs/wallet/WalletMethod_getsupportedtokens.tsx @@ -1,14 +1,11 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; -import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, RequestParamProp, } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; -export function WalletMethod_getsupportedtokens( - props: GenericMethodPropsReplacing, -) { +export function WalletMethod_getsupportedtokens() { return ( ); } diff --git a/components/method-docs/wallet/WalletMethod_gettokeninfobyid.tsx b/components/method-docs/wallet/WalletMethod_gettokeninfobyid.tsx index b94a5cb..a843b35 100644 --- a/components/method-docs/wallet/WalletMethod_gettokeninfobyid.tsx +++ b/components/method-docs/wallet/WalletMethod_gettokeninfobyid.tsx @@ -1,12 +1,11 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; -import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; -export function WalletMethod_gettokeninfobyid(props: GenericMethodPropsReplacing) { +export function WalletMethod_gettokeninfobyid() { return ( ); } diff --git a/components/method-docs/wallet/WalletMethod_gettransactionshistory.tsx b/components/method-docs/wallet/WalletMethod_gettransactionshistory.tsx index b17bb98..7e2c4d7 100644 --- a/components/method-docs/wallet/WalletMethod_gettransactionshistory.tsx +++ b/components/method-docs/wallet/WalletMethod_gettransactionshistory.tsx @@ -1,12 +1,11 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; -import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; -export function WalletMethod_gettransactionshistory(props: GenericMethodPropsReplacing) { +export function WalletMethod_gettransactionshistory() { return ( ); } diff --git a/components/method-docs/wallet/WalletMethod_getwalletnfts.tsx b/components/method-docs/wallet/WalletMethod_getwalletnfts.tsx index c3e01c3..4e1a96a 100644 --- a/components/method-docs/wallet/WalletMethod_getwalletnfts.tsx +++ b/components/method-docs/wallet/WalletMethod_getwalletnfts.tsx @@ -1,12 +1,11 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; -import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; -export function WalletMethod_getwalletnfts(props: GenericMethodPropsReplacing) { +export function WalletMethod_getwalletnfts() { return ( ); } diff --git a/components/method-docs/wallet/WalletMethod_getyieldrecommendations.tsx b/components/method-docs/wallet/WalletMethod_getyieldrecommendations.tsx index 48f85d6..0f49f04 100644 --- a/components/method-docs/wallet/WalletMethod_getyieldrecommendations.tsx +++ b/components/method-docs/wallet/WalletMethod_getyieldrecommendations.tsx @@ -1,12 +1,11 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; -import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; -export function WalletMethod_getyieldrecommendations(props: GenericMethodPropsReplacing) { +export function WalletMethod_getyieldrecommendations() { return ( ); } diff --git a/components/method-docs/wallet/WalletMethod_refreshnftmetadata.tsx b/components/method-docs/wallet/WalletMethod_refreshnftmetadata.tsx index e8edc20..da8a077 100644 --- a/components/method-docs/wallet/WalletMethod_refreshnftmetadata.tsx +++ b/components/method-docs/wallet/WalletMethod_refreshnftmetadata.tsx @@ -1,12 +1,11 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; -import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; -export function WalletMethod_refreshnftmetadata(props: GenericMethodPropsReplacing) { +export function WalletMethod_refreshnftmetadata() { return ( ); } diff --git a/components/method-docs/wallet/WalletMethod_searchhistoricalprices.tsx b/components/method-docs/wallet/WalletMethod_searchhistoricalprices.tsx index be556b3..f606f7d 100644 --- a/components/method-docs/wallet/WalletMethod_searchhistoricalprices.tsx +++ b/components/method-docs/wallet/WalletMethod_searchhistoricalprices.tsx @@ -1,12 +1,11 @@ import WalletMethod from "../../WalletMethod/WalletMethod"; -import { GenericMethodPropsReplacing } from "../../GenericMethod/GenericMethod"; import { ReqResParam, RequestParamProp } from "../../GenericMethod/params/types"; import { CodeSnippetObject } from "../../GenericMethod/types"; -export function WalletMethod_searchhistoricalprices(props: GenericMethodPropsReplacing) { +export function WalletMethod_searchhistoricalprices() { return ( ); }