-
Notifications
You must be signed in to change notification settings - Fork 20
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
Feat: update naming convention from lcd to rest #1251
base: develop
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
6 Skipped Deployments
|
Warning Rate limit exceeded@Poafs1 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 13 minutes and 43 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (46)
WalkthroughThis pull request refactors the codebase by replacing references to “lcd” with “rest” across configuration files, components, hooks, services, and types. The changes involve renaming variables, function names, query keys, and error messages to align with a new REST API approach. In addition, a dependency in package.json was updated to reference a local file instead of a versioned remote package. The overall functionality remains unchanged, while the conventions and naming now reflect the REST endpoint as the preferred method. Changes
Sequence Diagram(s)(No sequence diagram for these changes.) Possibly related PRs
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (5)
src/lib/components/modal/WasmCodeSnippet.tsx (2)
96-96
: Variable name inconsistency in Python snippetWhile the endpoint source has been updated to
restEndpoint
, the variable nameLCD_URL
still references LCD instead of REST.Consider updating the variable name to match the new REST naming convention:
-LCD_URL = "${restEndpoint}" +REST_URL = "${restEndpoint}"And update its usage in line 100 as well.
126-126
: Variable name inconsistency in Axios snippetWhile the endpoint source has been updated to
restEndpoint
, the variable namelcdURL
still uses the old naming convention.Consider updating the variable name to match the REST naming convention:
-const lcdURL = '${restEndpoint}'; +const restURL = '${restEndpoint}';And update its usage in line 132 as well.
src/lib/services/bank/rest.ts (1)
3-3
: Naming update correctly implemented with a small typoThe renaming from LCD to REST is consistent, but there's a typo in the import name:
zBalancesReponseRest
is missing an 's' in "Response".-import { zBalancesReponseRest } from "../types"; +import { zBalancesResponseRest } from "../types";Also on line 21:
-.then(({ data }) => parseWithError(zBalancesReponseRest, data)); +.then(({ data }) => parseWithError(zBalancesResponseRest, data));Also applies to: 7-7, 21-21
src/lib/services/tx/rest.ts (1)
21-51
:getTxsByContractAddressRest
: usingPromise.allSettled
.This approach tries both queries in parallel, returning the first successful result. That matches the previous LCD logic, ensuring backward-compatible behavior.
Consider clarifying or documenting the fallback behavior if both requests succeed, or explicitly merging results if that scenario is applicable.src/lib/services/account/index.ts (1)
84-85
: Clear error message.The updated message explicitly indicates this is the REST flow. Good clarity for debugging.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (107)
README.md
(1 hunks)package.json
(1 hunks)src/config/chain/devChainConfigs.ts
(1 hunks)src/lib/app-provider/contexts/default.ts
(1 hunks)src/lib/app-provider/env.ts
(6 hunks)src/lib/components/AlertPaginationRest.tsx
(1 hunks)src/lib/components/modal/MoveCodeSnippet.tsx
(4 hunks)src/lib/components/modal/WasmCodeSnippet.tsx
(3 hunks)src/lib/components/modal/code/SaveNewCode.tsx
(2 hunks)src/lib/components/select-code/CodeSelect.tsx
(2 hunks)src/lib/components/wallet-section/index.tsx
(2 hunks)src/lib/hooks/useOpenTab.ts
(2 hunks)src/lib/layout/InformationFooter.tsx
(2 hunks)src/lib/model/account/index.ts
(1 hunks)src/lib/model/account/rest.ts
(3 hunks)src/lib/model/contract.ts
(2 hunks)src/lib/pages/account-details/components/tables/instantiated-contracts/Lite.tsx
(2 hunks)src/lib/pages/account-details/components/tables/txs/lite.tsx
(4 hunks)src/lib/pages/account-details/components/tables/txs/sequencer.tsx
(1 hunks)src/lib/pages/account-details/data.ts
(2 hunks)src/lib/pages/account-details/index.tsx
(2 hunks)src/lib/pages/block-details/components/BlockDetailsTop.tsx
(2 hunks)src/lib/pages/block-details/components/BlockTxsTableLite.tsx
(1 hunks)src/lib/pages/block-details/data.ts
(1 hunks)src/lib/pages/block-details/lite.tsx
(1 hunks)src/lib/pages/code-details/components/code-info/table/CodeContractsTableLite.tsx
(3 hunks)src/lib/pages/code-details/data.ts
(2 hunks)src/lib/pages/code-details/index.tsx
(2 hunks)src/lib/pages/codes/components/RecentCodesTableLite.tsx
(3 hunks)src/lib/pages/codes/data.ts
(2 hunks)src/lib/pages/contract-details/components/InstantiateInfo.tsx
(2 hunks)src/lib/pages/contract-details/components/command-section/index.tsx
(2 hunks)src/lib/pages/contract-details/components/contract-states/index.tsx
(3 hunks)src/lib/pages/contract-details/components/tables/TxsTable.tsx
(3 hunks)src/lib/pages/contract-details/components/tables/migration/MigrationTableLite.tsx
(2 hunks)src/lib/pages/contract-details/data.ts
(3 hunks)src/lib/pages/custom-network/edit/index.tsx
(1 hunks)src/lib/pages/custom-network/manual/components/NetworkDetails.tsx
(1 hunks)src/lib/pages/custom-network/manual/components/WalletRegistry.tsx
(3 hunks)src/lib/pages/custom-network/manual/index.tsx
(3 hunks)src/lib/pages/custom-network/types.ts
(8 hunks)src/lib/pages/deploy/index.tsx
(2 hunks)src/lib/pages/home/lite.tsx
(2 hunks)src/lib/pages/home/sequencer.tsx
(2 hunks)src/lib/pages/instantiate/InstantiateFormPage.tsx
(2 hunks)src/lib/pages/interact-contract/components/query-area/JsonQuery.tsx
(3 hunks)src/lib/pages/interact-contract/components/query-area/schema-query/SchemaQueryComponent.tsx
(2 hunks)src/lib/pages/interact/data.ts
(2 hunks)src/lib/pages/interact/index.tsx
(2 hunks)src/lib/pages/migrate/components/MigrateContract.tsx
(2 hunks)src/lib/pages/migrate/index.tsx
(2 hunks)src/lib/pages/module-details/index.tsx
(2 hunks)src/lib/pages/nft-collection-details/data.ts
(2 hunks)src/lib/pages/past-txs/lite.tsx
(2 hunks)src/lib/pages/pools/components/pool-details/header/index.tsx
(2 hunks)src/lib/pages/pools/components/pool-details/tables/pool-txs/messages/superfluid/MsgLockAndSuperfluidDelegateDetail.tsx
(2 hunks)src/lib/pages/proposal-details/components/proposal-top/ViewProposalJson.tsx
(2 hunks)src/lib/pages/proposal-details/components/vote-details/deposit-period/depositors-table/index.tsx
(1 hunks)src/lib/pages/proposal-details/data.ts
(2 hunks)src/lib/pages/proposal/store-code/index.tsx
(2 hunks)src/lib/pages/proposal/whitelist/index.tsx
(2 hunks)src/lib/pages/proposals/components/ProposalsTableLite.tsx
(2 hunks)src/lib/pages/stored-codes/index.tsx
(2 hunks)src/lib/pages/tx-details/components/TxHeader.tsx
(2 hunks)src/lib/pages/upload/upload.tsx
(2 hunks)src/lib/pages/validator-details/components/validator-details-body/ValidatorDetailsBodyFull.tsx
(2 hunks)src/lib/pages/validator-details/components/validator-details-body/ValidatorDetailsBodyLite.tsx
(2 hunks)src/lib/pages/validators/components/ValidatorsBodyLite.tsx
(2 hunks)src/lib/pages/validators/components/validators-table/index.tsx
(2 hunks)src/lib/pages/validators/utils.ts
(1 hunks)src/lib/providers/cosmos-kit/index.tsx
(1 hunks)src/lib/providers/initia-widget.tsx
(1 hunks)src/lib/services/account/index.ts
(4 hunks)src/lib/services/account/rest.ts
(2 hunks)src/lib/services/bank/index.ts
(1 hunks)src/lib/services/bank/rest.ts
(2 hunks)src/lib/services/block/index.ts
(7 hunks)src/lib/services/block/lcd.ts
(0 hunks)src/lib/services/block/rest.ts
(1 hunks)src/lib/services/distribution/index.ts
(1 hunks)src/lib/services/distribution/rest.ts
(2 hunks)src/lib/services/evm/index.ts
(3 hunks)src/lib/services/evm/rest.ts
(2 hunks)src/lib/services/move/module/index.ts
(9 hunks)src/lib/services/move/module/rest.ts
(5 hunks)src/lib/services/move/resource/index.ts
(2 hunks)src/lib/services/move/resource/rest.ts
(2 hunks)src/lib/services/name/index.ts
(5 hunks)src/lib/services/name/rest.ts
(2 hunks)src/lib/services/nft-collection/index.ts
(7 hunks)src/lib/services/nft-collection/rest.ts
(1 hunks)src/lib/services/nft-collection/sequencer.ts
(2 hunks)src/lib/services/nft/index.ts
(11 hunks)src/lib/services/nft/rest.ts
(2 hunks)src/lib/services/proposal/index.ts
(6 hunks)src/lib/services/proposal/rest.ts
(6 hunks)src/lib/services/searchService.ts
(8 hunks)src/lib/services/staking/index.ts
(1 hunks)src/lib/services/staking/rest.ts
(5 hunks)src/lib/services/tx/api.ts
(2 hunks)src/lib/services/tx/index.ts
(14 hunks)src/lib/services/tx/rest.ts
(3 hunks)src/lib/services/types/account.ts
(3 hunks)src/lib/services/types/bank.ts
(1 hunks)src/lib/services/types/block.ts
(2 hunks)src/lib/services/types/distribution.ts
(2 hunks)src/lib/services/types/evm/codes.ts
(1 hunks)
⛔ Files not processed due to max files limit (22)
- src/lib/services/types/move/module.ts
- src/lib/services/types/move/resource.ts
- src/lib/services/types/nft.ts
- src/lib/services/types/proposal.ts
- src/lib/services/types/staking.ts
- src/lib/services/types/tx.ts
- src/lib/services/types/validator.ts
- src/lib/services/types/wasm/code.ts
- src/lib/services/types/wasm/contract.ts
- src/lib/services/username/index.ts
- src/lib/services/username/rest.ts
- src/lib/services/validator/index.ts
- src/lib/services/validator/rest.ts
- src/lib/services/wasm/code/index.ts
- src/lib/services/wasm/code/rest.ts
- src/lib/services/wasm/contract/index.ts
- src/lib/services/wasm/contract/rest.ts
- src/lib/services/wasm/contractState/index.ts
- src/lib/services/wasm/contractState/rest.ts
- src/lib/stores/chain-config.test.ts
- src/lib/types/account.ts
- src/lib/types/chainConfig.ts
💤 Files with no reviewable changes (1)
- src/lib/services/block/lcd.ts
✅ Files skipped from review due to trivial changes (8)
- src/lib/pages/proposal-details/components/vote-details/deposit-period/depositors-table/index.tsx
- src/lib/services/types/bank.ts
- src/lib/pages/account-details/components/tables/txs/sequencer.tsx
- src/lib/services/name/rest.ts
- src/lib/services/types/evm/codes.ts
- src/lib/components/AlertPaginationRest.tsx
- src/lib/services/types/distribution.ts
- src/lib/pages/validators/utils.ts
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Analyze (javascript)
🔇 Additional comments (277)
src/lib/app-provider/contexts/default.ts (1)
9-9
: Property renamed from lcd to rest, which aligns with the PR objective.The change from
lcd
torest
in theDEFAULT_CHAIN_CONFIG
object is consistent with the naming convention update mentioned in the PR objectives.README.md (1)
72-72
: Documentation updated to reflect the new REST API naming convention.The change maintains the same URL value while updating the property name from
lcd
torest
in the example chain configuration. This ensures the documentation accurately reflects the code.src/lib/pages/custom-network/edit/index.tsx (1)
69-69
: JSON export updated to use the new rest property name.The JSON stringification process now correctly references
chainConfig.rest
instead of the previouschainConfig.lcd
, ensuring consistency in the exported configuration files.src/lib/providers/initia-widget.tsx (1)
17-17
: Widget configuration updated to use the rest property.The
WalletWidgetProvider
configuration has been updated to usechainConfig.rest
instead ofchainConfig.lcd
, maintaining functionality while following the new naming convention.src/config/chain/devChainConfigs.ts (1)
12-12
:❓ Verification inconclusive
Property renamed from
lcd
torest
as part of naming convention update.The property name was changed but the URL value remains the same. This is consistent with the PR objective to update the naming convention from "lcd" to "rest" across the codebase.
Let's check if there are any remaining references to the old
lcd
property in the codebase:
🏁 Script executed:
#!/bin/bash # Search for any remaining references to the lcd property in chain configs echo "Searching for remaining references to 'lcd' property in TypeScript files..." rg --type ts "lcd: " -C 2Length of output: 194
Below is an updated review comment. I've added a note urging an additional manual check using a whole‐word search for
lcd
to ensure no stray references remain in the repository:
Renaming to
rest
Verified – Please Manually ReconfirmThe property in
src/config/chain/devChainConfigs.ts
(line 12) has been renamed fromlcd
torest
as intended. An initial search using a pattern matching"lcd: "
returned no results, which strongly suggests that all instances of the old property have been updated. However, since the output was minimal, please run a more comprehensive (whole-word) search forlcd
in the TypeScript files to double-check that no references remain.
- File to verify:
src/config/chain/devChainConfigs.ts
(line 12).- Action: Confirm by running a whole‐word search (e.g., using
rg --type ts '\blcd\b' -C 2
) to ensure there are absolutely no residual references tolcd
.src/lib/services/evm/rest.ts (2)
4-4
: Updated import to use the REST response schema instead of LCD.The import has been updated from
zEvmCodesByAddressResponseLcd
tozEvmCodesByAddressResponseRest
to align with the new naming convention.
20-20
: Updated schema reference from LCD to REST.The code now uses
zEvmCodesByAddressResponseRest
for parsing the response data, consistent with the import change above.src/lib/pages/contract-details/components/tables/migration/MigrationTableLite.tsx (2)
5-5
: Updated import from LCD to REST hook.The import has been changed from
useMigrationHistoriesLcd
touseMigrationHistoriesRest
as part of the naming convention update.
21-21
: Updated hook usage from LCD to REST.The component now uses
useMigrationHistoriesRest
instead ofuseMigrationHistoriesLcd
, consistent with the import change above.src/lib/pages/home/sequencer.tsx (2)
10-10
: Updated import from LCD to RESTThe import is correctly updated from
useLatestBlockLcd
touseLatestBlockRest
which aligns with the PR's objective to update naming convention from LCD to REST.
23-23
: Updated function call from LCD to RESTThe function call is properly updated to match the import change, maintaining consistency with the new naming convention.
src/lib/providers/cosmos-kit/index.tsx (1)
27-27
: Updated configuration property from LCD to RESTThe property assignment is correctly updated to use
config.rest
instead ofconfig.lcd
, maintaining consistency with the PR's objective to update naming conventions.src/lib/pages/nft-collection-details/data.ts (2)
2-2
: Updated import from LCD to RESTThe import is correctly updated from
useResourcesByAddressLcd
touseResourcesByAddressRest
which aligns with the PR's objective to update naming convention.
27-28
: Updated function call from LCD to RESTThe function call is properly updated to use the new REST-based function, maintaining consistency with the naming convention changes.
src/lib/pages/custom-network/manual/index.tsx (3)
51-51
: Updated form default value property from LCD to RESTThe property name in the form's default values is correctly changed from
lcd
torest
to align with the new naming convention.
70-70
: Updated destructured variable from LCD to RESTThe destructured property from the watch function is properly renamed from
lcd
torest
to match the changes in the default values.
114-114
: Updated validation property from LCD to RESTThe property name in the validation logic is correctly updated to
rest
, ensuring consistent naming throughout the form validation process.src/lib/pages/code-details/index.tsx (2)
33-33
: LGTM - Import statement correctly updated.The import has been properly updated from
useCodeDataLcd
touseCodeDataRest
as part of the broader LCD to REST naming convention update.
54-55
: LGTM - Variable references consistently updated.The code correctly updates both the declaration and usage of the data fetching hook from LCD to REST while maintaining the same functionality.
src/lib/services/tx/api.ts (2)
6-6
: LGTM - Type import correctly updated.Type import successfully changed from
zTxByHashResponseLcd
tozTxByHashResponseRest
as part of the naming convention update.
18-18
: LGTM - Type usage correctly updated.The function correctly uses the updated type
zTxByHashResponseRest
when parsing the API response data.src/lib/components/wallet-section/index.tsx (2)
6-6
: LGTM - Import statement correctly updated.The import has been properly updated from
useIcnsNamesByAddressLcd
touseIcnsNamesByAddressRest
.
23-23
: LGTM - Function call correctly updated.The hook usage has been successfully updated to use
useIcnsNamesByAddressRest
while maintaining the same parameters and functionality.src/lib/pages/home/lite.tsx (2)
6-6
: LGTM - Import statement correctly updated.The import has been properly updated from
useLatestBlockLcd
touseLatestBlockRest
.
17-17
: LGTM - Hook usage correctly updated.The hook usage has been successfully updated to use
useLatestBlockRest
while maintaining the same destructuring pattern.src/lib/components/modal/MoveCodeSnippet.tsx (4)
68-68
: Property renaming aligns with REST convention.The change from
lcd: lcdEndpoint
torest: restEndpoint
in the destructured chainConfig follows the updated naming convention while maintaining functionality.
129-130
: URL endpoint updated to use REST terminology.The curl command now correctly references
restEndpoint
instead of the previouslcdEndpoint
while maintaining the same API structure.
152-154
: InitiaJS client instantiation updated to use REST terminology.The variable name and endpoint reference have been updated while preserving the client initialization functionality.
181-185
: Execute function client initialization updated to REST terminology.The InitiaJS client for the execute function now correctly uses the
restEndpoint
while maintaining the same client configuration.src/lib/pages/tx-details/components/TxHeader.tsx (2)
23-23
: Hook usage updated to use REST terminology.The
useOpenTxTab
hook now uses "rest" instead of "lcd" as the parameter, maintaining consistency with the updated naming convention.
72-72
: Function call updated to use the renamed REST handler.The click handler now correctly uses
openRestTab
instead ofopenLcdTab
, consistent with the hook usage change above.src/lib/services/bank/index.ts (4)
24-24
: Import statement updated to use REST terminology.The import has been changed from
getBalancesLcd
togetBalancesRest
to align with the updated naming convention.
31-32
: Destructured property renamed to use REST terminology.The chainConfig property has been updated from
lcd
torest
while maintaining the same functionality.
35-36
: Endpoint variable assignment updated to use REST endpoint.The endpoint variable now correctly uses
restEndpoint
instead oflcdEndpoint
for non-Sei chains.
43-43
: Function call updated to use REST implementation.The function call has been updated from
getBalancesLcd
togetBalancesRest
to match the imported function.src/lib/pages/proposal/whitelist/index.tsx (2)
47-47
: Import statement updated to use REST terminology.The import has been changed from
useUploadAccessParamsLcd
touseUploadAccessParamsRest
to align with the updated naming convention.
77-77
: Hook usage updated to use REST implementation.The hook call has been updated from
useUploadAccessParamsLcd
touseUploadAccessParamsRest
to match the imported hook.src/lib/pages/account-details/components/tables/txs/lite.tsx (4)
14-14
: Consistent renaming from LCD to RESTImport correctly updated from
useTxsByAddressLcd
touseTxsByAddressRest
as part of the convention change.
43-43
: Hook usage properly updatedFunction call correctly updated from
useTxsByAddressLcd
touseTxsByAddressRest
.
79-80
: User-facing message updatedAlert message appropriately updated to reference REST instead of LCD for user clarity.
94-94
: Empty state message updatedEmpty state message correctly updated to reference REST instead of LCD to maintain consistency.
src/lib/layout/InformationFooter.tsx (2)
9-9
: Import statement updatedSuccessfully updated import from
useLatestBlockLcd
touseLatestBlockRest
to match the new naming convention.
26-26
: Hook implementation updatedFunction call correctly updated from
useLatestBlockLcd
touseLatestBlockRest
consistent with the import change.src/lib/components/modal/WasmCodeSnippet.tsx (1)
62-62
: Updated property name in destructured objectSuccessfully updated the property name from
lcd
torest
in the destructuredchainConfig
object.src/lib/pages/pools/components/pool-details/tables/pool-txs/messages/superfluid/MsgLockAndSuperfluidDelegateDetail.tsx (2)
13-13
: Updated import statementImport correctly updated from
useValidatorDataLcd
touseValidatorDataRest
as part of the naming convention change.
55-55
: Updated hook implementationFunction call correctly updated from
useValidatorDataLcd
touseValidatorDataRest
consistent with the import change.src/lib/model/contract.ts (3)
6-6
: Import updated correctly for REST endpoint usage.The import has been appropriately updated from LCD to REST endpoint, maintaining consistency with the PR objectives.
22-23
: Variable names updated correctly to reflect REST usage.The variable names have been properly renamed from
dataLcd
/isLcdLoading
todataRest
/isRestLoading
to maintain a consistent naming convention across the codebase.
27-27
: Data source reference updated correctly.The destructuring statement has been updated to reference the REST data source, ensuring proper functionality after the convention change.
src/lib/pages/contract-details/components/command-section/index.tsx (2)
4-4
: Import statement correctly updated to use REST service.The import has been properly updated from LCD to REST, maintaining consistency with the PR objectives.
22-22
: Function call updated to use REST endpoint.The component now correctly uses the REST implementation of the contract query messages hook, maintaining functional equivalence while following the new naming convention.
src/lib/pages/migrate/components/MigrateContract.tsx (2)
29-29
: Import statement correctly updated to use REST service.The import has been properly updated from LCD to REST, maintaining consistency with the PR objectives.
131-131
: Function call updated to use REST endpoint.The component now correctly uses the REST implementation of the code hook, maintaining functional equivalence while following the new naming convention.
src/lib/pages/block-details/data.ts (3)
3-4
: Import statements correctly updated to use REST services.The imports have been properly updated from LCD to REST for both block data and validator services, maintaining consistency with the PR objectives.
7-7
: Function name updated to reflect REST implementation.The exported function name has been correctly updated from
useBlockDataWithValidatorLcd
touseBlockDataWithValidatorRest
to maintain naming convention consistency.
14-16
: Function calls updated to use REST endpoints.Both function calls within the implementation have been properly updated to use the REST versions, maintaining functional equivalence while following the new naming convention.
src/lib/model/account/index.ts (2)
10-10
: Import statement correctly updated following naming convention changeThe import statement has been properly updated from
useAccountDelegationInfosLcd
touseAccountDelegationInfosRest
as part of the broader update from LCD to REST naming convention.
18-18
: Function call and variable naming consistently updatedThe function call has been correctly updated to use
useAccountDelegationInfosRest
and the variable name has been changed fromresLcd
toresRest
. The return statement has also been properly updated to reflect this change.Also applies to: 21-21
src/lib/services/nft-collection/index.ts (4)
64-64
: Chain config property and endpoint references properly updatedDestructuring property has been correctly renamed from
lcd: lcdEndpoint
torest: restEndpoint
and all references to this endpoint in the function parameters have been updated accordingly.Also applies to: 71-71, 83-83
100-100
: Endpoint references consistently updated in useNftCollectionCreator functionAll occurrences of
lcdEndpoint
have been properly changed torestEndpoint
in the query keys and function parameters for consistency with the new naming convention.Also applies to: 107-107, 123-123
173-174
: REST endpoint correctly referenced in sequencer functionThe destructuring property and all references to the endpoint in the query keys and function parameters have been updated to use
rest
andrestEndpoint
consistently.Also applies to: 177-177, 180-180
233-234
: Final endpoint references properly updatedAll remaining occurrences of
lcd
andlcdEndpoint
have been consistently changed torest
andrestEndpoint
in the useNftCollectionsByAccountAddress function.Also applies to: 241-241, 253-253
src/lib/pages/stored-codes/index.tsx (1)
22-22
: Hook import and usage correctly updatedBoth the import statement and the hook usage have been properly updated from
useUploadAccessParamsLcd
touseUploadAccessParamsRest
as part of the naming convention update. This maintains consistency across the codebase.Also applies to: 53-53
src/lib/pages/block-details/components/BlockDetailsTop.tsx (2)
34-34
: REST endpoint and function name properly updatedThe changes correctly update the destructuring property from
lcd: lcdEndpoint
torest: restEndpoint
and rename theopenLcdPage
function toopenRestPage
. The URL construction now properly uses therestEndpoint
variable.Also applies to: 37-37, 40-40
92-92
: Function call updated to match new function nameThe onClick handler has been updated to call the renamed
openRestPage
function, maintaining consistency with the naming changes.src/lib/services/nft-collection/sequencer.ts (2)
16-16
: Import updated from LCD to REST.The import has been updated to use the REST implementation instead of LCD, aligning with the new REST API approach.
31-31
: Updated fallback function to use REST implementation.The fallback mechanism has been updated to use the REST implementation, maintaining the same functionality while adhering to the new naming convention.
src/lib/pages/codes/data.ts (2)
3-3
: Updated imports from LCD to REST.Import statement has been updated to use REST implementation instead of LCD, consistent with the PR objective.
40-42
: Renamed function from useRecentCodesLcd to useRecentCodesRest.Function has been renamed and updated to use the REST implementation while maintaining the same functionality.
src/lib/pages/past-txs/lite.tsx (2)
15-15
: Updated import from LCD to REST.Import statement has been updated to use the REST implementation for transaction fetching.
68-68
: Updated function call from LCD to REST.Function call has been updated to use the REST implementation while maintaining the same parameters and functionality.
src/lib/pages/instantiate/InstantiateFormPage.tsx (2)
54-54
: Updated import from LCD to REST.Import statement has been updated to use the REST implementation for code retrieval.
200-200
: Updated function call from LCD to REST.Function call has been updated to use the REST implementation while preserving all parameters and functionality.
src/lib/components/modal/code/SaveNewCode.tsx (2)
13-13
: Import updated to reflect REST API usageThe import has been changed from
useCodeLcd
touseCodeRest
as part of the naming convention update from LCD to REST.
62-85
: Function call updated to use REST APIThe function call has been properly changed from
useCodeLcd
touseCodeRest
while maintaining the same parameter structure and callback handling.src/lib/pages/contract-details/components/InstantiateInfo.tsx (2)
14-14
: Type import updated to follow REST API naming conventionThe import type has been changed from
ContractRest
toContractRestApi
as part of the LCD to REST renaming effort.
28-28
: Type annotation updated in interfaceThe type annotation in the interface has been properly updated from
Nullable<ContractRest>
toNullable<ContractRestApi>
.src/lib/pages/block-details/components/BlockTxsTableLite.tsx (2)
3-3
: Import updated to use REST APIThe import has been changed from
useBlockDataLcd
touseBlockDataRest
as part of the naming convention update.
10-10
: Function call updated to use REST APIThe function call has been properly changed from
useBlockDataLcd
touseBlockDataRest
while maintaining the same usage pattern.src/lib/pages/proposal/store-code/index.tsx (2)
60-60
: Import updated to follow REST API naming conventionThe import has been changed from
useUploadAccessParamsLcd
touseUploadAccessParamsRest
as part of the codebase-wide renaming effort.
102-102
: Function call updated to use REST APIThe function call has been properly changed from
useUploadAccessParamsLcd
touseUploadAccessParamsRest
while preserving the same destructuring pattern and data handling.src/lib/pages/migrate/index.tsx (2)
24-24
: Import renamed from LCD to REST.The import has been correctly updated from
useUploadAccessParamsLcd
touseUploadAccessParamsRest
, aligning with the new REST API naming convention.
52-52
: Hook usage updated from LCD to REST.The hook has been properly changed from
useUploadAccessParamsLcd()
touseUploadAccessParamsRest()
to match the new REST-based implementation.src/lib/services/types/block.ts (2)
85-86
: Section title and constant renamed from LCD to REST.The section title and
zBlockLcd
constant have been appropriately renamed to reflect the REST API approach.
103-103
: Export constant renamed from LCD to REST.The
zBlockDataResponseLcd
constant has been correctly renamed tozBlockDataResponseRest
while maintaining its functionality.src/lib/pages/contract-details/components/tables/TxsTable.tsx (4)
7-7
: Import updated from LCD to REST.The import has been correctly updated to use
useTxsByContractAddressRest
instead of the LCD version.
51-59
: Hook usage and variable name updated from LCD to REST.Both the variable name and hook call have been properly renamed from LCD to REST versions while preserving all parameters and functionality.
61-61
: Variable reference updated in conditional.The conditional statement has been correctly updated to reference
resRest
instead ofresLcd
.
78-78
: Error message updated to reference REST instead of LCD.The error message has been appropriately modified to reference REST API rather than LCD, maintaining consistent terminology throughout the component.
src/lib/services/nft-collection/rest.ts (3)
4-4
: Import updated from LCD to REST.The import has been correctly updated to use
getMoveViewJsonRest
instead of the LCD version.
10-10
: Function renamed from LCD to REST.The function has been appropriately renamed from
getCollectionByCollectionAddressLcd
togetCollectionByCollectionAddressRest
while maintaining its functionality.
15-15
: Function calls updated from LCD to REST.All four function calls to
getMoveViewJsonLcd
have been correctly updated togetMoveViewJsonRest
to align with the new naming convention.Also applies to: 23-23, 31-31, 39-39
src/lib/pages/account-details/components/tables/instantiated-contracts/Lite.tsx (2)
8-8
: Update to REST API references looks good.The import has been correctly updated from
useAccountContractsLcd
touseAccountContractsRest
, aligning with the project's transition from LCD to REST naming convention.
24-24
: Function call updated correctly.The function call has been properly updated to use
useAccountContractsRest
instead ofuseAccountContractsLcd
, maintaining consistent naming convention throughout the file.src/lib/components/select-code/CodeSelect.tsx (2)
12-12
: Import path updated correctly.The import has been properly changed from
useCodeLcd
touseCodeRest
, consistent with the project's naming convention update.
34-34
: Function call updated correctly.The function call has been properly changed to use
useCodeRest
instead ofuseCodeLcd
, maintaining consistent naming throughout the component.src/lib/pages/interact/index.tsx (2)
20-20
: Import statement updated correctly.The import has been properly updated from
useModuleByAddressLcd
touseModuleByAddressRest
, consistent with the project's naming convention update.
193-193
: Function call updated consistently.The hook usage has been correctly updated to
useModuleByAddressRest
, matching the import statement change and maintaining consistency throughout the file.src/lib/pages/interact/data.ts (2)
4-4
: Import updated correctly.The import has been properly changed from
useModuleByAddressLcd
touseModuleByAddressRest
, consistent with the project's naming convention update.
23-23
: Function call updated consistently.The hook usage has been correctly updated to
useModuleByAddressRest
, matching the import statement change and maintaining consistency throughout the file.src/lib/pages/interact-contract/components/query-area/schema-query/SchemaQueryComponent.tsx (2)
28-28
: Updated import to align with new REST naming convention.The import has been updated from
useContractQueryLcd
touseContractQueryRest
to align with the new naming convention that uses "rest" instead of "lcd" across the codebase.
82-82
: Updated hook usage to useContractQueryRest.The hook usage has been updated from
useContractQueryLcd
touseContractQueryRest
, maintaining the same parameters and functionality while aligning with the new REST naming convention.src/lib/pages/interact-contract/components/query-area/JsonQuery.tsx (3)
25-27
: Updated imports to use REST-based hooks.The imports have been updated from LCD-based hooks to REST-based hooks:
useContractQueryMsgsLcd
→useContractQueryMsgsRest
useContractQueryLcd
→useContractQueryRest
This change is part of the broader naming convention update from "lcd" to "rest" across the codebase.
52-52
: Updated hook usage to useContractQueryMsgsRest.The hook usage has been updated to match the new import, changing from
useContractQueryMsgsLcd
touseContractQueryMsgsRest
while maintaining the same functionality.
64-64
: Updated hook usage to useContractQueryRest.The hook usage has been updated from
useContractQueryLcd
touseContractQueryRest
, maintaining the same parameters and functionality while following the new naming convention.src/lib/pages/validator-details/components/validator-details-body/ValidatorDetailsBodyFull.tsx (2)
22-22
: Updated staking params import to use REST-based hook.The import has been updated from
useStakingParamsLcd
touseStakingParamsRest
to align with the new naming convention.
40-40
: Updated hook usage to useStakingParamsRest.The hook usage has been updated from
useStakingParamsLcd
touseStakingParamsRest
, maintaining the same conditional parameter and functionality.src/lib/pages/validators/components/validators-table/index.tsx (2)
11-11
: Updated staking params import to use REST-based hook.The import has been updated from
useStakingParamsLcd
touseStakingParamsRest
to align with the new naming convention.
51-51
: Updated hook usage to useStakingParamsRest.The hook usage has been updated from
useStakingParamsLcd
touseStakingParamsRest
, maintaining the same conditional parameter and functionality.src/lib/services/move/resource/index.ts (4)
13-13
: Clean import path update.The import has been updated correctly from LCD to REST, aligning with the new REST-based approach.
21-26
: Function renamed properly and configuration updated.The function name has been updated from
useResourcesByAddressLcd
touseResourcesByAddressRest
, and the configuration property access has been updated fromlcd
torest
as well. This ensures consistent naming across the codebase.
30-30
: Function call updated correctly.The function call has been updated to use the new REST-based function and endpoint.
86-86
: Query key updated correctly.The query key now refers to the REST endpoint instead of the LCD endpoint, maintaining cache consistency.
src/lib/pages/deploy/index.tsx (2)
21-21
: Import statement updated correctly.The import has been updated to use the REST version of the hook instead of the LCD version.
58-58
: Hook usage updated appropriately.The hook call has been updated to use the REST version, maintaining the same functionality while aligning with the new naming convention.
src/lib/services/block/rest.ts (1)
1-17
: Good implementation of REST-based endpoints.The new REST-based functions follow the same patterns as the previous LCD implementations. The endpoints are correctly configured to use the standard Cosmos REST API paths, and proper error handling is maintained through the
parseWithError
function.These functions should be drop-in replacements for the previous LCD functions while following the REST naming convention.
src/lib/pages/account-details/index.tsx (2)
33-33
: Import updated to use REST version.The import has been updated to use the REST version of the hook instead of the LCD version.
122-122
: Hook usage updated to use REST version.The hook call has been updated consistently to use
useResourcesByAddressRest
, maintaining the same functionality.src/lib/pages/upload/upload.tsx (1)
17-17
: Naming update correctly implementedThe change from
useUploadAccessParamsLcd
touseUploadAccessParamsRest
is consistent with the PR objective of updating the naming convention from LCD to REST.Also applies to: 27-27
src/lib/pages/custom-network/manual/components/NetworkDetails.tsx (1)
111-114
: Form field successfully renamed from LCD to RESTThe form field has been correctly updated from "lcd" to "rest", including the name, label, and error reference, which is consistent with the PR objectives.
Also applies to: 120-120
src/lib/pages/proposals/components/ProposalsTableLite.tsx (1)
10-10
: Hook references successfully updatedThe hooks have been correctly renamed from LCD to REST variants, maintaining consistent parameters and usage patterns.
Also applies to: 29-35
src/lib/pages/custom-network/manual/components/WalletRegistry.tsx (4)
132-135
: Consistent renaming from lcd to rest.The variable and parameter names have been correctly updated from "lcd" to "rest" in the useWatch hook.
137-138
: Hook parameter updated consistently.The parameter passed to useAccountBech32 has been properly updated from "lcd" to "rest".
170-170
: Updated UI text reference.The subtitle text now correctly refers to "REST URL" instead of "LCD URL".
205-206
: Updated error message reference.The error message now correctly refers to "REST" instead of "LCD" as the data source.
src/lib/services/move/resource/rest.ts (3)
3-3
: Updated import to use REST naming.The import has been properly updated from zResourcesResponseLcd to zResourcesResponseRest.
11-14
: Renamed function for consistency.The function name has been updated from getAccountResourcesLcd to getAccountResourcesRest while maintaining the same parameters and return type.
27-27
: Updated schema reference.The parsing schema reference has been updated to zResourcesResponseRest.
src/lib/pages/account-details/data.ts (2)
6-10
: Updated import for REST naming convention.The import has been correctly changed from useInstantiatedContractsByAddressLcd to useInstantiatedContractsByAddressRest.
113-119
: Renamed function and updated internal call.Function has been renamed from useAccountContractsLcd to useAccountContractsRest, and its internal call updated to useInstantiatedContractsByAddressRest while maintaining the same functionality.
src/lib/pages/pools/components/pool-details/header/index.tsx (2)
22-26
: Updated endpoint variable and function names.The variable has been changed from lcdEndpoint to restEndpoint, and the function has been renamed from openPoolLcd to openPoolRest. The tracking event has also been updated to reflect this change.
52-53
: Updated onClick handler reference.The onClick handler now correctly references openPoolRest instead of openPoolLcd.
src/lib/pages/module-details/index.tsx (2)
23-23
: Properly updated import to the REST API version.The import has been successfully updated from
useModuleByAddressLcd
touseModuleByAddressRest
, maintaining the naming convention change from LCD to REST.
66-66
: Function call properly updated to use REST API.The implementation correctly uses the new
useModuleByAddressRest
hook, maintaining the same interface and destructuring pattern.src/lib/pages/validators/components/ValidatorsBodyLite.tsx (2)
4-4
: Imports successfully updated to use REST API versions.Both utility function
indexValidatorsRest
and hookuseValidatorsRest
imports have been properly updated to match the new REST naming convention.Also applies to: 6-6
32-33
: Function calls correctly updated to use REST API.Both the validator data fetching hook and the indexing function have been properly updated to their REST versions. The structure and behavior of the component remain unchanged.
src/lib/pages/codes/components/RecentCodesTableLite.tsx (3)
3-3
: Imports successfully updated to use REST API versions.Both the
useRecentCodesRest
hook andAlertPaginationRest
component imports have been properly updated to match the new REST naming convention.Also applies to: 5-5
19-19
: Data fetching hook properly updated to use REST API.The hook implementation correctly uses the new
useRecentCodesRest
function while maintaining the same destructuring pattern.
29-29
: Alert component correctly updated to use REST version.The component reference has been properly updated from
AlertPaginationLcd
toAlertPaginationRest
.src/lib/pages/block-details/lite.tsx (3)
5-5
: Imports successfully updated to use REST API versions.Both the
useLatestBlockRest
anduseBlockDataWithValidatorRest
imports have been properly updated to match the new REST naming convention.Also applies to: 9-9
12-14
: Data fetching hooks properly updated to use REST API.Both hook implementations correctly use the new REST versions while maintaining the same parameters and destructuring patterns.
20-21
: Error messages appropriately updated to reference REST instead of LCD.The error messaging has been properly updated to reference REST pruning instead of LCD pruning, maintaining consistency with the API approach change.
src/lib/pages/proposal-details/components/proposal-top/ViewProposalJson.tsx (4)
17-17
: LGTM! Correctly updated endpoint property fromlcd
torest
.The variable name change from
lcdEndpoint
torestEndpoint
properly aligns with the new REST API naming convention.
24-24
: Function renaming looks good.Consistent renaming from
openLcdPage
toopenRestPage
to match the REST API conventions.
27-27
: LGTM! Endpoint usage is correct.Using
restEndpoint
in the URL construction is consistent with the new naming convention.
45-45
: onClick handler properly updated.Now correctly uses the renamed
openRestPage
function.src/lib/pages/proposal-details/data.ts (5)
6-7
: Imports correctly updated to use REST hooks.The imports now properly reference the new REST-based hooks instead of LCD hooks.
35-38
: LGTM! Variable names and hook updated.The variable destructuring now correctly references
dataRest
andisRestLoading
from the updated REST hook.
39-40
: Deposits hook and variables properly updated.Now correctly uses
useProposalDepositsRest
with corresponding variable names.
45-50
: Data references properly updated in conditional logic.All references to LCD data variables have been correctly updated to their REST counterparts.
53-54
: Loading state variables properly updated.The loading state variable names now correctly reference the REST loading states.
src/lib/pages/code-details/components/code-info/table/CodeContractsTableLite.tsx (4)
4-4
: Alert component import correctly updated.Now importing
AlertPaginationRest
instead of the LCD variant.
7-7
: Hook import properly updated for REST.Now correctly imports
useCodeContractsRest
instead of the LCD variant.
26-26
: Hook usage updated to REST variant.The hook call has been properly updated to use the REST version.
36-36
: Alert component properly updated.Now correctly using
AlertPaginationRest
component.src/lib/pages/contract-details/components/contract-states/index.tsx (3)
14-14
: Import correctly updated to use REST API hook.Now properly imports
useContractStatesRest
instead of the LCD variant.
42-42
: Hook usage updated to REST variant.The function call has been properly updated to use the REST version.
123-123
: Error message properly updated to reference REST.The error message now correctly mentions "REST" instead of "LCD" to match the new API approach.
src/lib/hooks/useOpenTab.ts (5)
11-11
: Naming convention updated from "lcd" to "rest"The type parameter has been updated from "lcd" to "rest", aligning with the new REST API approach.
14-14
: Condition updated to check for "rest" typeConditional logic has been properly updated to maintain functionality with the new naming convention.
28-29
: Destructured property renamed from "lcd" to "rest"The destructured property from chainConfig has been correctly updated.
36-36
: URL construction updated to use restEndpointThe URL construction now correctly uses restEndpoint instead of lcdEndpoint.
39-39
: useCallback dependency updatedThe dependency array for useCallback has been properly updated to include restEndpoint.
src/lib/pages/contract-details/data.ts (9)
6-7
: Import updated to use REST-based hookImport statement has been properly updated to use the REST version of the hook.
8-12
: Additional imports updated to REST versionsAll imports in this block have been correctly updated to use their REST counterparts.
16-16
: Function renamed from useContractDataLcd to useContractDataRestThe function has been properly renamed to align with the REST naming convention.
22-27
: Function call updated to use REST versionThe useCodeRest function is now being called instead of useCodeLcd with the same parameters.
28-31
: useContractCw2InfoRest function call updatedThe call to useContractCw2InfoRest is correctly implemented with the same parameters.
32-33
: Migration histories function updated to REST versionThe useMigrationHistoriesByContractAddressRest function is now being called with the same parameters.
62-62
: Function call in useContractDataWithLocalInfos updatedUpdated to call useContractDataRest instead of useContractDataLcd.
101-101
: Function renamed from useMigrationHistoriesLcd to useMigrationHistoriesRestFunction properly renamed to align with the REST naming convention.
102-103
: Internal function call updated to REST versionThe call to useMigrationHistoriesByContractAddressRest is now being made correctly.
src/lib/services/account/rest.ts (8)
4-5
: Import statements updated to REST versionsImport statements now correctly reference REST versions of the functions and types.
11-14
: Function renamed from getAccountDataLcd to getAccountDataRestThe function has been properly renamed to align with the REST naming convention.
15-15
: Internal function call updated to use REST versionThe call to getIcnsNamesByAddressRest is now being made correctly.
25-28
: Function renamed from getAccountTypeLcd to getAccountTypeRestThe function has been properly renamed to align with the REST naming convention.
29-33
: Variable renamed and schema validation updatedThe variable has been renamed from accountTypeLcd to accountTypeRest, and the schema validation now uses zAccountTypeRest.
39-39
: Return statement updated to use new variable nameThe return statement now correctly returns accountTypeRest instead of accountTypeLcd.
42-42
: Function renamed from getAccountBech32Lcd to getAccountBech32RestThe function has been properly renamed to align with the REST naming convention.
45-45
: Schema validation updatedThe schema validation now uses zAccountBech32RestResponse instead of zAccountBech32LcdResponse.
src/lib/services/nft/rest.ts (7)
1-3
: Import statements updated to REST versionsImport statements now correctly reference REST versions of the functions and types.
8-11
: Function renamed from getNftHolderLcd to getNftHolderRestThe function has been properly renamed to align with the REST naming convention.
12-19
: Internal function call updated to use REST versionThe call to getMoveViewJsonRest is now being made correctly with the same parameters.
21-21
: Function renamed from getNftInfoLcd to getNftInfoRestThe function has been properly renamed to align with the REST naming convention.
22-29
: Internal function call updated and schema validation updatedThe call to getMoveViewJsonRest is correctly implemented, and the schema validation now uses zNftInfoRest.
31-34
: Function renamed from getNftByNftAddressLcd to getNftByNftAddressRestThe function has been properly renamed to align with the REST naming convention.
36-37
: Internal function calls updated to use REST versionsThe calls to getNftHolderRest and getNftInfoRest are now being made correctly.
src/lib/services/nft/index.ts (1)
32-32
: Naming convention updated from 'lcd' to 'rest' consistentlyThe renaming follows the PR objective to transition from "lcd" to "rest" terminology throughout the codebase. All references have been consistently updated in imports, variables, function names, query keys, and API calls.
Also applies to: 50-50, 62-62, 107-107, 117-117, 125-125, 140-140, 143-145, 159-159, 166-166, 177-177, 222-222, 226-228, 321-321, 327-327, 333-337
src/lib/services/distribution/rest.ts (1)
4-5
: API response types and function names properly updated to follow 'rest' conventionThe changes consistently rename functions and response types from "Lcd" to "Rest" terminology while maintaining the same functionality.
Also applies to: 10-10, 18-18, 20-20, 29-29
src/lib/pages/code-details/data.ts (1)
5-5
: Code query functions updated to use REST endpointsThe hooks for fetching code data and contracts have been systematically updated from "Lcd" to "Rest" naming convention, reflecting the shift to using REST endpoints instead of LCD endpoints.
Also applies to: 8-8, 12-13, 59-59, 61-61
src/lib/model/account/rest.ts (1)
6-7
: Account delegation hooks updated to use REST endpointsAll delegation-related hooks and functions have been consistently updated to use REST counterparts instead of LCD versions, maintaining the same functionality while aligning with the new naming standard.
Also applies to: 11-14, 16-16, 36-36, 55-69
src/lib/pages/custom-network/types.ts (6)
6-6
: LGTM! Proper import update.The import statement for
getAccountBech32Rest
is correctly updated to use the new REST-based function fromlib/services/account/rest
.
71-71
: LGTM! Consistent property rename.The property name in the
zNetworkDetails
schema has been properly updated fromlcd
torest
.
357-358
: LGTM! Transform parameters and output updated.The parameters in the transformation function and the corresponding output structure have been consistently updated from
lcd
torest
.Also applies to: 379-380
445-446
: LGTM! Schema field updated.The field in the
zAddNetworkJsonChainConfigJson
schema has been properly updated fromlcd
torest
.
479-480
: LGTM! Schema field updated.The field in the
zAddNetworkLinkChainConfigJson
schema has been properly updated fromlcd
torest
.
496-498
: LGTM! Function call and output structure updated.The function call has been updated from
getAccountBech32Lcd
togetAccountBech32Rest
and the corresponding field in the returned object is also updated.Also applies to: 505-506
src/lib/services/types/account.ts (3)
5-6
: LGTM! Import renamed.The import has been correctly updated from
AccountTypeLcd
toAccountTypeRest
to align with the new naming convention.
38-44
: LGTM! Constant and type reference updated.The exported constant
zAccountTypeLcd
has been properly renamed tozAccountTypeRest
, and the corresponding type reference inside has been updated as well.
52-60
: LGTM! Schema and type name updated.The exported constant
zAccountBech32LcdResponse
and its corresponding type have been properly updated to use the "rest" naming convention.src/lib/services/move/module/rest.ts (4)
5-8
: LGTM! Schema imports updated.The schema imports have been properly updated from LCD to REST variations.
12-22
: LGTM! Function name and schema usage updated.The function
getModuleByAddressLcd
has been properly renamed togetModuleByAddressRest
and the schema usage within has been updated accordingly.
23-50
: LGTM! Function and schema usage updated.The function
getModulesByAddressLcd
has been properly renamed togetModulesByAddressRest
and the schema usage within has been updated accordingly.
52-69
: LGTM! Function and schema usage updated.The function
getMoveViewJsonLcd
has been properly renamed togetMoveViewJsonRest
and the schema usage within has been updated accordingly.src/lib/pages/validator-details/components/validator-details-body/ValidatorDetailsBodyLite.tsx (4)
13-13
: LGTM! Utility import updated.The import of the utility function has been properly updated from
indexValidatorsLcd
toindexValidatorsRest
.
16-19
: LGTM! Hook imports updated.The imports of the hooks have been properly updated to use the REST-based versions.
27-28
: LGTM! Hook usage updated.The usage of
useValidatorsLcd
has been properly updated touseValidatorsRest
and the corresponding utility function call has been updated as well.
52-54
: LGTM! Hook usages updated.The usages of
useStakingParamsLcd
anduseDelegationsByAddressLcd
have been properly updated to their REST-based counterparts.src/lib/services/distribution/index.ts (1)
11-14
: Properly implemented REST endpoint refactoring.All LCD-related references have been consistently updated to use REST endpoints. The refactoring includes import statements, function names, query keys, and endpoint references.
Also applies to: 16-37, 39-63
src/lib/services/evm/index.ts (1)
14-18
: Clean refactoring from LCD to REST endpoints.The implementation consistently updates all references from LCD to REST endpoints across imports, endpoint variables, query keys, and function calls while maintaining the same functionality.
Also applies to: 22-35, 46-60, 62-83
src/lib/services/move/module/index.ts (1)
50-50
:❓ Verification inconclusive
REST endpoint implementation is complete with minor inconsistencies.
While most of the refactoring from LCD to REST is properly implemented, there are a couple of query keys that don't follow the new naming convention:
- Line 95:
CELATONE_QUERY_KEYS.MODULES_BY_ADDRESS
doesn't include a_REST
suffix- Line 216:
CELATONE_QUERY_KEYS.SCRIPT_DECODE
doesn't include a_REST
suffixThese might be intentional if these query keys were already neutral (not specifically LCD), but it's worth checking for consistency.
Also applies to: 52-77, 79-109, 111-149, 151-188, 190-220
🏁 Script executed:
#!/bin/bash # Check if these are actually different from other keys in the codebase rg --type=typescript "CELATONE_QUERY_KEYS\.\w+_REST" -l | head -5 rg --type=typescript "CELATONE_QUERY_KEYS\.MODULES_BY_ADDRESS" -A 2 -B 2 rg --type=typescript "CELATONE_QUERY_KEYS\.SCRIPT_DECODE" -A 2 -B 2Length of output: 317
Naming Verification: Please review REST query key conventions
The REST endpoint implementation appears complete, but there are minor inconsistencies that warrant a closer look:
- Line 95:
CELATONE_QUERY_KEYS.MODULES_BY_ADDRESS
is missing the_REST
suffix.- Line 216:
CELATONE_QUERY_KEYS.SCRIPT_DECODE
is also missing the_REST
suffix.If these keys were intentionally defined as neutral (i.e., not specifically tied to LCD), please ensure that this design decision is consistently applied across similar parts of the codebase (e.g., lines 52–77, 79–109, 111–149, 151–188, 190–220). Otherwise, consider renaming these keys to include
_REST
for full consistency with the new naming convention.src/lib/services/name/index.ts (1)
1-86
: Successfully updated ICNS name service to use REST endpoints.All references to LCD have been properly changed to REST throughout the file, including import statements, function names, endpoint references, query keys, and function calls.
src/lib/services/block/index.ts (14)
20-20
: Consistent import of REST-based methods.The new import for
getBlockDataRest
andgetLatestBlockRest
aligns with the REST transition and appears correct.
54-54
: New hook for REST-based block queries.This hook follows established query patterns and properly enables/disables fetching. Great job ensuring consistent naming with the existing codebase.
56-56
: Naming alignment confirmed.Renaming from
lcdEndpoint
torestEndpoint
is clear and consistent across the file.
65-65
: Query key updated for REST.This query key name is in line with the rest-based approach. No issues here.
68-68
: Asynchronous call uses REST endpoint.Ensure you’re appropriately handling potential exceptions within
getBlockDataRest
(e.g., network failures).
92-92
: Introduction ofuseLatestBlockRest
.Naming is clear and consistent with the newly adopted REST paradigm.
94-94
: Chain config destructuring for REST.Well done switching from
lcdEndpoint
torestEndpoint
in line with the rename initiative.
98-99
: Latest block query key and fetch function updated.This properly references the new
REST
query key andgetLatestBlockRest
.
110-110
: REST endpoint usage inuseBlocksSequencer
.Renaming suggests a seamless transition from LCD to REST. No concerns found.
114-115
: Infinite query for blocks with REST.Implementation looks consistent with other infinite queries in the file. No issues spotted.
130-130
:useBlockTimeAverageSequencer
config updated.The rest endpoint references are properly updated here. No further feedback.
134-135
: REST-based block time average query.Query key and fetch method are correctly switched to REST nomenclature.
145-145
: Renamed chain config for sequencer.No functional issues; consistent usage of
restEndpoint
.
149-150
: Block data sequencer with REST.Properly updated query key and fetch call. Implementation is coherent with the rest of the changes.
src/lib/services/tx/rest.ts (4)
4-6
: Zod schemas updated for REST responses.Renaming the response schemas to REST clarifies their new purpose. No issues here.
11-14
:getTxDataRest
: Properly returning parsed data.This function closely mirrors the old LCD-based approach but uses
zTxByHashResponseRest
. Ensuring robust error handling insideparseWithError
is good practice.
16-19
:getTxsByHashRest
with REST API fetch.Implementation is aligned with
axios
usage for other calls. Parsing with a REST-specific schema is correct.
54-85
:getTxsByAccountAddressRest
: REST-based fallback logic.Mirrors the same strategy used for contract addresses. The code is consistent with the naming changes and has clear error messages if neither call succeeds.
src/lib/services/tx/index.ts (13)
60-63
: Importing newly introduced REST functions.These imports properly phase out the old LCD references. No issues found.
79-80
: DestructuringrestEndpoint
foruseTxData
.Switching to
restEndpoint
ensures consistent usage of REST-based data fetching whenisFullTier
is false.
84-84
: Fallback to REST endpoint.This fallback, deciding between
apiEndpoint
andrestEndpoint
, matches the logic used throughout the codebase.
92-92
:getTxDataRest
usage within the query function.Correctly references the newly imported function and passes in
endpoint, hash
. Ensureretry
or error capturing if the REST call fails.
324-349
:useTxsByContractAddressRest
Hook.
- The naming and returned shape match the REST approach.
- The callback transforms transaction sender addresses, preserving existing logic.
- Query keys are updated to their REST-based equivalents.
Looks good overall.
355-355
: Query key for contract address REST.This further cements the naming convention from LCD to REST. No concerns.
365-415
:useTxsByAddressRest
Hook.This hook:
- Differentiates between searching by tx hash vs. regular address queries.
- Throws explicit errors if the search or address does not match.
- Correctly calls
getTxsByHashRest
orgetTxsByAccountAddressRest
as needed.
All logic is consistent with the old LCD approach.
419-420
: REST query key for address-based transactions.Proper usage of
CELATONE_QUERY_KEYS.TXS_BY_ADDRESS_REST
and the newrestEndpoint
.
433-445
:useTxsSequencer
with REST.Successfully updated endpoint references and query key. No issues spotted.
472-478
:useTxsCountSequencer
: adopting REST references.Implementation stays consistent with other fetch patterns (no window focus refetch, single retry). Looks good.
507-545
:useTxsByAddressSequencer
: fallback to REST endpoint.This leverages the new
getTxsByHashSequencer
andgetTxsByAccountAddressSequencer
with REST-based configuration. The approach is consistent with the code’s logic for searching by hash vs. address.
587-608
:useTxsByAddressPaginationSequencer
: adjusting torestEndpoint
.Pagination logic remains identical; you just replaced LCD references with REST references.
621-635
:useTxsByBlockHeightSequencer
: referencing REST.Switching calls to
getTxsByBlockHeightSequencer(restEndpoint, height)
is aligned with the transition. No new concerns.src/lib/services/account/index.ts (9)
6-6
: Replacing LCD-specific response type with REST.This rename improves clarity and matches the new endpoint strategy.
22-25
: Importing REST-based account utilities.These function imports fully replace the old LCD references, aligning with the naming convention changes throughout the codebase.
33-34
: Chain config referencingrestEndpoint
.Maintains consistent naming across the application. No issues.
35-36
: Determining the endpoint foruseAccountData
.Switching to
restEndpoint
ifisFullTier
is false ensures backward compatibility for full-tier usage.
42-42
: Falling back togetAccountDataRest
.Explicitly calling the REST version is correct when
isFullTier
is not enabled.
78-79
: UsingrestEndpoint
inuseAccountType
.Correctly references the REST-based endpoint while preserving logic for full-tier calls.
89-90
: CallinggetAccountTypeRest
for non-full-tier flows.Maintains consistent usage of the newly imported function. Nicely done.
93-94
: Query key updated for account type with REST.Use of
[CELATONE_QUERY_KEYS.ACCOUNT_TYPE, apiEndpoint, restEndpoint, address]
is consistent with the codebase’s renamed keys.
103-114
:useAccountBech32
with REST.Drawing on the new
getAccountBech32Rest
aligns with the refactor. The error handling and query config mirror the typical React Query pattern.src/lib/services/proposal/index.ts (1)
7-9
: Consistent renaming from "lcd" to "rest"The changes correctly implement the transition from LCD (Light Client Daemon) to REST naming conventions while maintaining the same functionality.
Also applies to: 47-52, 58-59, 63-63, 117-126, 198-206, 214-222, 234-239
src/lib/services/searchService.ts (2)
26-40
: Properly updated import statements from LCD to RESTAll import statements have been correctly updated to use the new REST-based function names.
134-144
: Correctly refactored function calls to use REST variantsAll function calls and variable names have been properly updated to maintain consistency with the new REST naming convention.
Also applies to: 156-157, 185-193, 201-206, 246-252, 263-277, 287-293
src/lib/services/staking/index.ts (1)
13-17
: Successfully migrated staking service to use REST endpointsAll imports, function names, query keys, and endpoint variables have been consistently renamed from LCD to REST while preserving functionality.
Also applies to: 19-33, 35-52, 54-71, 73-90
src/lib/services/staking/rest.ts (1)
4-11
: Complete transition of schema names and function signatures to REST conventionAll schema validators and function implementations have been correctly renamed from LCD to REST while maintaining the same behavior and endpoint access patterns.
Also applies to: 17-22, 24-34, 36-54, 56-74, 76-79, 81-90, 92-97, 99-107
src/lib/services/proposal/rest.ts (7)
4-6
: Type imports correctly updated to reflect the REST API naming convention.The types have been consistently renamed from
*ResponseLcd
to*ResponseRest
, maintaining the same structure while adapting to the new naming convention.
8-13
: Schema imports properly updated to REST nomenclature.All Zod schema imports have been consistently updated from
z*ResponseLcd
toz*ResponseRest
, ensuring type validation remains intact while following the new naming convention.
24-29
: Function renamed correctly with consistent implementation.The function has been renamed from
getProposalParamsLcd
togetProposalParamsRest
while maintaining the same functionality. The response parsing has been updated to use the renamed schema.
31-47
: Function and return type properly updated to REST naming convention.The function has been renamed from
getProposalsLcd
togetProposalsRest
with its return type updated toProposalsResponseRest
. The implementation remains consistent with the original functionality.
49-57
: Proposal data function and return type correctly renamed.The function signature, return type, and schema usage have all been properly updated to use the new REST naming convention while preserving functionality.
59-81
: Deposit function updated with consistent naming.The function
getProposalDepositsRest
(formerlygetProposalDepositsLcd
) has been appropriately renamed, and the schema usage within has been updated tozProposalDepositsResponseRest
.
83-97
: Votes info function and schema usage properly renamed.The function and schema parsing have been consistently updated to use the REST naming pattern, maintaining the same behavior as before.
src/lib/app-provider/env.ts (13)
17-17
: Query key renamed from LCD to REST.The constant has been appropriately renamed from
ACCOUNT_BECH_32_LCD
toACCOUNT_BECH_32_REST
as part of the broader naming convention change.
23-23
: Block data query key renamed to follow REST convention.Constant has been updated from
BLOCK_DATA_LCD
toBLOCK_DATA_REST
.
26-26
: Block height query key renamed to REST.The block height query key has been properly updated to use the REST naming pattern.
31-31
: Code-related query keys updated to REST convention.Both
CODES_REST
andCODE_DATA_REST
have been consistently renamed from their LCD counterparts.Also applies to: 36-36
41-42
: Contract-related query keys updated to REST convention.All contract-related query keys have been consistently renamed to use REST nomenclature. Additionally, line 53 includes a new constant
CONTRACT_CW2_INFO_REST
that follows the new naming pattern.Also applies to: 44-44, 47-47, 52-53
55-60
: Staking-related query keys updated to follow REST naming.All staking-related query keys have been properly renamed to use the REST suffix, maintaining consistency across the codebase.
64-66
: Validator query keys renamed to REST convention.Validator-related query keys have been consistently updated to follow the REST naming pattern.
80-82
: Governance-related query keys updated to REST convention.All proposal and governance-related query keys have been properly renamed to follow the REST naming pattern.
Also applies to: 89-89, 92-92
106-106
: Transaction query keys updated to REST convention.Transaction-related query keys have been consistently renamed to follow the REST naming pattern.
Also applies to: 109-109
115-116
: ICNS-related query keys renamed to follow REST convention.ICNS name and address query keys have been properly updated to use the REST suffix.
131-131
: Module query key updated to REST convention.The module-related query key has been consistently renamed to follow the REST naming pattern.
141-142
: EVM-related query keys updated to REST convention.EVM parameters and code-related query keys have been consistently renamed to follow the REST naming pattern.
161-161
: NFT query key renamed to follow REST convention.The NFT-related query key has been properly updated to use the REST suffix.
efe5d49
to
e1035f2
Compare
Summary by CodeRabbit