beekeeper | Importing a key that already exists should be a `noop` (get rid of exception)
Currently, when someone tries to import a key that is already stored in the beekeeper, he receives an exception like:
{
"jsonrpc": "2.0",
"error": {
"code": -32003,
"message": "Assert Exception:false: Key already in wallet",
"data": {
"code": 10,
"name": "assert_exception",
"message": "Assert Exception",
"stack": [
{
"context": {
"level": "error",
"file": "beekeeper_wallet.cpp",
"line": 140,
"method": "import_key",
"hostname": "",
"timestamp": "2023-11-13T14:37:34"
},
"format": "Key already in wallet",
"data": {}
}
],
"extension": {
"assertion_expression": "false"
}
}
},
"id": 0
}
The proposed idea that came up from @bwrona at one of the meetings is to ignore such a situation - do not throw any exceptions, just keep it an noop
.