wip: remove Request for object and call functions like buy_xmr directly

This commit is contained in:
binarybaron 2024-08-09 01:30:45 +02:00
parent 4f336e98a1
commit 693f4297c5
No known key found for this signature in database
GPG key ID: 99B75D3E1476A26E
6 changed files with 95 additions and 203 deletions

View file

@ -4,7 +4,7 @@ import { rpcSetBalance, rpcSetSwapInfo } from "store/features/rpcSlice";
export async function checkBitcoinBalance() {
// TODO: use tauri-bindgen here
const response = (await invoke("balance")) as {
const response = (await invoke("get_balance")) as {
balance: number;
};
@ -12,7 +12,7 @@ export async function checkBitcoinBalance() {
}
export async function getRawSwapInfos() {
const response = await invoke("swap_infos_all");
const response = await invoke("get_swap_infos_all");
(response as any[]).forEach((info) => store.dispatch(rpcSetSwapInfo(info)));
}