Skip to content

Commit

Permalink
Merge pull request #303 from clams-tech/release/2.5.3
Browse files Browse the repository at this point in the history
Release 2.5.3
  • Loading branch information
johngribbin authored Jan 4, 2025
2 parents bcac5e7 + a1dc17b commit 238102c
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 29 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Build and Deploy
on:
push:
branches:
- main
permissions:
contents: write
jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3

- name: Install and Build
run: |
yarn
yarn build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: build # The folder the action should deploy.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "remote",
"version": "2.5.1",
"version": "2.5.3",
"scripts": {
"dev": "vite dev",
"dev-https": "vite dev --mode https",
Expand Down
1 change: 0 additions & 1 deletion src/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export const MODE = import.meta.env.MODE

export const API_HOST = 'api.clams.tech'
export const API_URL = `https://${API_HOST}`
export const WS_PROXY = `wss://${API_HOST}/ws-proxy`
export const ALBY_WS_PROXY = 'wss://lnproxy.getalby.com'

export const SEC_IN_MS = 1000
Expand Down
13 changes: 4 additions & 9 deletions src/lib/wallets/configurations/coreln/AdvancedConnection.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { fade } from 'svelte/transition'
import { ALBY_WS_PROXY, WS_PROXY } from '$lib/constants'
import { ALBY_WS_PROXY } from '$lib/constants'
import TextInput from '$lib/components/TextInput.svelte'
import { translate } from '$lib/i18n/translations'
import type { CoreLnConfiguration } from '$lib/@types/wallets.js'
Expand All @@ -11,7 +11,7 @@
let advancedConnectOption: 'default' | 'customProxy' | 'directConnection' =
connection.type === 'direct'
? 'directConnection'
: connection.value === WS_PROXY
: connection.value === ALBY_WS_PROXY
? 'default'
: 'customProxy'
Expand All @@ -35,7 +35,7 @@
} else if (advancedConnectOption === 'directConnection') {
connection = { type: 'direct', value: connection.value === 'ws:' ? connection.value : 'wss:' }
} else {
connection = { type: 'proxy', value: WS_PROXY }
connection = { type: 'proxy', value: ALBY_WS_PROXY }
}
}
Expand Down Expand Up @@ -114,7 +114,7 @@
bind:this={customProxyInput}
bind:value={connection.value}
name={advancedConnectOption}
placeholder={WS_PROXY}
placeholder={ALBY_WS_PROXY}
invalid={customProxyUrlError}
/>
</div>
Expand All @@ -139,11 +139,6 @@
<div
class="flex items-center px-3 py-2 ring-2 ring-purple-500 border border-neutral-600 rounded"
>
<label class="flex items-center cursor-pointer">
<input type="radio" bind:group={connection.value} value={WS_PROXY} />
<span class="ml-1">Remote</span>
</label>

<label class="flex items-center ml-4 cursor-pointer">
<input type="radio" bind:group={connection.value} value={ALBY_WS_PROXY} />
<span class="ml-1">Alby ({$translate('app.labels.tor_support')})</span>
Expand Down
4 changes: 2 additions & 2 deletions src/lib/wallets/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { Wallet, CoreLnConfiguration } from '$lib/@types/wallets.js'
import type { AppError } from '$lib/@types/errors.js'
import type { Session } from '$lib/@types/session.js'
import { WS_PROXY } from '$lib/constants.js'
import { nowSeconds, truncateValue, wait } from '$lib/utils.js'
import { Subject, type Observable, takeUntil, filter, take } from 'rxjs'
import CoreLightning from './coreln/index.js'
Expand All @@ -23,6 +22,7 @@ import {
updateInvoices,
updateAddresses
} from '$lib/db/helpers.js'
import { ALBY_WS_PROXY } from '$lib/constants.js'

type ConnectionCategory = 'lightning' | 'onchain' | 'exchange' | 'custodial' | 'custom'

Expand Down Expand Up @@ -70,7 +70,7 @@ export const walletTypeToInitialConfiguration = (type: Wallet['type']): Wallet['
address: '',
connection: {
type: 'proxy',
value: WS_PROXY
value: ALBY_WS_PROXY
},
token: ''
}
Expand Down
4 changes: 1 addition & 3 deletions src/routes/lnurl/[value]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@
if (!tag) {
parsingLnurl = true
const result = await fetch(`${API_URL}/http-proxy`, {
headers: { 'Target-URL': url.toString() }
}).then(res => res.json())
const result = await fetch(url.toString()).then(res => res.json())
if (result.status === 'ERROR') {
throw {
Expand Down
4 changes: 1 addition & 3 deletions src/routes/lnurl/[value]/auth.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@
loginURL.searchParams.set('key', signer.publicKey)
loginURL.searchParams.set('t', Date.now().toString())
const authResponse = await fetch(`${API_URL}/http-proxy`, {
headers: { 'Target-URL': loginURL.toString() }
}).then((res) => res.json())
const authResponse = await fetch(loginURL.toString()).then(res => res.json())
if (authResponse && authResponse.status === 'OK') {
authenticationSuccess = true
Expand Down
6 changes: 1 addition & 5 deletions src/routes/lnurl/[value]/pay.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,7 @@
url.searchParams.set('comment', comment)
}
const result = await fetch(`${API_URL}/http-proxy`, {
headers: {
'Target-URL': url.toString()
}
}).then(res => res.json())
const result = await fetch(url.toString()).then(res => res.json())
if (result.status === 'ERROR') {
throw {
Expand Down
6 changes: 1 addition & 5 deletions src/routes/lnurl/[value]/withdraw.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,7 @@
url.searchParams.set('k1', k1)
url.searchParams.set('pr', invoice.data.request as string)
const result = await fetch(`${API_URL}/http-proxy`, {
headers: {
'Target-URL': url.toString()
}
}).then(res => res.json())
const result = await fetch(url.toString()).then(res => res.json())
if (result.status === 'ERROR') {
throw {
Expand Down

0 comments on commit 238102c

Please sign in to comment.