tango-crypto / cardano-wallet-js

cardano-wallet javascript/typescript client
81 stars 34 forks source link

Wallet addresses are not in sync with Nami wallet #15

Open Manik-Jain opened 2 years ago

Manik-Jain commented 2 years ago

Hi,

I did a few test transactions to the test addresses generated using Tango-Crypto library. The transactions are all valid in the explorer. However, the ADA are still 0 in the target account.

txns :

https://explorer.cardano-testnet.iohkdev.io/en/transaction?id=fe0898f70ecbad8c6fd38c3be0c1060586f0a4f126d1eb60d97406c1fadfdccc

https://explorer.cardano-testnet.iohkdev.io/en/transaction?id=0f305f87c2bd1280f4d3c2af1b6d87870458679ea4de35089f884b4dce0accc4

techxplorertaj commented 2 years ago

Hi, I have the same issue after using the getAddressAt function to obtain a new address. The transactions coming from my Daedalus test wallet are valid on blockchain explorer. However, the ADA did not make it to my wallet.

Any ideas on how to resolve?

leobel commented 2 years ago

Hi, could you please elaborate a little bit more about what is the target account and from where did you send the tx. Remember that Cardano-wallet-js uses bip44 standard so, it'll count all addresses until 20 unused addresses in a row are found for the final balance. Name wallet only uses one address per account, that's it.

techxplorertaj commented 2 years ago

Hi, could you please elaborate a little bit more about what is the target account and from where did you send the tx. Remember that Cardano-wallet-js uses bip44 standard so, it'll count all addresses until 20 unused addresses in a row are found for the final balance. Name wallet only uses one address per account, that's it.

Thanks for your reply.

In my scenario, I had used the getAddressAt function to get the 100th unused address. I was able to transfer ada to it from another wallet which was successful according to the explorer. However, it never turned up to my 100th address which is still not listed as used in my wallet

leobel commented 2 years ago

Hi @techxplorertaj, you need to use the function getAddressAt with caution, if the address you choose doesn't appear before cardano-wallet-js found 20 unused addresses in a row, it won't be count in the balance. Probably this is your case, can you share the list of addresses (getAddresses), there are all the addresses the wallet take into account.

Just to put an example, when you go to Daedalus and list all the addresses to receive (and click on show used), the list will show you ALL THE ADDRESSES that are taken into account, any other address will simple be discarded

techxplorertaj commented 2 years ago

This is exactly my scenario. I intentionally used one that was outside of the next 20 unused addresses to understand what would be the effect.

So for example, could I use the function to generate 10k unique addresses for an NFT sale, and what would be the effect if the earlier ones remain unused.

On Fri., Oct. 8, 2021, 12:01 p.m. Leobel Izquierdo, < @.***> wrote:

Hi @techxplorertaj https://github.com/techxplorertaj, you need to use the function getAddressAt with caution, if the address you choose doesn't appear before cardano-wallet-js found 20 unused addresses in a row, it won't be count in the balance. Probably this is your case, can you share the list of addresses (getAddresses), there are all the addresses the wallet take into account.

Just to put an example, when you go to Daedalus and list all the addresses to receive (and click on show used), the list will show you ALL THE ADDRESSES that are taken into account.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tango-crypto/cardano-wallet-js/issues/15#issuecomment-938711714, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJUFYBMA7UMABAACRVVIC7TUF4BU5ANCNFSM5E6QPTEA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.