-
Notifications
You must be signed in to change notification settings - Fork 108
fix: sbtc testnet #2562
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?
fix: sbtc testnet #2562
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
9e97b0a to
a2bdc58
Compare
a2bdc58 to
82214d7
Compare
| export const getHasSBTCInName = (name: string, symbol: string) => { | ||
| if (!name || !symbol) { | ||
| return false; | ||
| } | ||
| return name.toLowerCase().includes('sbtc') || symbol.toLowerCase().includes('sbtc'); | ||
| }; |
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.
guard condition here returns false if either values are falsy, but the return statement checks if either contains 'sbtc', is this intended?
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.
Yes. This seems logical to me. Do you think it should work differently?
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.
this condition name.toLowerCase().includes('sbtc') || symbol.toLowerCase().includes('sbtc') says it should return true if either name or symbol contains sbtc, but the guard condition wants them both to exist, if you truly want to return true if any of name/symbol contains sbtc you should probably switch the guard condition to !name && !symbol, unless you want both to have sbtc then you can change the 2nd condition to &&
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 want getHasSBTCInName ('sbtc', 'notsbtc') to return true and getHasSBTCInName ('sbtc', undefined) to return false?
82214d7 to
6784e25
Compare
What type of PR is this? (check all applicable)
Description
Fixes sbtc issues on testnet
sbtc navbar link went to the mainnet sbtc page
sbtc testnet balances were 0
sbtc token page showed the token as unverified
Issue ticket number and link
Checklist:
Screenshots (if appropriate):