Skip to content
Snippets Groups Projects
Verified Commit 524083ac authored by Mateusz Tyszczak's avatar Mateusz Tyszczak :scroll:
Browse files

Toast successfull broadcast

parent 087509e7
No related branches found
No related tags found
No related merge requests found
Pipeline #118595 passed
......@@ -10,6 +10,7 @@ import { useRouter } from 'vue-router';
import { getWax } from '@/stores/wax.store';
import { useWalletStore } from '@/stores/wallet.store';
import { toastError } from '@/utils/parse-error';
import { toast } from 'vue-sonner';
const settings = useSettingsStore();
......@@ -59,6 +60,8 @@ const updateAuthority = async() => {
tx.pushOperation(op);
await wallet.wallet!.signTransaction(tx, ownerKey.value ? "owner" : "active");
await wax.broadcast(tx);
toast.success('Authority updated successfully!');
} catch (error) {
toastError('Error updating authority', error);
} finally {
......
......@@ -13,6 +13,7 @@ import { useRouter } from 'vue-router';
import { getWax } from '@/stores/wax.store';
import { useWalletStore } from '@/stores/wallet.store';
import { toastError } from '@/utils/parse-error';
import { toast } from 'vue-sonner';
const settings = useSettingsStore();
......@@ -111,6 +112,8 @@ const createAccount = async() => {
}
await wallet.wallet!.signTransaction(tx, "active");
await wax.broadcast(tx);
toast.success('Account created successfully!');
} catch (error) {
toastError('Error creating account', error);
} finally {
......
......@@ -9,6 +9,7 @@ import { getWax } from '@/stores/wax.store';
import type { ITransaction, TRole } from '@hiveio/wax/vite';
import { useRouter } from 'vue-router';
import { toastError } from '@/utils/parse-error';
import { toast } from 'vue-sonner';
const walletStore = useWalletStore();
......@@ -76,6 +77,8 @@ const broadcast = async () => {
const tx = wax.createTransactionFromJson(inputData.value);
await wax.broadcast(tx);
toast.success('Transaction broadcasted successfully');
} catch (error) {
toastError('Error broadcasting transaction', error);
} finally {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment