darkfid: add the option to import keypair from json file

This commit is contained in:
ghassmo
2022-01-05 02:28:36 +04:00
parent 9882856eeb
commit be1bdec8a2
5 changed files with 71 additions and 4 deletions

View File

@@ -21,7 +21,7 @@ pub enum ErrorCode {
InternalError,
KeyGenError,
GetAddressesError,
CreateFile,
ImportAndExportFile,
SetDefaultAddress,
InvalidAmountParam,
InvalidNetworkParam,
@@ -41,7 +41,7 @@ impl ErrorCode {
ErrorCode::InternalError => -32603,
ErrorCode::KeyGenError => -32002,
ErrorCode::GetAddressesError => -32003,
ErrorCode::CreateFile => -32004,
ErrorCode::ImportAndExportFile => -32004,
ErrorCode::SetDefaultAddress => -32005,
ErrorCode::InvalidAmountParam => -32010,
ErrorCode::InvalidNetworkParam => -32011,
@@ -61,7 +61,7 @@ impl ErrorCode {
ErrorCode::InternalError => "Internal error",
ErrorCode::KeyGenError => "Key gen error",
ErrorCode::GetAddressesError => "get addresses error",
ErrorCode::CreateFile => "error creating a file",
ErrorCode::ImportAndExportFile => "error import/export a file",
ErrorCode::SetDefaultAddress => "error set default address",
ErrorCode::InvalidAmountParam => "Invalid amount param",
ErrorCode::InvalidNetworkParam => "Invalid network param",