-
Notifications
You must be signed in to change notification settings - Fork 25
the search by paystring and X-address is broken in React #625
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
base: main
Are you sure you want to change the base?
the search by paystring and X-address is broken in React #625
Conversation
|
@ihomp |
components/Layout/SearchBlock.js
Outdated
| if (!option) return | ||
| if (option.username && !option.username.includes('-')) { | ||
| onSearch(option.username) | ||
| onSearch(option.username, option?.tag) |
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.
you don't need "?", as on line 155 there is a check that it exists
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.
thats why option.username doesn't have the "?"
components/Layout/SearchBlock.js
Outdated
| onSearch(option.username, option?.tag) | ||
| } else { | ||
| onSearch(option.address) | ||
| onSearch(option.address, option?.tag) |
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.
same here
| } | ||
|
|
||
| if (isValidPayString(searchFor) || isValidXAddress(searchFor)) { | ||
| if (isValidPayString(searchItem) || isValidXAddress(searchItem)) { |
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.
why did you change searchFor to searchItem ?
I can see on lines 287 and lower it is still searchFor
components/Layout/SearchBlock.js
Outdated
| // if there is a tag - | ||
| // get the new page which we can show an address and a tag | ||
| router.push('/account/' + encodeURI(searchFor) + addParams) //replace with a new page to show a tag | ||
| if(tag) { |
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.
it seems no prettify used, it should be a space between if and (tag). please use prettify before sending the PR
pages/account/tag/[...id].js
Outdated
| // Fetch account data for the resolved address | ||
| const accountResponse = await axiosServer({ | ||
| method: 'get', | ||
| url: `v2/address/${address}?username=true&service=true&verifiedDomain=true&parent=true&nickname=true&inception=true&flare=true&blacklist=true&payString=true&ledgerInfo=true&xamanMeta=true&bithomp=true&obligations=true`, |
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.
do you really need all those flags here?
do you show all this info?
pages/account/tag/[...id].js
Outdated
| return ( | ||
| <> | ||
| <SEO | ||
| page="Account with Tag" |
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.
X-Address
pages/account/tag/[...id].js
Outdated
| <> | ||
| <SEO | ||
| page="Account with Tag" | ||
| title={`${t('explorer.header.account')} ${userData.service || userData.username || userData.address} - Tag: ${destinationTag}`} |
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.
"X-Address information"
ihomp
left a comment
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.
-
PayString is not resolved
/account/username$paystring.crypto.com -
x-Address opens an account page without the tag
/account/XVVFXHFdehYhofb7XRWeJYV6kjTEwbq2mLScCiYyDTHKu9E -
Direct searching for paystring / xAddress in the landing search - doesn't end up in the right page. (it works if chose from the dropdown)
-
we don't need /account/tag route; we need to reuse the /account/
-
the /account/tag should become a component like Xaddress
-
css need an update, it added some new styles - that are not common in our design.
-
also the social icons shouldn't be grey - it looks like they are disabled/not active
|
@ihomp |
Issue
1. Resolve paystring / xAddress (you need to find all the details, similiar to what you get in searchBlock), the most important part is the TAG.
2. if xAddress/paystring has a TAG, then show a new VIEW similiar to php
3. if no tag, show normal account page