diff options
| author | Adam Soltys <[email protected]> | 2022-11-09 09:53:33 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-11-09 09:53:33 -0800 |
| commit | ccc13974d22a47995b5f9f674891a39d54aa0620 (patch) | |
| tree | 57ace0c3dbcdcb9e7a4472478068b102406ee99e /src/lib/socket.js | |
| parent | 695d2d6788752cd4f0695686f3acf7ca2099e3a9 (diff) | |
| download | coinos-ui-ccc13974d22a47995b5f9f674891a39d54aa0620.tar.gz coinos-ui-ccc13974d22a47995b5f9f674891a39d54aa0620.zip | |
refactor settings
Diffstat (limited to 'src/lib/socket.js')
| -rw-r--r-- | src/lib/socket.js | 7 |
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); |
