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

fix: Lookup AH Local AssetId when transferring to AH #176

Merged
merged 3 commits into from
Nov 12, 2024

Conversation

NunoAlexandre
Copy link
Collaborator

@NunoAlexandre NunoAlexandre commented Nov 8, 2024

Currently when handling a transfer aimed at AssetHub, we are just looking up the token symbol there but we should lookup the local asset uid instead.

// current
const destinationChainNode = assets.getTNode(destinationChain.chainId, relay)
if (!destinationChainNode) throw new Error('Transfer failed: chain id not found.')
return { symbol: getTokenSymbol(destinationChainNode, token) }

Fixed that and cleaned up the code a little

Copy link

vercel bot commented Nov 8, 2024

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

Name Status Preview Comments Updated (UTC)
turtle-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 12, 2024 1:09pm
turtle-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 12, 2024 1:09pm

@NunoAlexandre NunoAlexandre marked this pull request as ready for review November 12, 2024 13:02
@NunoAlexandre
Copy link
Collaborator Author

@Victor-Salomon @noahjoeris can you please review this? 🙏

@@ -793,6 +793,12 @@ export const mainnetRegistry: Registry = {
sdk: 'ParaSpellApi',
tokens: [Mainnet.DOT.id],
},
{
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Moved this here so it's after another Hydra route

Copy link
Collaborator

@Victor-Salomon Victor-Salomon left a comment

Choose a reason for hiding this comment

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

LGTM 💥

@NunoAlexandre NunoAlexandre merged commit a2b7c8f into xcm-transfers Nov 12, 2024
5 checks passed
@NunoAlexandre NunoAlexandre deleted the fix/ah-currencyid branch November 12, 2024 17: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