aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorsecondl1ght <[email protected]>2022-07-28 22:17:58 -0600
committersecondl1ght <[email protected]>2022-07-28 22:17:58 -0600
commitbcb252eb0b52f64449dad295595fdaa5e80cb5dc (patch)
treec740cf6fc4513a619f41361df3daa25e07cfe48d /src
parentcd9e850f9e15e890727026942d646d59f526fe4e (diff)
downloadcoinos-ui-bcb252eb0b52f64449dad295595fdaa5e80cb5dc.tar.gz
coinos-ui-bcb252eb0b52f64449dad295595fdaa5e80cb5dc.zip
final adjustments for numpad
Diffstat (limited to 'src')
-rw-r--r--src/components/RegisterOrLogin.svelte4
-rw-r--r--src/lib/socket.js2
-rw-r--r--src/routes/receive.svelte10
3 files changed, 12 insertions, 4 deletions
diff --git a/src/components/RegisterOrLogin.svelte b/src/components/RegisterOrLogin.svelte
index db577911..6cae8b5a 100644
--- a/src/components/RegisterOrLogin.svelte
+++ b/src/components/RegisterOrLogin.svelte
@@ -77,7 +77,9 @@
</p>
{:else}
<div class="flex justify-end items-center">
- <a href="/forgot" class="underline underline-offset-4 text-black text-sm">Forgot Password?</a>
+ <a href="/forgot" class="underline underline-offset-4 text-black text-sm"
+ >Forgot Password?</a
+ >
</div>
{/if}
diff --git a/src/lib/socket.js b/src/lib/socket.js
index 90238c23..087addf9 100644
--- a/src/lib/socket.js
+++ b/src/lib/socket.js
@@ -24,7 +24,7 @@ export const messages = (data) => ({
connected: auth,
login() {
- console.log("OY", data)
+ console.log('OY', data);
user.set(data);
}
});
diff --git a/src/routes/receive.svelte b/src/routes/receive.svelte
index a67b0787..338bc06c 100644
--- a/src/routes/receive.svelte
+++ b/src/routes/receive.svelte
@@ -32,6 +32,8 @@
if (useFiat) {
if (amountFiat === 0 && value !== '.' && value !== '<' && value !== '0') {
amountFiat = value;
+ } else if ((amountFiat === 0 || amountFiat === '0') && value === '0') {
+ return;
} else if (amountFiat === 0 && value === '.') {
amountFiat = '0.';
} else if (amountFiat !== 0 && amountFiat.includes('.') && value === '.') {
@@ -41,6 +43,7 @@
amountFiat = amountFiat.slice(0, amountFiat.length - 1);
if (amountFiat.length === 0) {
amountFiat = 0;
+ amountSats = 0;
}
}
} else if (value !== '.' && value !== '<' && parseInt(amountFiat + value) > $rate) {
@@ -92,7 +95,10 @@
if (useFiat) {
amountSats = (amountFiat / ($rate / 100000000)).toFixed(0).toString();
} else {
- amountFiat = (amountSats * ($rate / 100000000)).toFixed(2).toString();
+ amountFiat =
+ (amountSats * ($rate / 100000000)).toFixed(2) > 0.0
+ ? (amountSats * ($rate / 100000000)).toFixed(2).toString()
+ : 0;
}
useFiat = !useFiat;
}}><Icon icon="swap" style="inline" /></button
@@ -163,7 +169,7 @@
{:else}
<div class="px-3">
<div
- class="w-full md:w-[300px] h-[475px] md:h-[485px] animate-pulse bg-primary mt-20 mb-3 mx-auto rounded-xl"
+ class="w-full md:w-[300px] h-[475px] md:h-[485px] animate-pulse bg-gray-400 mt-20 mb-3 mx-auto rounded-xl"
/>
</div>
{/if}