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

Change wallet address failure #52

Open
weijiee opened this issue Dec 31, 2024 · 4 comments
Open

Change wallet address failure #52

weijiee opened this issue Dec 31, 2024 · 4 comments

Comments

@weijiee
Copy link

weijiee commented Dec 31, 2024

Describe the bug
EAP produces the wrong wallet address for me.

When I trigger to ask it to change, it accepts the new address but when I enquire on the wallet balance it still provides the token balances on the old wallet.

See images

IMG_4973
IMG_4974
IMG_4975

Platform (please complete the following information):
On both IOS and smartphone (iPhone Safari)

  • Device: iPhone 16 Pro

Additional context
Add any other context about the problem here.

@NeurProjects NeurProjects deleted a comment Dec 31, 2024
@NeurProjects NeurProjects deleted a comment Jan 2, 2025
@VezlysNikita
Copy link

I had this issue as well.

All you have to do is:

In useWalletPortfolio component (neur-app/src/hooks/use-wallet-portfolio.ts)

Change this:
const walletAddress = user?.wallets?.[0]?.publicKey;

To this:
const privyUser = user?.privyUser;
const walletAddress = user?.privyUser.wallet.address

@VezlysNikita
Copy link

That is happening because floating wallet is trying to access privy public id, which is encrypted.

user?.privyUser.wallet.address uses decrypted wallet address

@slimeonmyhead
Copy link
Contributor

@VezlysNikita it should use the embedded wallet address, not a wallet that is coming back from the Privy user data.
This has also changed a bit on beta branch as we now allow the user to select their active embedded wallet.

@VezlysNikita
Copy link

Thank you for clarifying. I did not even think about it that way.

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

No branches or pull requests

4 participants
@weijiee @VezlysNikita @slimeonmyhead and others