Skip to content

Conversation

@coreyphillips
Copy link
Collaborator

@coreyphillips coreyphillips commented Jan 17, 2023

This PR:

  • Adds the AddressViewer component to the Advanced Settings list.
  • Updates getUtxos method in electrum.ts.
  • Creates listUnspentAddressScriptHashes & getAddressUtxos methods in electrum.ts.
  • Updates getPrivateKey method in utils/wallet/index.ts.
  • Fixes a bug in getUtxos that would prevent certain address types from being returned in the utxo array.

Notes/Included Functionality:

  • This new view can be found by navigating to "Settings->Advanced->Address Viewer".
  • This view is currently enabled for everyone, but can be hidden behind dev options if more appropriate.
  • The address viewer generates addresses associated with the user's current wallet on the fly.
  • The user can toggle between address types and receive/change addresses.
  • If the dev settings are enabled the user can also toggle between networks (mainnet, testnet, regtest).
  • The user can generate 20 new addresses per address type by tapping "Generate 20 More". (20 * Each Address Type (3))
  • The user can search for an address from the generated list.
  • The user can check the balances of the generated addresses.
  • If balances are discovered, the user can select or deselect the addresses containing a balance and choose to spend from them.
    • When the user attempts to spend from their selected addresses, the sendNavigation modal will appear and pre-fill in their receive address from Bitkit. If they prefer to send to an external address they can modify the address like a normal transaction by scanning or entering a new address.

Simulator Screen Shot - iPhone 13 - 2023-01-17 at 11 00 07
Simulator Screen Shot - iPhone 13 - 2023-01-17 at 11 00 31

Adds the AddressViewer component to the Advanced Settings list.
Updates getUtxos method in electrum.ts.
Creates listUnspentAddressScriptHashes & getAddressUtxos methods in electrum.ts.
Updates getPrivateKey method in utils/wallet/index.ts.
Copy link
Contributor

@limpbrains limpbrains left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unhandled Promise rejection when I'm switching to Regtest and press Check Balances

image

Can't find exectly where is it

Removes unnecessary awaits.
Adds timer to address generation function.
Updates utxoIsSelected method.
@coreyphillips
Copy link
Collaborator Author

coreyphillips commented Jan 17, 2023

Regarding this, when attempting to check balances of addresses using a network that the wallet is not currently set to, the Address Viewer will switch to that network in the background so that it can utilize the correct electrum server for the balance request.

I'm not too worried about it since this feature of the viewer is only enabled when dev settings are on, but this is most likely something we'll need to fix when switching networks in general.

@coreyphillips coreyphillips merged commit d868a9a into master Jan 17, 2023
@coreyphillips coreyphillips deleted the address-viewer branch January 17, 2023 18:58
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

Successfully merging this pull request may close these issues.

3 participants