diff --git a/src/backend/electron.cjs b/src/backend/electron.cjs index e751a50..0b0dcfa 100644 --- a/src/backend/electron.cjs +++ b/src/backend/electron.cjs @@ -230,7 +230,7 @@ ipcMain.on("start-wallet", async (e, walletName, password, node) => { console.log("Regained connection to daemon!"); mainWindow.webContents.send("node-status", "Connected"); }); - + walletBackend.on("incomingtx", (transaction) => { console.log(transaction); mainWindow.webContents.send("incoming-tx", transaction, transaction.totalAmount()); @@ -630,7 +630,7 @@ ipcMain.handle('prepare-transaction', async (e, address, amount, paymentID, send ipcMain.handle('send-transaction', async (e, hash) => { const result = await walletBackend.sendPreparedTransaction(hash) if (!result.success) errorMessage('Error: Could not send transaction') - successMessage('Transaction sent!') + mainWindow.webContents.send("outgoing-tx") return result.success; }) diff --git a/src/routes/wallet/dashboard/+page.svelte b/src/routes/wallet/dashboard/+page.svelte index 66a7296..b02d4bf 100644 --- a/src/routes/wallet/dashboard/+page.svelte +++ b/src/routes/wallet/dashboard/+page.svelte @@ -21,6 +21,10 @@ await formatAndRender(true); }); + window.api.receive('outgoing-tx', async () => { + await formatAndRender(true); + }); + async function formatAndRender(update) { await formatTransactions(); await renderchart(update);