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

Add Token Search Results #1056

Draft
wants to merge 17 commits into
base: staging
Choose a base branch
from
Draft

Add Token Search Results #1056

wants to merge 17 commits into from

Conversation

achowdhry-ripple
Copy link
Collaborator

@achowdhry-ripple achowdhry-ripple commented Oct 8, 2024

High Level Overview of Change

In order to improve the usability of the search bar inside of Explorer, matching tokens will now auto-populate as a user is typing. The results are clickable and redirect to the respective token page. The data is pulled from XRPLMeta to display an open sourced list of tokens and relevant statistics.

Context of Change

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Tests (You added tests for code that already exists, or your new feature included in this PR)
  • Documentation Updates
  • Translation Updates
  • Release

TypeScript/Hooks Update

  • Updated files to React Hooks
  • Updated files to TypeScript

Before / After

Test Plan

// xrpl cluster temporary socket connection for XRP/USD conversion rate
useEffect(() => {
connect()
const xrplClusterSocket = new WebSocket('wss://xrplcluster.com')
Copy link
Collaborator

Choose a reason for hiding this comment

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

this should use existing socket connection all other pages use.

@ckniffen
Copy link
Collaborator

ckniffen commented Oct 8, 2024

Make sure the search doesnt happen on non mainet explorers. The xrpl meta url should also be an environment variable.

return Number(Number(parseFloat(parsed) * xrpPrice).toFixed(6))
}

const parseDomain = (domain: string): string => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

There should already be existing parse domain logic

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.

2 participants