Skip to content

Conversation

B0Y3R-AVA
Copy link
Contributor

@B0Y3R-AVA B0Y3R-AVA commented Oct 15, 2025

Description

Ticket: CP-12379

Please provide:
Added logic to fetch xpub and add it to response for avalanche_getAccounts

Screenshots/Videos

Include relevant screenshots or screen recordings of iOS and Android.
Screenshot 2025-10-15 at 10 05 39 AM

Testing

Dev Testing (if applicable)

QA Testing (if applicable)

  • Same as Dev testing steps

Checklist

Please check all that apply (if applicable)

  • I have performed a self-review of my code
  • I have verified the code works
  • I have included screenshots / videos of android and ios
  • I have added testing steps
  • I have added/updated necessary unit tests
  • I have updated the documentation

Comment on lines 35 to 43
const getXpubXP = async (
walletId: string,
walletType: WalletType
): Promise<string | undefined> => {
try {
// Only mnemonic and keystone wallets support xpubXP
if (
walletType === WalletType.MNEMONIC ||
walletType === WalletType.KEYSTONE
) {
return await WalletService.getRawXpubXP({ walletId, walletType })
}
return undefined
} catch (error) {
Logger.warn(`Failed to get xpubXP for wallet ${walletId}:`, error)
return undefined
}
})
}
Copy link
Collaborator

@atn4z7 atn4z7 Oct 16, 2025

Choose a reason for hiding this comment

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

you should now be able to just call WalletService.getRawXpubXP() and fall back to undefined when it throws error. no need to check the wallet type here.

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.

3 participants