leather-io / extension

Leather browser extension
https://leather.io
MIT License
303 stars 142 forks source link

Provide option to search / scan farther across addresses for inscriptions (e.g. for users from Ord software) #3297

Open 314159265359879 opened 1 year ago

314159265359879 commented 1 year ago

The user (RaptureX) mentioned generating one ordinal wallet address holding all the inscriptions.

In ord wallet all are shown in but in Hiro only 1 shows after seed import.

Copy of some details from ord wallet: image

is there a difference in the derivation path used?

markmhendrickson commented 1 year ago

@314159265359879 have we asked this user to reinstall the extension (or simply restart their browser) to see if it's a caching issue? We could also ask them to clear React cache (for which it may be helpful to create an FAQ as well for general usage).

markmhendrickson commented 1 year ago

Possibly related https://twitter.com/hirowallet/status/1630012438128242694

markmhendrickson commented 1 year ago

I diagnosed this behavior live with the user and figured out that we need a larger gap limit than 10 because their inscriptions are spread across addresses that are separated by lots (30-40) of empty addresses. Let's go with 50 and see how it performs.

hozzjss commented 1 year ago

@314159265359879 have we asked this user to reinstall the extension (or simply restart their browser) to see if it's a caching issue? We could also ask them to clear React cache (for which it may be helpful to create an FAQ as well for general usage).

hey @markmhx I've written a step by step guide on how to clear the cache here it is

How to clear react cache

For Chrome

  1. First go to chrome://extensions/ for chrome and chromium based browsers like brave, edge, and others
  2. Turn on Developer mode through clicking on the switch in the top right of the page
  3. Look for the Hiro wallet by searching for it using the search bar and then click on the highlighted background page link
  4. In chrome in the top bar of the new window you will find tabs like Elements, console find the Application tab and click on it
  5. Find the local storage tab in the left sidebar and expand it if it’s collapsed and then click on the first sub tab called chrome-extension://xxxx/ in the right side panel
  6. find the REACT_QUERY_OFFLINE_CACHE and delete it by using the backspace or delete button
  7. After that to reload the extension simply press ctrl+r or cmd+r in the inspect window and then reopen the extension and re enter your password

    For Firefox

  8. go to about:debugging#/runtime/this-firefox and then click inspect in the Hiro wallet card
  9. Then find the storage tab in the top bar of the new window
  10. In the left side bar find and click on Local Storage
  11. Then select the first item under Local storage called mom-extension://xxx
  12. In the left panel search for REACT_QUERY
  13. Then click on the field whose key is REACT_QUERY_OFFLINE_CACHE
  14. And then press delete or the backspace button to clear react cache
  15. After that to reload the extension simply press ctrl+r or cmd+r in the inspect window and then reopen the extension and re enter your password
kyranjamie commented 1 year ago

I diagnosed this behavior live with the user and figured out that we need a larger gap limit than 10 because their inscriptions are spread across addresses that are separated by lots (30-40) of empty addresses. Let's go with 50 and see how it performs.

This is way to many requests to be firing on a regular interval. Let's not do 50. There's no reason for a user to leave 49 address blank and then use the 50th, and making this change means a huge amount of wasted resources, and worse UX for users that don't have edge case inscriptions with huge gaps.

There's no precedent for checking this many. Sparrow and most wallets check 20. Let's go back to doing that.

Unconsidered impacts:

markmhendrickson commented 1 year ago

There's no reason for a user to leave 49 address blank and then use the 50th

Sorry for not providing more context in here; I wrote my comment above in a rush.

Apparently Ord itself can create this scenario in which inscriptions are spread out quite widely across taproot addresses. That was the case with this particular user, in that they'd inscribed around 10 inscriptions with Ord and both Sparrow and Hiro Wallet failed to show all of them because they weren't looking far enough across addresses (Sparrow showed more than Hiro by default but only about half of them as well).

I'm not entirely clear on whether Ord does this commonly, but will look into it. If it is common and we expect users to import from there, then we should think of ways to resolve this problem for them even if it doesn't meaning increasing the default for every user. Perhaps we can have a "search for more" type option that the user can click if they want to retrieve N more?

Another option could be to add an advanced setting that the user can modify from the default to whatever they need.

markmhendrickson commented 1 year ago

Another idea here would be to leverage the new refresh icon:

image

If the user clicks it, we could search a lot further than the default page load limit. E.g. 50 instead of 20? And if they click it again, we increase eg to 75 on the assumption that they're looking for more?

It might be a way to leverage an existing UI element, or could just be confusing. cc @mica000

kyranjamie commented 1 year ago

A way to introduce some finer grained controls is a good idea. Perhaps a subtle "more" button, with a "Deep scan" option that checks higher indexes?

markmhendrickson commented 1 year ago

@mica000 and I were talking about this and how it's a good use case for implementing https://kbar.vercel.app/

casuwu commented 1 year ago

Having an identical issue. Ord wallet displays 200 but Hiro shows only a fraction. Is there any option in the meanwhile to be able to scan across address to view available inscrips? Sparrow having a similar issue in that it shows only a fraction but much smaller.

314159265359879 commented 1 year ago

Having an identical issue. Ord wallet displays 200 but Hiro shows only a fraction. Is there any option in the meanwhile to be able to scan across address to view available inscrips? Sparrow having a similar issue in that it shows only a fraction but much smaller.

@casuwu, I think you are right after all, this is related. I could not figure out why they would have loaded before but I get it now. Because you already send about 100 ordinals out, I think it may have left to many addresses empty causing the rest not to be found.

Addresses are checked for activity with a Fibonacci sequence if I recall correctly so not all 200 addresses are checked but just a couple the first 100 being empty the wallet will expect all of them to be empty.

markmhendrickson commented 3 months ago

This is captured here for wallet configuration.