mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-05-02 14:56:10 -04:00
chore: Refactor tauri commands
This commit is contained in:
parent
2e1b6f6b43
commit
4f336e98a1
3 changed files with 13 additions and 15 deletions
|
@ -1,5 +1,4 @@
|
|||
import { invoke } from "@tauri-apps/api/core";
|
||||
import { BalanceBitcoinResponse } from "models/rpcModel";
|
||||
import { store } from "./store/storeRenderer";
|
||||
import { rpcSetBalance, rpcSetSwapInfo } from "store/features/rpcSlice";
|
||||
|
||||
|
@ -14,6 +13,6 @@ export async function checkBitcoinBalance() {
|
|||
|
||||
export async function getRawSwapInfos() {
|
||||
const response = await invoke("swap_infos_all");
|
||||
console.log(response);
|
||||
|
||||
(response as any[]).forEach((info) => store.dispatch(rpcSetSwapInfo(info)));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue