osmosis-frontend icon indicating copy to clipboard operation
osmosis-frontend copied to clipboard

Address book for withdraw addresses

Open jonator opened this issue 3 years ago • 1 comments

Similar to wallets and CEXs, we should enable the user to save common withdraw addresses in an address book.

jonator avatar Jul 19 '22 04:07 jonator

Update: this should only affect IBC transfers, since currently that is the only type of transfer we support custom addresses for.

This functionality could be enabled as a flag as part of the withdraw address config: https://github.com/osmosis-labs/osmosis-frontend/blob/ac71ef0a8d50ba4311e1c6fe8b6e529d862f2e04/packages/web/components/complex/transfer.tsx#L29

Addresses could be stored in localstorage, namespaced by transfer path.

Rough idea: perhaps create a useAddressBook hook where you pass in the context and it returns view config and any update actions. Could also look into creating a mobx store and adding it to the root store (root.ts). The mobx solution may be more future proof and compatible with this optional functionality, since React hooks can't be conditionally used.

jonator avatar Oct 05 '22 21:10 jonator

Closing since it's an idea in clickup. Can reopen if pursued.

jonator avatar Jan 26 '23 02:01 jonator