yours-org / yours-wallet

A non-custodial and open-source wallet for BSV and 1Sat Ordinals.
Other
63 stars 51 forks source link

Save Wallet Name and Url Image on creation #245

Closed danwag06 closed 3 weeks ago

danwag06 commented 1 month ago

The wallet currently supports giving different accounts a name (label) and a url icon. The request would be to optionally save this information when creating/restoring/importing the wallet.

maxslimb commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I have worked on typescript and JS before on various projects and latest I was working with Nethermind on the Voyager starknet block explorer

danwag06 commented 1 month ago

@maxslimb if you'd like to tackle this, see https://github.com/yours-org/yours-wallet/blob/main/CONTRIBUTING.md

When saving you'll want to do something similar to this to save the name and/or icon in chrome local storage: https://github.com/yours-org/yours-wallet/blob/312241c2273261d600b640f87d3a40d160bb8354/src/pages/Settings.tsx#L223

There are a number of different ways a user can create/import/restore a wallet which can be found here: https://github.com/yours-org/yours-wallet/tree/main/src/pages/onboarding

maxslimb commented 1 month ago

Hi @danwag06, where can I find the account label, and the image URL is for the image associated with the account label?

Thanks

danwag06 commented 1 month ago

@maxslimb Everything from an account state perspective is stored using chrome storage api.

To see this you can open the wallet in your browser window then:

  1. Right click and inspect the wallet window.
  2. In the console run chrome.storage.local.get(null, console.log)
  3. You can see the account label and the url image in accounts[account].settings.socialProfile
maxslimb commented 1 month ago

@danwag06 I just want to confirm, that we need to save the label which is "Account 1" if I create a new account and the URL image is the image shown near the label, for instance, the small circle.

danwag06 commented 4 weeks ago

Yes correct @maxslimb

I should also tell you about a hackathon that's going on where you could get rewarded for this issue. It's happening via a fork of this repo but we plan to merge any changes that come from it. This issue is a part of the hackathon.

https://app.onlydust.com/hackathons/odhack-90

The project of interest will be spv-wallet-browser https://app.onlydust.com/p/spv-wallet-browser

It's starts tomorrow. If I see your application come through I will approve it.

danwag06 commented 3 weeks ago

This was completed in the OD hackathon and will be merged into yours.