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

chore: use chain aware address #1320

Merged
merged 2 commits into from
Jun 5, 2024
Merged

chore: use chain aware address #1320

merged 2 commits into from
Jun 5, 2024

Conversation

0xonramp
Copy link
Collaborator

@0xonramp 0xonramp commented Jun 3, 2024

Use getAddressForToken to get chain-aware address where possible.

Copy link

vercel bot commented Jun 3, 2024

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

Name Status Preview Comments Updated (UTC)
index-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 4, 2024 11:53am

price_change_percentage_24h_in_currency: { usd: number }
}

export const fetchCoingeckoMarketData = async (
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Unused in the codebase.

@@ -26,6 +26,7 @@ export function ProductList() {
async function fetchProducts() {
const analyticsPromises = Promise.all(
productTokens.map((token) =>
// TODO: https://github.com/IndexCoop/analytics-sdk/issues/30
Copy link
Collaborator

Choose a reason for hiding this comment

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

ah yea. I was thinking about this recently. 😅 will try to take a look at the task this week.

const path = `/quote?takerAddress=${address}&inputToken=${inputToken.address}&outputToken=${outputToken.address}&inputAmount=${inputAmount.toString()}&chainId=${chainId}`
const inputTokenAddress = getAddressForToken(inputToken, chainId)
const outputTokenAddress = getAddressForToken(outputToken, chainId)
const path = `/quote?takerAddress=${address}&inputToken=${inputTokenAddress}&outputToken=${outputTokenAddress}&inputAmount=${inputAmount.toString()}&chainId=${chainId}`
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice, making it future proof. 🌟

@0xonramp 0xonramp marked this pull request as ready for review June 5, 2024 03:52
@0xonramp 0xonramp merged commit 8fba622 into master Jun 5, 2024
3 checks passed
@0xonramp 0xonramp deleted the chore/chain-aware-address branch June 5, 2024 13:19
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