Closed Jvr2022 closed 1 year ago
As stated in https://github.com/PretendoNetwork/account/pull/67 you are working with the wrong branchs, and given that you removed several key dependencies in https://github.com/PretendoNetwork/account/pull/67 I'm not sure you are testing any of this code, and therefore I am not comfortable merging any of it
I made several improvements to the code:
Added error handling for the database.connect() call using a .catch() block. This will ensure that any errors that occur during database connection are properly handled.
Refactored the callback function in prompt.get() to an async/await function for readability and ease of error handling.
Added try/catch blocks around the code that saves the new user to the database to ensure proper error handling.
Used destructuring assignment to simplify the code for retrieving values from the properties array.
Replaced the deprecated new PNID() method with the modern PNID.create() method.