Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

Synchronization error for Tron wallet #1355

Open
galmi opened this issue Aug 22, 2021 · 0 comments · May be fixed by galmi/ledger-live-common#1
Open

Synchronization error for Tron wallet #1355

galmi opened this issue Aug 22, 2021 · 0 comments · May be fixed by galmi/ledger-live-common#1

Comments

@galmi
Copy link

galmi commented Aug 22, 2021

My tron wallet can not sync anymore, not in desktop nor in mobile app. I checked your source code and want to explain the reason.
I found out that it happens if wallet has more than 200 transactions.

Problem starts here:

const nextUrl = get(resp, "meta.links.next");

Example how to reproduce the problem:

  1. Take any wallet with big amount of transactions. For example, I found this wallet in tronscan TEKzjZaQ7q26TBhbr4Su5YVp1mVhYE3XnJ
  2. Your first API request returns last 100 transactions:

https://tron.coin.ledger.com/v1/accounts/TEKzjZaQ7q26TBhbr4Su5YVp1mVhYE3XnJ/transactions?limit=100

  1. Key meta.links.next contains link to the next 100 transactions:

https://api.trongrid.io/v1/accounts/TEKzjZaQ7q26TBhbr4Su5YVp1mVhYE3XnJ/transactions?limit=100&fingerprint=3wmN1yM3XR5abQ4fQEVJNS58FQiGYsBkafN473EZf767inR4Vys13z3sdFSTCxrGPDkPJ6Tc5ZjhGh4wPDXutRsGGXdsKBEka8mK

  1. Follow this link, it will return next 100 transactions. But now key meta.links.next contains next link without domain name:

/v1/accounts/TEKzjZaQ7q26TBhbr4Su5YVp1mVhYE3XnJ/transactions?limit=100&fingerprint=3wmN1yM3f1BnUF1VyQsQSYAqAvi4fmQSB8WWH7Yq8ApkQLETxgsj42HdsrbVLb1vB6YeoeKpJHSK5nk2cqxXij4zvLteySqNohPb

  1. This link will generate NetworkDown error, because app sends this request to localhost.

Please fix this problem asap. May be it will enough to load only first 200 transactions.
I found temporary solution for desktop app, but it not syncing anymore in mobile app.

galmi added a commit to galmi/ledger-live-common that referenced this issue Aug 25, 2021
Fix loading more than 200 transactions in tron wallet
fix LedgerHQ#1355
@galmi galmi linked a pull request Aug 25, 2021 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant