-
Notifications
You must be signed in to change notification settings - Fork 49
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
refactor: token list api source #2860
Conversation
6834a1f
to
573a422
Compare
@@ -63,13 +62,15 @@ export const AmountItem = ({isPrivacyOff, wallet, style, amount, inWallet, suppl | |||
</Middle> | |||
|
|||
<Right> | |||
{tokenInfo.kind !== 'nft' && ( | |||
{tokenInfo.kind !== 'nft' && variant !== 'swap' && ( |
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.
changed the variant swap
to don't list supply / pair
const isValidNameB = containsOnlyValidChars(b.info.name) | ||
const isValidTickerA = containsOnlyValidChars(a.info.ticker) | ||
const isValidTickerB = containsOnlyValidChars(b.info.ticker) | ||
export const sortTokensByName = (a: Balance.TokenInfo, b: Balance.TokenInfo, wallet: YoroiWallet) => { |
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.
new endpoint returns TokenInfo not Token, adjusted
"version": "independent", | ||
"command": { | ||
"run": { | ||
"ignore": ["e2e/*"] |
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.
ignoring e2e on lerna (it was rebuilding it)
@@ -95,13 +96,17 @@ export class OpenSwapApi { | |||
) | |||
} | |||
|
|||
public async getTokens({policyId = '', assetName = ''} = {}) { | |||
const tokens = await getTokens( | |||
public async getTokenPairs({policyId = '', assetName = ''} = {}) { |
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.
getTokens is actually getTokenPairs
ticker: info.symbol, | ||
metadatas: {}, | ||
}, | ||
info: asYoroiBalanceTokenInfo(info), |
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.
migrated to the specialized helper
@@ -57,7 +57,7 @@ export const SwapTabNavigator = () => { | |||
}, [aggregatorTokenId, lpTokenHeld, lpTokenHeldChanged]) | |||
|
|||
// pre load swap tokens | |||
const {refetch} = useSwapTokensByPairToken('', {suspense: false, enabled: false}) | |||
const {refetch} = useSwapTokensOnlyVerified({suspense: false, enabled: false}) |
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.
pre-fetch updated, until we migrate router for tan stack router
573a422
to
8e0c66d
Compare
** Breaking change **
Relates to YOMO-925
Context
The
/list
api is very restricted to the amount of queries 1/hour