mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-12-21 11:25:50 -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
|
|
@ -5,6 +5,7 @@ import type { AppDispatch, RootState } from "renderer/store/storeRenderer";
|
|||
import { parseDateString } from "utils/parseUtils";
|
||||
import { useMemo } from "react";
|
||||
import { isCliLogRelatedToSwap } from "models/cliModel";
|
||||
import { TauriSettings } from "models/tauriModel";
|
||||
|
||||
export const useAppDispatch = () => useDispatch<AppDispatch>();
|
||||
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;
|
||||
|
|
@ -73,6 +74,6 @@ export function useSwapInfosSortedByDate() {
|
|||
);
|
||||
}
|
||||
|
||||
export function useSettings() {
|
||||
return useAppSelector((state) => state.settings);
|
||||
}
|
||||
export function useSettings<T>(selector: (settings: TauriSettings) => T): T {
|
||||
return useAppSelector((state) => selector(state.settings));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue