mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-11-25 18:26:28 -05:00
feat(gui, swap): allow change-address to be omitted and default to internal wallet (#68)
This PR: - allows --change-address to be omitted and default to internal wallet address (https://github.com/comit-network/xmr-btc-swap/pull/1709). This is a change that is merged from upstream into our fork - adds the necessary components for the tauri integration and the ui components to allow toggling between internal vs external refund address Co-authored-by: binarybaron <86064887+binarybaron@users.noreply.github.com> Co-authored-by: Einliterflasche <81313171+Einliterflasche@users.noreply.github.com> Co-authored-by: Byron Hambly <byron@hambly.dev>
This commit is contained in:
parent
91482f1e16
commit
063f9dbf9b
8 changed files with 118 additions and 50 deletions
|
|
@ -89,14 +89,22 @@ export async function withdrawBtc(address: string): Promise<string> {
|
|||
|
||||
export async function buyXmr(
|
||||
seller: Provider,
|
||||
bitcoin_change_address: string,
|
||||
bitcoin_change_address: string | null,
|
||||
monero_receive_address: string,
|
||||
) {
|
||||
await invoke<BuyXmrArgs, BuyXmrResponse>("buy_xmr", {
|
||||
seller: providerToConcatenatedMultiAddr(seller),
|
||||
bitcoin_change_address,
|
||||
monero_receive_address,
|
||||
});
|
||||
await invoke<BuyXmrArgs, BuyXmrResponse>(
|
||||
"buy_xmr",
|
||||
bitcoin_change_address == null
|
||||
? {
|
||||
seller: providerToConcatenatedMultiAddr(seller),
|
||||
monero_receive_address,
|
||||
}
|
||||
: {
|
||||
seller: providerToConcatenatedMultiAddr(seller),
|
||||
monero_receive_address,
|
||||
bitcoin_change_address,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
export async function resumeSwap(swapId: string) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue