mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-07 14:02:32 -04: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
|
@ -4,6 +4,7 @@ import { defineConfig } from "vite";
|
|||
import tsconfigPaths from "vite-tsconfig-paths";
|
||||
import { watch } from "vite-plugin-watch";
|
||||
import path from "path";
|
||||
import topLevelAwait from "vite-plugin-top-level-await";
|
||||
|
||||
const mobile = !!/android|ios/.exec(process.env.TAURI_ENV_PLATFORM);
|
||||
|
||||
|
@ -12,7 +13,8 @@ export default defineConfig(async () => ({
|
|||
plugins: [
|
||||
react(),
|
||||
tsconfigPaths(),
|
||||
// automatically regenerate the typescript bindings when there's a change
|
||||
topLevelAwait(),
|
||||
// Automatically regenerate the typescript bindings when there's a change to the rust code
|
||||
watch({
|
||||
pattern: ["../swap/src/**/*"],
|
||||
command: "yarn run gen-bindings",
|
||||
|
@ -25,9 +27,6 @@ export default defineConfig(async () => ({
|
|||
server.watcher.add(path.resolve(__dirname, "../swap/src"));
|
||||
},
|
||||
},
|
||||
// VitePluginRestart({
|
||||
// restart: ["../swap/src/**/*"]
|
||||
// })
|
||||
],
|
||||
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue