Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat: Add search txn hash #1408

Merged

Conversation

Hemanthghs
Copy link
Collaborator

@Hemanthghs Hemanthghs commented Sep 2, 2024

Summary by CodeRabbit

  • New Features

    • Introduced a search functionality for blockchain transactions by hash, improving user experience.
    • Added support for displaying chain names in transaction status components, enhancing transaction context.
    • Implemented pagination for transaction history, allowing users to navigate large datasets more easily.
    • Added loading indicators for transaction data retrieval, improving feedback during data fetching.
  • Bug Fixes

    • Enhanced error handling for transaction retrieval, ensuring more informative user messages.
  • Documentation

    • Updated documentation to reflect new message types and transaction handling improvements.
  • Style

    • Improved styling for pagination and loading components, ensuring a consistent user interface.
  • Chores

    • Refactored code for better readability and maintainability across various components.

Copy link

vercel bot commented Sep 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
resolute ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 2, 2024 10:23am

Copy link
Contributor

coderabbitai bot commented Sep 2, 2024

Walkthrough

The changes involve enhancements across multiple components and utilities within the frontend application. Key modifications include the addition of new props, such as chainName, to improve transaction status displays, the introduction of new components for searching transactions, and the implementation of pagination in transaction history. Additionally, new utility functions and constants related to transaction handling and error messaging have been added, expanding the application's capabilities for managing blockchain transactions.

Changes

Files Change Summary
frontend/src/app/(routes)/cosmwasm/components/tx-status/DialogTxExecuteStatus.tsx
frontend/src/app/(routes)/cosmwasm/components/tx-status/DialogTxInstantiateStatus.tsx
frontend/src/app/(routes)/cosmwasm/components/tx-status/DialogTxUploadCodeStatus.tsx
Enhanced data retrieval from getChainInfo to include chainName, which is passed to the TxnStatus component for improved transaction status display.
frontend/src/app/(routes)/transactions/history/SearchTransaction.tsx Introduced a new component for searching transactions by hash, managing state and displaying results or errors based on user input.
frontend/src/app/(routes)/transactions/history/[network]/components/SearchTransactionHash.tsx Added an optional handleClearSearch prop for clearing search input, enhancing user experience.
frontend/src/app/(routes)/transactions/history/[network]/components/Transaction.tsx Added isSearchPage prop for conditional rendering, expanded destructuring for improved URL handling.
frontend/src/app/(routes)/transactions/history/[network]/components/TransactionCard.tsx Removed getTypeURLName import, replaced with formattedMsgType, and improved styling for user interaction.
frontend/src/app/(routes)/transactions/history/[network]/components/TransactionHeader.tsx Updated props to include navigation-related properties and improved rendering logic for the "Go back" button and Mintscan link.
frontend/src/app/(routes)/transactions/history/[network]/components/TransactionHistoryDashboard.tsx Introduced pagination functionality to manage transaction history display, including loading states and pagination controls.
frontend/src/app/(routes)/transactions/history/loaders/TxnsLoading.tsx Created a new loading component for transaction data, featuring animated placeholders for better user feedback.
frontend/src/utils/constants.ts Added new constants for message types related to fee granting functionality.
frontend/src/utils/errors.ts Introduced a new error constant for transaction retrieval failures.
frontend/src/utils/util.ts Added a new utility function for generating transaction URLs based on chain name and hash.
frontend/src/store/features/recent-transactions/recentTransactionsService.tsx Introduced a new function for fetching transactions across any chain and updated existing functions for consistency.
frontend/src/store/features/recent-transactions/recentTransactionsSlice.tsx Added a new thunk for fetching transactions from any chain, enhancing error handling and state management.
frontend/src/txns/authz/revoke.ts Changed visibility of msgAuthzRevokeTypeUrl constant to be exported.
frontend/src/txns/feegrant/revoke.ts Changed visibility of revokeTypeUrl constant to be exported.
frontend/src/components/NewTxnMsg.tsx Enhanced message rendering logic to accommodate new message types for transaction handling.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant SearchTransaction
    participant TransactionHistoryDashboard
    participant TxnsLoading

    User->>SearchTransaction: Input transaction hash
    SearchTransaction->>TxnsLoading: Show loading state
    TxnsLoading-->>SearchTransaction: Loading complete
    SearchTransaction->>TransactionHistoryDashboard: Fetch transaction details
    TransactionHistoryDashboard-->>User: Display transaction details
Loading

🐰 In a world of blocks and chains,
I hop through data, never in vain.
With new paths to explore,
Transactions galore!
Hooray for changes, let’s celebrate,
A bouncy future, oh, it’s great! 🎉


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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.
Early access features: disabled

We are currently testing the following features in early access:

  • Anthropic claude-3-5-sonnet for code reviews: Anthropic claims that the new Claude model has stronger code understanding and code generation capabilities than their previous models. Note: Our default code review model was also updated late last week. Please compare the quality of the reviews between the two models by toggling the early access feature.

Note:

  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.
  • Please join our Discord Community to provide feedback and report issues on the discussion post.

@Hemanthghs
Copy link
Collaborator Author

@coderabbitai review

Copy link
Contributor

coderabbitai bot commented Sep 2, 2024

Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Outside diff range, codebase verification and nitpick comments (5)
frontend/src/app/(routes)/transactions/history/[network]/components/TransactionHeader.tsx (1)

71-87: LGTM!

The conditional rendering of the Mintscan link based on mintscanURL is appropriate, and using the Link component provides a consistent navigation mechanism.

Consider adding rel="noopener noreferrer" to the Link component to improve security when opening external links:

<Link
  className="flex items-end gap-1"
  href={mintscanURL}
  target="_blank"
+ rel="noopener noreferrer"
>
frontend/src/app/(routes)/transactions/history/SearchTransaction.tsx (3)

11-82: The SearchTransaction component looks good overall, but there are a few areas that can be improved:

  • Consider splitting the component into smaller sub-components for better readability and maintainability. For example, you can extract the search form and the transaction details into separate components.
  • Improve the loading state by using a more descriptive message or a skeleton loader to provide a better user experience.
  • Improve the error handling by displaying a more user-friendly error message instead of just saying "Sorry, the transaction you're looking for is not found."

86-100: The TransactionNotFound component looks good, but the error message can be improved.

Consider providing more context and guidance to the user in the error message. For example:

-<p className="text-h2 font-bold w-fit mx-auto">
-  Sorry, the transaction you&apos;re looking for is not found.
-</p>
+<p className="text-h2 font-bold w-fit mx-auto">
+  The transaction you searched for could not be found. Please check the transaction hash and try again.
+</p>

1-100: Improve accessibility by adding ARIA attributes and roles.

To enhance the accessibility of the component for users with assistive technologies, consider adding appropriate ARIA attributes and roles. For example:

  • Add aria-label or aria-labelledby to the search form to provide a clear label for screen reader users.
  • Add role="search" to the search form to indicate its purpose.
  • Add aria-live="polite" to the loading spinner or error message container to announce the status updates to screen reader users.

Here's an example of how you can add ARIA attributes to the search form:

-<form onSubmit={onSearch} className="flex gap-6 items-center">
+<form
+  onSubmit={onSearch}
+  className="flex gap-6 items-center"
+  aria-label="Search transaction by hash"
+  role="search"
+>
frontend/src/components/txn-status-popups/TransactionStatusPopup.tsx (1)

11-11: Incomplete Transition from getTxnURL to getTxnURLOnResolute.

The getTxnURLOnResolute function is being used in the codebase, but the old getTxnURL function is still present and used in multiple files. This indicates that the transition is not complete. Consider reviewing the usage of both functions and refactoring if the goal is to fully replace getTxnURL with getTxnURLOnResolute.

  • getTxnURLOnResolute is used in:

    • frontend/src/components/txn-status-popups/TransactionStatusPopup.tsx
    • frontend/src/components/txn-status-popups/TxnStatus.tsx
  • getTxnURL is still used in:

    • frontend/src/components/txn-status-popups/TransactionStatusPopup.tsx
    • frontend/src/components/txn-status-popups/TxnStatus.tsx
    • frontend/src/app/(routes)/transactions/history/[network]/components/Transaction.tsx
Analysis chain

Verify the usage of the new getTxnURLOnResolute function.

Ensure that the new function is being used correctly and consistently throughout the component. Also, verify that the old getTxnURL function is no longer being used.

Run the following script to verify the function usage:

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of the new `getTxnURLOnResolute` function and the removal of the old `getTxnURL` function.

# Test 1: Search for the usage of the new function. Expect: At least one occurrence.
rg --type typescript -A 5 $'getTxnURLOnResolute'

# Test 2: Search for the usage of the old function. Expect: No occurrences.
rg --type typescript -A 5 $'getTxnURL'

Length of output: 155


Script:

#!/bin/bash
# Description: Verify the usage of the new `getTxnURLOnResolute` function and the removal of the old `getTxnURL` function.

# Test 1: Search for the usage of the new function. Expect: At least one occurrence.
rg --type ts -A 5 $'getTxnURLOnResolute'

# Test 2: Search for the usage of the old function. Expect: No occurrences.
rg --type ts -A 5 $'getTxnURL'

Length of output: 8292

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 50ed1dc and b1377d0.

Files selected for processing (24)
  • frontend/src/app/(routes)/cosmwasm/components/tx-status/DialogTxExecuteStatus.tsx (2 hunks)
  • frontend/src/app/(routes)/cosmwasm/components/tx-status/DialogTxInstantiateStatus.tsx (2 hunks)
  • frontend/src/app/(routes)/cosmwasm/components/tx-status/DialogTxUploadCodeStatus.tsx (2 hunks)
  • frontend/src/app/(routes)/transactions/history/SearchTransaction.tsx (1 hunks)
  • frontend/src/app/(routes)/transactions/history/[network]/components/SearchTransactionHash.tsx (1 hunks)
  • frontend/src/app/(routes)/transactions/history/[network]/components/Transaction.tsx (4 hunks)
  • frontend/src/app/(routes)/transactions/history/[network]/components/TransactionCard.tsx (3 hunks)
  • frontend/src/app/(routes)/transactions/history/[network]/components/TransactionHeader.tsx (3 hunks)
  • frontend/src/app/(routes)/transactions/history/[network]/components/TransactionHistoryDashboard.tsx (4 hunks)
  • frontend/src/app/(routes)/transactions/history/[network]/components/TxMsg.tsx (1 hunks)
  • frontend/src/app/(routes)/transactions/history/loaders/TxnsLoading.tsx (1 hunks)
  • frontend/src/app/(routes)/transactions/history/page.tsx (1 hunks)
  • frontend/src/components/NewTxnMsg.tsx (1 hunks)
  • frontend/src/components/txn-status-popups/TransactionStatusPopup.tsx (3 hunks)
  • frontend/src/components/txn-status-popups/TxnStatus.tsx (3 hunks)
  • frontend/src/store/features/recent-transactions/recentTransactionsService.tsx (2 hunks)
  • frontend/src/store/features/recent-transactions/recentTransactionsSlice.tsx (8 hunks)
  • frontend/src/txns/authz/revoke.ts (1 hunks)
  • frontend/src/txns/feegrant/revoke.ts (1 hunks)
  • frontend/src/utils/commonStyles.ts (2 hunks)
  • frontend/src/utils/constants.ts (1 hunks)
  • frontend/src/utils/errors.ts (1 hunks)
  • frontend/src/utils/transaction.ts (2 hunks)
  • frontend/src/utils/util.ts (1 hunks)
Files skipped from review due to trivial changes (2)
  • frontend/src/app/(routes)/transactions/history/[network]/components/TxMsg.tsx
  • frontend/src/app/(routes)/transactions/history/loaders/TxnsLoading.tsx
Additional comments not posted (70)
frontend/src/txns/feegrant/revoke.ts (1)

3-3: LGTM!

Exporting the revokeTypeUrl constant is a good practice for code reusability. It doesn't affect the existing functionality.

frontend/src/txns/authz/revoke.ts (1)

3-3: LGTM!

Exporting the msgAuthzRevokeTypeUrl constant is a good change as it allows the constant to be used in other modules if needed. The assigned string value is also valid and follows the expected format for a message type URL.

frontend/src/components/txn-status-popups/TxnStatus.tsx (4)

3-3: LGTM!

The import statement change is approved.


12-12: LGTM!

The component prop change is approved.


17-17: LGTM!

The component prop type change is approved.


31-31: Verify the getTxnURLOnResolute function implementation.

Ensure that the getTxnURLOnResolute function is correctly implemented and returns the expected transaction URL based on the provided chainName and txHash.

Run the following script to verify the function implementation:

If the verification passes, the Link component change is approved.

Verification successful

The getTxnURLOnResolute function is correctly implemented.

The function constructs a transaction URL using the chainName and hash parameters, and its usage in the Link component is appropriate. The change is valid and aligns with the intended functionality.

  • frontend/src/utils/util.ts: Definition of getTxnURLOnResolute.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the `getTxnURLOnResolute` function implementation.

# Test: Search for the function implementation. Expect: A correct implementation that returns the expected transaction URL.
ast-grep --lang typescript --pattern $'function getTxnURLOnResolute($_: string, $_: string) {
  $$$
}'

Length of output: 103


Script:

#!/bin/bash
# Search for any occurrences of `getTxnURLOnResolute` in the codebase to identify its definition or import.
rg 'getTxnURLOnResolute' -A 5

Length of output: 2740

frontend/src/app/(routes)/transactions/history/[network]/components/SearchTransactionHash.tsx (4)

7-7: LGTM!

The new optional prop handleClearSearch is correctly typed and named.


17-35: LGTM!

The changes to the component's return structure to include a conditionally rendered clear button are implemented correctly:

  • The button is correctly conditionally rendered based on the presence of searchQuery and handleClearSearch.
  • The onClick handler correctly invokes the handleClearSearch prop when clicked.
  • The button's text content and CSS classes are appropriate.

11-11: LGTM!

The type declaration for the new handleClearSearch prop is correctly added to the component's props type.


41-41: LGTM!

The component is correctly exported as the default export.

frontend/src/app/(routes)/transactions/history/page.tsx (2)

23-34: LGTM!

The code changes in this segment align with the AI-generated summary and seem to be implemented correctly. The conditional rendering logic based on isWalletConnected is clear and the props passed to the EmptyScreen component are appropriate.


6-7: LGTM!

The import statements are necessary for the code changes in the file and do not introduce any issues.

frontend/src/store/features/recent-transactions/recentTransactionsService.tsx (4)

17-18: LGTM!

The code changes are approved.


20-20: LGTM!

The code changes are approved.


58-59: LGTM!

The code changes are approved.


64-65: LGTM!

The code changes are approved.

frontend/src/utils/errors.ts (1)

36-36: LGTM!

The new constant ERR_TXN_NOT_FOUND is properly defined and exported. The error message is clear and concise.

frontend/src/app/(routes)/transactions/history/[network]/components/TransactionCard.tsx (4)

3-3: LGTM!

The removal of the unused getTypeURLName function from the import statement is approved.


7-7: LGTM!

The addition of the buildMessages and formattedMsgType functions to the import statement is approved.


42-42: LGTM!

The addition of the hover:underline class to the Link component is approved. This change improves the user experience by providing a visual cue when hovering over the link.


53-53: LGTM!

The replacement of the getTypeURLName function with the formattedMsgType function in the JSX rendering section is approved. This change streamlines the functionality by consolidating the message formatting logic.

frontend/src/utils/commonStyles.ts (2)

77-77: LGTM!

The change is a minor formatting update to add a trailing comma after the fontSize property. It aligns with the formatting style used in the rest of the file and does not affect the functionality.


98-120: LGTM!

The new constant paginationComponentStyles defines styles for pagination components, enhancing their visual presentation and ensuring consistency with the overall theme of the application. The styles are well-structured, follow the existing naming conventions and formatting style, and do not introduce any apparent issues or inconsistencies.

frontend/src/app/(routes)/transactions/history/[network]/components/TransactionHeader.tsx (3)

15-17: LGTM!

The new properties added to the TransactionHeaderProps interface are appropriate and well-typed.


35-39: LGTM!

The changes related to the "Go back" link improve the navigation experience and provide more flexibility in the UI.


63-70: LGTM!

The conditional rendering of the "Repeat Transaction" button based on isSearchPage is appropriate.

frontend/src/app/(routes)/cosmwasm/components/tx-status/DialogTxExecuteStatus.tsx (3)

16-16: LGTM!

The code changes are approved.


57-61: LGTM!

The code changes are approved.


69-69: LGTM!

The code changes are approved.

frontend/src/app/(routes)/transactions/history/SearchTransaction.tsx (2)

1-9: Imports look good.

The component imports all the necessary dependencies, including custom hooks, Redux slices, types, utils, and child components.


1-100: Verify the security of the getAnyChainTransaction Redux action and the backend API.

Although the component itself does not have any apparent security vulnerabilities, it's important to ensure that the getAnyChainTransaction Redux action and the backend API it interacts with are properly secured and validated.

Please confirm that:

  • The getAnyChainTransaction Redux action properly validates and sanitizes the txhash parameter before sending it to the backend API.
  • The backend API endpoint for fetching transaction data is properly secured and validates the input to prevent potential attacks like SQL injection or XSS.
frontend/src/app/(routes)/transactions/history/[network]/components/TransactionHistoryDashboard.tsx (5)

10-12: LGTM!

The code changes are approved.


14-14: LGTM!

The code changes are approved.


Line range hint 21-40: LGTM!

The code changes are approved.


49-53: LGTM!

The code changes are approved.


Line range hint 55-96: LGTM!

The code changes are approved.

frontend/src/app/(routes)/cosmwasm/components/tx-status/DialogTxUploadCodeStatus.tsx (2)

16-16: LGTM!

The code change is approved. Retrieving the chainName property from the getChainInfo function provides additional contextual information about the blockchain network.


57-61: LGTM!

The code changes are approved:

  • Modifying the alt attribute of the Image component provides a more descriptive message for the transaction status image.
  • Passing the chainName prop to the TxnStatus component allows it to display additional contextual information about the transaction.

Also applies to: 69-69

frontend/src/app/(routes)/cosmwasm/components/tx-status/DialogTxInstantiateStatus.tsx (2)

16-16: LGTM!

The code change is correctly retrieving chainName from the chain info to pass it as a prop to the TxnStatus component.


57-61: LGTM!

The code changes are approved:

  • The alt text for the Image component is correctly set based on the transaction status.
  • chainName is being passed as a prop to TxnStatus, which is consistent with retrieving it from getChainInfo.

Also applies to: 69-69

frontend/src/app/(routes)/transactions/history/[network]/components/Transaction.tsx (6)

11-11: LGTM!

The code changes are approved.


21-21: LGTM!

The code changes are approved.


26-26: LGTM!

The code changes are approved.


31-31: LGTM!

The code changes are approved.


81-83: LGTM!

The code changes are approved.


99-99: LGTM!

The code changes are approved.

frontend/src/components/txn-status-popups/TransactionStatusPopup.tsx (2)

132-133: Verify the functionality of the transaction link.

Ensure that the link generated by getTxnURLOnResolute is correct and that it's navigating to the expected transaction receipt page. Test the link with different transaction hashes and chain names to ensure it's working as expected.

Perform the following manual tests:

  1. Test the link with a valid transaction hash and chain name. Expect: The link should navigate to the correct transaction receipt page.
  2. Test the link with an invalid transaction hash and a valid chain name. Expect: The link should navigate to an error page or display an appropriate error message.
  3. Test the link with a valid transaction hash and an invalid chain name. Expect: The link should navigate to an error page or display an appropriate error message.
  4. Test the link with an empty transaction hash and chain name. Expect: The link should not navigate anywhere or display an appropriate error message.

If any of the tests fail, investigate the implementation of getTxnURLOnResolute and make necessary corrections.


32-32: Verify the usage of chainName.

Ensure that chainName is being used correctly and that it contains the expected value. Also, verify that it's being passed to the getTxnURLOnResolute function correctly.

Run the following script to verify the usage of chainName:

Verification successful

Verified usage of chainName.

The chainName variable is correctly passed to the getTxnURLOnResolute function in frontend/src/components/txn-status-popups/TxnStatus.tsx, confirming its intended use in generating transaction URLs. No issues were found with its usage.

  • frontend/src/components/txn-status-popups/TxnStatus.tsx: href={getTxnURLOnResolute(chainName, txHash || '')}
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of `chainName`.

# Test: Search for the usage of `chainName`. Expect: At least one occurrence where it's being passed to `getTxnURLOnResolute`.
rg --type typescript -A 5 $'getTxnURLOnResolute\(.*chainName'

Length of output: 97


Script:

#!/bin/bash
# Description: Verify the usage of `chainName`.

# Test: Search for the usage of `chainName`. Expect: At least one occurrence where it's being passed to `getTxnURLOnResolute`.
rg --type ts -A 5 $'getTxnURLOnResolute\(.*chainName'

Length of output: 575

frontend/src/utils/transaction.ts (2)

48-49: LGTM!

The code changes are approved.


237-242: LGTM!

The code changes are approved.

frontend/src/components/NewTxnMsg.tsx (12)

220-236: LGTM!

The code changes for handling the MSG_GRANT_ALLOWANCE message type are approved.


237-253: LGTM!

The code changes for handling the MSG_REVOKE_ALLOWANCE message type are approved.


51-66: LGTM!

The code changes for handling the SEND_TYPE_URL message type are approved.


67-82: LGTM!

The code changes for handling the DELEGATE_TYPE_URL message type are approved.


83-103: LGTM!

The code changes for handling the UNDELEGATE_TYPE_URL message type are approved.


104-117: LGTM!

The code changes for handling the REDELEGATE_TYPE_URL message type are approved.


118-135: LGTM!

The code changes for handling the VOTE_TYPE_URL message type are approved.


136-150: LGTM!

The code changes for handling the DEPOSIT_TYPE_URL message type are approved.


151-166: LGTM!

The code changes for handling the IBC_SEND_TYPE_URL message type are approved.


167-182: LGTM!

The code changes for handling the MSG_AUTHZ_GRANT message type are approved.


183-200: LGTM!

The code changes for handling the MSG_AUTHZ_REVOKE message type are approved.


201-219: LGTM!

The code changes for handling the MSG_AUTHZ_EXEC message type are approved.

frontend/src/store/features/recent-transactions/recentTransactionsSlice.tsx (5)

4-4: LGTM!

The import statement for error constants is correctly added.


34-34: LGTM!

Adding a trailing comma to the interface properties is a good practice for maintainability.


Line range hint 185-219: LGTM!

The changes to the getTransaction thunk simplify the code and improve readability without affecting the functionality.


230-261: LGTM!

The new getAnyChainTransaction thunk adds the functionality to fetch transactions from any chain based on the transaction hash. It handles the case when the transaction is not found by throwing an error and returning the error message using rejectWithValue.


399-413: LGTM!

The extraReducers is correctly updated to handle the lifecycle of the getAnyChainTransaction thunk. It updates the state accordingly based on the thunk's status and response data, and handles errors correctly in the rejected case.

frontend/src/utils/constants.ts (2)

61-61: LGTM!

The constant MSG_GRANT_ALLOWANCE is correctly defined and exported with the appropriate value for the message type.


62-63: LGTM!

The constant MSG_REVOKE_ALLOWANCE is correctly defined and exported with the appropriate value for the message type.

frontend/src/utils/util.ts (1)

490-495: LGTM!

The getTxnURLOnResolute function is implemented correctly and follows the expected behavior based on the provided summary. It enhances the utility of the module by providing a specific method for generating transaction URLs based on the chain name and hash.

@Hemanthghs Hemanthghs merged commit 1e7adc1 into hemanth/integrate-txn-builder Sep 2, 2024
6 checks passed
@Hemanthghs Hemanthghs deleted the hemanth/txn-history-change branch September 2, 2024 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant