diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/routes/invoice/+server.js | 4 | ||||
| -rw-r--r-- | src/routes/launch/+page.svelte | 26 | ||||
| -rw-r--r-- | src/routes/launch/purchase/+page.svelte | 4 |
3 files changed, 20 insertions, 14 deletions
diff --git a/src/routes/invoice/+server.js b/src/routes/invoice/+server.js index d4c4c303..1a196bcf 100644 --- a/src/routes/invoice/+server.js +++ b/src/routes/invoice/+server.js @@ -5,11 +5,13 @@ export async function POST({ request, parent }) { let invoice = { amount, currency, network, rate, tip }; if (network === 'lightning') { - invoice.text = await post('/lightning/invoice', { amount }, auth(request)); + invoice.text = (await post('/lightning/invoice', { amount }, auth(request))).text; } else { invoice.address = (await parent()).user.address; } + console.log("INVOICE", invoice) + return new Response( JSON.stringify(await post('/invoice', { invoice, user: { username } }, auth(request))), { headers: { 'content-type': 'application/json' } } diff --git a/src/routes/launch/+page.svelte b/src/routes/launch/+page.svelte index 98d9dba6..feb8fe85 100644 --- a/src/routes/launch/+page.svelte +++ b/src/routes/launch/+page.svelte @@ -1,14 +1,20 @@ <script> - import { redirect } from "$lib/store"; + import { redirect } from '$lib/store'; - export let data; - let { user } = data; - $: link = user ? '/launch/purchase' : '/register'; - $redirect = '/launch/purchase'; + export let data; + let { user } = data; + $: link = user ? '/launch/purchase' : '/register'; + $redirect = '/launch/purchase'; </script> -<div class="mx-auto h-screen flex items-center justify-center px-8"> + +<div class="flex mt-20 px-8"> + <img + src="/images/ticket.webp" + class="mb-8 md:max-w-xl mx-auto border border-gray-400" + /> +</div> +<div class="mx-auto flex items-center justify-center px-8"> <div class="flex flex-col w-full bg-white rounded shadow-lg sm:w-3/4 md:w-1/2 lg:w-3/5"> - <img src="/images/ticket.webp" /> <div class="flex flex-col w-full md:flex-row"> <div class="flex flex-row justify-around p-4 font-bold leading-none text-gray-800 uppercase bg-gray-400 rounded md:flex-col md:items-center md:justify-center md:w-1/4" @@ -19,7 +25,7 @@ </div> <div class="p-4 font-normal text-gray-800 md:w-3/4"> <h1 class="mb-4 text-4xl font-bold leading-none tracking-tight text-gray-800"> - Coinos Launch Party Ticket + Coinos Launch Party </h1> <p class="leading-normal mb-2"> Come join us at our launch party celebrating 10 years in business! We'll be introducing @@ -28,11 +34,11 @@ </p> <div class="flex w-full my-8"> - <a href={link}> + <a href={link}> <button class="bg-white text-black border rounded-full px-8 py-4 font-bold hover:opacity-80 mx-auto text-2xl" > - Purchase with Bitcoin {user.username} + Purchase Ticket </button> </a> </div> diff --git a/src/routes/launch/purchase/+page.svelte b/src/routes/launch/purchase/+page.svelte index c6777349..4225101e 100644 --- a/src/routes/launch/purchase/+page.svelte +++ b/src/routes/launch/purchase/+page.svelte @@ -5,8 +5,7 @@ let amount = 35000; let { - account: { address, balance }, - address, + account: { balance }, username } = data.user; @@ -14,7 +13,6 @@ let get = async (network) => { invoice = await post('/invoice', { amount, - address, rate: $selectedRate, network, username |
