Open rmallols opened 6 years ago
Technical guidance:
Create a new module, called, keys-manager.js
.
Add a new array on top of it, called keys
. It will help to save keys on the UI.
Add a public function to it, called add
, to receive the key
and add it to the keys
array.
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.)
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.
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.