aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/socket.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-11-09 09:53:33 -0800
committerAdam Soltys <[email protected]>2022-11-09 09:53:33 -0800
commite55b44b42a5e384a807a2703d4744dd1392f227e (patch)
tree57ace0c3dbcdcb9e7a4472478068b102406ee99e /src/lib/socket.js
parentd4f170e1c03b2e817ccd2b006c6df2619b9a026b (diff)
downloadcoinos-ui-e55b44b42a5e384a807a2703d4744dd1392f227e.tar.gz
coinos-ui-e55b44b42a5e384a807a2703d4744dd1392f227e.zip
refactor settings
Diffstat (limited to 'src/lib/socket.js')
-rw-r--r--src/lib/socket.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/lib/socket.js b/src/lib/socket.js
index 6678b979..9b4a8dce 100644
--- a/src/lib/socket.js
+++ b/src/lib/socket.js
@@ -36,11 +36,8 @@ export const messages = (data) => ({
async payment() {
let { amount, invoice } = data;
- if (invoice) {
- invoices.set({ ...get(invoices), [invoice.uuid]: invoice });
- }
-
- if (get(user).account_id !== data.account_id) return;
+ if (invoice) invalidate("app:invoice");
+ if (get(user)?.account_id !== data.account_id) return;
let payments = get(txns);
let i = payments.findIndex((p) => p.id === data.id);