mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-06-08 23:22:52 -04:00
wip: remove Request for object and call functions like buy_xmr directly
This commit is contained in:
parent
4f336e98a1
commit
693f4297c5
6 changed files with 95 additions and 203 deletions
|
@ -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)));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue