mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-12-17 01:24:02 -05:00
feat(gui): Allow to select from recently used monero addresses (#139)
* feat(gui): Allow user to select from recently used monero addresses in textfield
This commit is contained in:
parent
4867d2713f
commit
bd3fca7e41
11 changed files with 271 additions and 78 deletions
|
|
@ -416,6 +416,26 @@ impl Request for GetLogsArgs {
|
|||
}
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Debug, Eq, PartialEq, Serialize, Deserialize)]
|
||||
pub struct GetMoneroAddressesArgs;
|
||||
|
||||
#[typeshare]
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct GetMoneroAddressesResponse {
|
||||
#[typeshare(serialized_as = "Vec<String>")]
|
||||
pub addresses: Vec<monero::Address>,
|
||||
}
|
||||
|
||||
impl Request for GetMoneroAddressesArgs {
|
||||
type Response = GetMoneroAddressesResponse;
|
||||
|
||||
async fn request(self, ctx: Arc<Context>) -> Result<Self::Response> {
|
||||
let addresses = ctx.db.get_monero_addresses().await?;
|
||||
Ok(GetMoneroAddressesResponse { addresses })
|
||||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(fields(method = "suspend_current_swap"), skip(context))]
|
||||
pub async fn suspend_current_swap(context: Arc<Context>) -> Result<SuspendCurrentSwapResponse> {
|
||||
let swap_id = context.swap_lock.get_current_swap_id().await;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue