mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-11-25 18:26:28 -05:00
feat(gui, tauri): Accept --testnet flag, default to mainnet (#106)
This PR tackles #92 - Add the `tauri-plugin-cli` (only on desktop) - Check in the frontend if the `--testnet` flag is set. If it's set we pass `testnet=true` to the `initialize_context` command on invokation - We add the `vite-plugin-top-level-await` to allow top level await in all browsers - Remove the `bitcoin_confirmation_target` from settings for simplicity
This commit is contained in:
parent
9e94dca7aa
commit
83f831ccac
23 changed files with 311 additions and 53 deletions
|
|
@ -36,6 +36,7 @@ import { providerToConcatenatedMultiAddr } from "utils/multiAddrUtils";
|
|||
import { MoneroRecoveryResponse } from "models/rpcModel";
|
||||
import { ListSellersResponse } from "../models/tauriModel";
|
||||
import logger from "utils/logger";
|
||||
import { isTestnet } from "store/config";
|
||||
|
||||
export async function initEventListeners() {
|
||||
// This operation is in-expensive
|
||||
|
|
@ -201,7 +202,10 @@ export async function listSellersAtRendezvousPoint(
|
|||
|
||||
export async function initializeContext() {
|
||||
const settings = store.getState().settings;
|
||||
const testnet = isTestnet();
|
||||
|
||||
await invokeUnsafe<void>("initialize_context", {
|
||||
settings,
|
||||
testnet,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue