From 524083ac8726e1e967d8f491d0013bf0d1c85f5a Mon Sep 17 00:00:00 2001
From: mtyszczak <mateusz.tyszczak@gmail.com>
Date: Mon, 24 Mar 2025 08:54:18 +0100
Subject: [PATCH] Toast successfull broadcast

---
 src/components/utilcards/ConfirmAccountUpdateCard.vue | 3 +++
 src/components/utilcards/ConfirmCreateAccountCard.vue | 3 +++
 src/components/utilcards/SignTransactionCard.vue      | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/src/components/utilcards/ConfirmAccountUpdateCard.vue b/src/components/utilcards/ConfirmAccountUpdateCard.vue
index 193e353..4edb948 100644
--- a/src/components/utilcards/ConfirmAccountUpdateCard.vue
+++ b/src/components/utilcards/ConfirmAccountUpdateCard.vue
@@ -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 {
diff --git a/src/components/utilcards/ConfirmCreateAccountCard.vue b/src/components/utilcards/ConfirmCreateAccountCard.vue
index 8c3384f..0760dda 100644
--- a/src/components/utilcards/ConfirmCreateAccountCard.vue
+++ b/src/components/utilcards/ConfirmCreateAccountCard.vue
@@ -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 {
diff --git a/src/components/utilcards/SignTransactionCard.vue b/src/components/utilcards/SignTransactionCard.vue
index b479c36..23142f6 100644
--- a/src/components/utilcards/SignTransactionCard.vue
+++ b/src/components/utilcards/SignTransactionCard.vue
@@ -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 {
-- 
GitLab