Add monero-recovery command to print address + view/spend keys

This allows manual recovery of problems like https://github.com/comit-network/xmr-btc-swap/issues/537
Since we could not figure out what causes this issue, and it is most likely an upstream problem this is the best we can do so far to allow the user to manually interact with `monero-wallet-cli` or `monero-wallet-rpc`.
This commit is contained in:
Daniel Karzel 2021-12-20 14:18:10 +11:00
parent b95ad75c22
commit df89ed68a9
No known key found for this signature in database
GPG key ID: 30C3FC2E438ADB6E
3 changed files with 65 additions and 1 deletions

View file

@ -249,6 +249,15 @@ where
},
}
}
RawCommand::MoneroRecovery { swap_id } => Arguments {
env_config: env_config_from(is_testnet),
debug,
json,
data_dir: data::data_dir_from(data, is_testnet)?,
cmd: Command::MoneroRecovery {
swap_id: swap_id.swap_id,
},
},
};
Ok(ParseResult::Arguments(arguments))
@ -303,6 +312,9 @@ pub enum Command {
bitcoin_electrum_rpc_url: Url,
bitcoin_target_block: usize,
},
MoneroRecovery {
swap_id: Uuid,
},
}
#[derive(structopt::StructOpt, Debug)]
@ -439,6 +451,13 @@ enum RawCommand {
#[structopt(flatten)]
bitcoin: Bitcoin,
},
/// Prints Monero information related to the swap in case the generated
/// wallet fails to detect the funds. This can only be used for swaps
/// that are in a `btc is redeemed` state.
MoneroRecovery {
#[structopt(flatten)]
swap_id: SwapId,
},
}
#[derive(structopt::StructOpt, Debug)]