diff options
| author | Adam Soltys <[email protected]> | 2023-09-20 17:59:33 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-09-20 17:59:33 -0700 |
| commit | 3d8943e5bc1fbe7904d04531521f5496962e6efc (patch) | |
| tree | 5d246545b22e752116032517121744db90006279 /src | |
| parent | ff3609fe6cdb3606828592903d212599b65b6ee4 (diff) | |
| download | coinos-ui-3d8943e5bc1fbe7904d04531521f5496962e6efc.tar.gz coinos-ui-3d8943e5bc1fbe7904d04531521f5496962e6efc.zip | |
fix ws url
Diffstat (limited to 'src')
| -rw-r--r-- | src/routes/(app)/[username]/shopify.js/+server.js | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/routes/(app)/[username]/shopify.js/+server.js b/src/routes/(app)/[username]/shopify.js/+server.js index 36c1b022..f5bb8d50 100644 --- a/src/routes/(app)/[username]/shopify.js/+server.js +++ b/src/routes/(app)/[username]/shopify.js/+server.js @@ -148,20 +148,24 @@ window.addEventListener('load', async () => { bg.style.background = 'linear-gradient(to right, #F2F6FC, #E1E3FF)'; bg.style.zIndex = '0'; - let ws = new WebSocket('wss://dev.coinos.io/ws'); + let ws = new WebSocket('wss://${url.host}/ws'); ws.onmessage = ({ data }) => { try { let { type, data: d } = JSON.parse(data); if (type === 'payment') { main.innerHTML = '<img id="check" src="https://${url.host}/icons/check.svg" alt="Check" />' + - \`<h1>Payment received!</h1> - <h2> - \${((d.amount * d.rate) / 100000000).toFixed(2)} CAD - </h2> - <h3> - ⚡️\${d.amount} - </h3>\`; + \` + + <h1>Payment received!</h1> + + <div style="width: 100%; text-align: center; "> + <div style="font-size: 24px; font-weight: bold; margin-bottom: 12px;">\${f( + (d.amount * d.rate) / 100000000, + d.currency + )}</div> + <div style="color: #666; font-size: 18px;">\${sat(d.amount)}</div> + </div>\`; var image = document.getElementById('check'); image.addEventListener('load', function () { |
