From acaf0db9e6a631c489f0ea775c153c2005f95fd9 Mon Sep 17 00:00:00 2001
From: Reckless_Satoshi <90936742+Reckless-Satoshi@users.noreply.github.com>
Date: Thu, 24 Nov 2022 17:47:49 +0000
Subject: [PATCH] Add routing budget and lnproxy (#328)
* Add advanced options to LN payout form
* Complete amount calcs
* Temporary working solution for lnproxy web only (uses text instead of json)
* Update LNpayment model and logics to use user's routing budget
* Add handle lnproxyserver networks (i2p, tor, clearnet) / (mainnet,testnet)
* Small fixes
* Small fixes
---
.../TradeBox/Forms/LightningPayout.tsx | 23 +++++++++++++++----
frontend/static/lnproxies.json | 4 ++--
2 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/frontend/src/components/TradeBox/Forms/LightningPayout.tsx b/frontend/src/components/TradeBox/Forms/LightningPayout.tsx
index 2bc50b6c..11e5db95 100644
--- a/frontend/src/components/TradeBox/Forms/LightningPayout.tsx
+++ b/frontend/src/components/TradeBox/Forms/LightningPayout.tsx
@@ -25,7 +25,8 @@ import WalletsButton from '../WalletsButton';
import { LoadingButton } from '@mui/lab';
import { pn } from '../../../utils';
-import { ContentCopy, RoundaboutRight, Route, SelfImprovement } from '@mui/icons-material';
+
+import { ContentCopy, Help, RoundaboutRight, Route, SelfImprovement } from '@mui/icons-material';
import { apiClient } from '../../../services/api';
import lnproxies from '../../../../static/lnproxies.json';
@@ -385,7 +386,15 @@ export const LightningPayoutForm = ({
{t('Use Lnproxy')}
}
- />
+ />{' '}
+
+
+
@@ -487,7 +496,9 @@ export const LightningPayoutForm = ({
sx={{ height: '0.5em' }}
onClick={() =>
systemClient.copyToClipboard(
- lightning.useLnproxy ? lightning.lnproxyAmount : lightning.amount,
+ lightning.useLnproxy
+ ? String(lightning.lnproxyAmount)
+ : String(lightning.amount),
)
}
>
@@ -543,7 +554,9 @@ export const LightningPayoutForm = ({
onClickSubmit(lightning.invoice)}
variant='outlined'
color='primary'
diff --git a/frontend/static/lnproxies.json b/frontend/static/lnproxies.json
index 9f0f00a9..57b90d5e 100644
--- a/frontend/static/lnproxies.json
+++ b/frontend/static/lnproxies.json
@@ -1,8 +1,8 @@
[
{
"name": "↬ Lnproxy Dev",
- "mainnetClearnet": "lnproxy.org",
- "mainnetTOR": "rdq6tvulanl7aqtupmoboyk2z3suzkdwurejwyjyjf4itr3zhxrm2lad.onion",
+ "mainnetClearnet": "https://lnproxy.org",
+ "mainnetTOR": "http://rdq6tvulanl7aqtupmoboyk2z3suzkdwurejwyjyjf4itr3zhxrm2lad.onion",
"mainnetI2P": "undefined",
"testnetClearnet": "undefined",
"testnetTOR": "undefined",