kryptokay / kwallet

0 stars 0 forks source link

Persist the generated key in the UI #6

Open rmallols opened 6 years ago

rmallols commented 6 years ago

In the long term, we want to host our keys in a database. We're still few steps ahead of that goal, so, for now, let's just save the created key into an array on the UI.

rmallols commented 6 years ago

Technical guidance:

  1. Create a new module, called, keys-manager.js.

  2. Add a new array on top of it, called keys. It will help to save keys on the UI.

  3. Add a public function to it, called add, to receive the key and add it to the keys array.

  4. Import the add function from the CreateNewWallet component, and call it whenever the user decides to save the generated key (NOTE: do we need a button to explicitly save the key?. If so, here's how to add buttons with React.)

  5. For now, you can track the saved keys by calling console.log with the array every time user creates a new key. Please note changes will get lost after you refresh the browser, but that's fine for the time being.