Welcome to the thread about the NEM Bank. Here you can discuss everything about the code and potential problems that you might stumble upon.
Hey
I have made an alternate model of the NEM bank could you have a look at it.
It basically has one single account acting as the bank with which the account-holders deposit and withdraw their values, so the entire records are on the blockchain.
Looks good! Nice job.
I got two questions after watching this video.
- How can I know which function required me to put promises after that?
- The proper way to save the private key in contract is the "NEM COLD HOT WALLET " you mentioned before?
-
It’s usually in the documentation. If the function return a promise, then you need to put the .then function afterwards. So for the SDK that we use, you can read here https://github.com/QuantumMechanics/NEM-sdk under 4.3 that all function calls return promises.
-
That’s a good source of inspiration for how to securely sign transactions. To safely store private keys I would look more at traditional internet security and encryption. If you were to create a real bank app that holds your customers private keys, those have to be stored in a database with good encryption.
Looking at the nem-sdk docs (10 chapter “helicopter tour”, about a 20 minute read) was a great way to solidify everything that Filip demo’ed in the videos.