diff options
| author | secondl1ght <[email protected]> | 2022-08-22 18:00:00 -0400 |
|---|---|---|
| committer | secondl1ght <[email protected]> | 2022-08-22 18:00:00 -0400 |
| commit | 2aa7156e12200798c45a53878dbcc37c77625752 (patch) | |
| tree | 85d0cb70ec847bb7df8ca08ee5f5328ebc2600f4 /src/lib | |
| parent | bc77cf10532a4060d97b0f804111b4f582151120 (diff) | |
| download | coinos-ui-2aa7156e12200798c45a53878dbcc37c77625752.tar.gz coinos-ui-2aa7156e12200798c45a53878dbcc37c77625752.zip | |
finish hooking up currency selection
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/socket.js | 3 | ||||
| -rw-r--r-- | src/lib/store.js | 2 | ||||
| -rw-r--r-- | src/lib/utils.js | 4 |
3 files changed, 3 insertions, 6 deletions
diff --git a/src/lib/socket.js b/src/lib/socket.js index a30d4376..e85e8f15 100644 --- a/src/lib/socket.js +++ b/src/lib/socket.js @@ -1,5 +1,5 @@ import { get } from 'svelte/store'; -import { rate, user, token, invoices, preferredCurrency, newPayment } from '$lib/store'; +import { rate, user, token, invoices, newPayment } from '$lib/store'; import { success } from '$lib/utils'; let interval, socket; @@ -32,7 +32,6 @@ export const messages = (data) => ({ login() { user.set(data); - preferredCurrency.set('USD'); } }); diff --git a/src/lib/store.js b/src/lib/store.js index 8469dab7..18a8824f 100644 --- a/src/lib/store.js +++ b/src/lib/store.js @@ -30,12 +30,10 @@ const persistLocal = (key, defaultValue) => { export const rate = writable(); export const rates = writable(); export const selectedRate = writable(); -export const conversion = writable(); export const user = writable(); export const invoiceAmount = writable(); export const invoiceAmountFiat = writable(); export const token = persistSession('token'); export const invoices = writable({}); -export const preferredCurrency = writable(); export const newPayment = persistLocal('newPayment'); export const colorTheme = writable('from-primary to-gradient'); diff --git a/src/lib/utils.js b/src/lib/utils.js index 3f2f566e..a1bdf8d7 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -22,7 +22,7 @@ export const get = (url, headers = { accept: 'application/json' }) => export const post = (url, body, headers) => { headers = { ...headers, accept: 'application/json', 'content-type': 'application/json' }; return fetch(base + url, { - method: "POST", + method: 'POST', body: JSON.stringify(body), headers }) @@ -44,7 +44,7 @@ export const post = (url, body, headers) => { export const put = (url, body, headers) => { headers = { ...headers, 'content-type': 'application/json' }; return fetch(base + url, { - method: "PUT", + method: 'PUT', body: JSON.stringify(body), headers }); |
