mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-18 20:21:35 +00:00
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
This commit is contained in:
parent
86e6bed37c
commit
acaf0db9e6
@ -25,7 +25,8 @@ import WalletsButton from '../WalletsButton';
|
|||||||
import { LoadingButton } from '@mui/lab';
|
import { LoadingButton } from '@mui/lab';
|
||||||
import { pn } from '../../../utils';
|
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 { apiClient } from '../../../services/api';
|
||||||
|
|
||||||
import lnproxies from '../../../../static/lnproxies.json';
|
import lnproxies from '../../../../static/lnproxies.json';
|
||||||
@ -385,7 +386,15 @@ export const LightningPayoutForm = ({
|
|||||||
{t('Use Lnproxy')}
|
{t('Use Lnproxy')}
|
||||||
</Typography>
|
</Typography>
|
||||||
}
|
}
|
||||||
/>
|
/>{' '}
|
||||||
|
<IconButton
|
||||||
|
component='a'
|
||||||
|
target='_blank'
|
||||||
|
href='https://www.lnproxy.org/about'
|
||||||
|
rel='noreferrer'
|
||||||
|
>
|
||||||
|
<Help sx={{ width: '0.9em', height: '0.9em', color: 'text.secondary' }} />
|
||||||
|
</IconButton>
|
||||||
</div>
|
</div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</Grid>
|
</Grid>
|
||||||
@ -487,7 +496,9 @@ export const LightningPayoutForm = ({
|
|||||||
sx={{ height: '0.5em' }}
|
sx={{ height: '0.5em' }}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
systemClient.copyToClipboard(
|
systemClient.copyToClipboard(
|
||||||
lightning.useLnproxy ? lightning.lnproxyAmount : lightning.amount,
|
lightning.useLnproxy
|
||||||
|
? String(lightning.lnproxyAmount)
|
||||||
|
: String(lightning.amount),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
@ -543,7 +554,9 @@ export const LightningPayoutForm = ({
|
|||||||
<LoadingButton
|
<LoadingButton
|
||||||
loading={loadingLnproxy}
|
loading={loadingLnproxy}
|
||||||
disabled={
|
disabled={
|
||||||
lightning.lnproxyInvoice.length < 20 || badLnproxyServer || lightning.badLnproxy
|
lightning.lnproxyInvoice.length < 20 ||
|
||||||
|
badLnproxyServer != '' ||
|
||||||
|
lightning.badLnproxy
|
||||||
}
|
}
|
||||||
onClick={fetchLnproxy}
|
onClick={fetchLnproxy}
|
||||||
variant='outlined'
|
variant='outlined'
|
||||||
@ -556,7 +569,7 @@ export const LightningPayoutForm = ({
|
|||||||
)}
|
)}
|
||||||
<LoadingButton
|
<LoadingButton
|
||||||
loading={loading}
|
loading={loading}
|
||||||
disabled={lightning.invoice == ''}
|
disabled={lightning.invoice.length < 20 || lightning.badInvoice}
|
||||||
onClick={() => onClickSubmit(lightning.invoice)}
|
onClick={() => onClickSubmit(lightning.invoice)}
|
||||||
variant='outlined'
|
variant='outlined'
|
||||||
color='primary'
|
color='primary'
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"name": "↬ Lnproxy Dev",
|
"name": "↬ Lnproxy Dev",
|
||||||
"mainnetClearnet": "lnproxy.org",
|
"mainnetClearnet": "https://lnproxy.org",
|
||||||
"mainnetTOR": "rdq6tvulanl7aqtupmoboyk2z3suzkdwurejwyjyjf4itr3zhxrm2lad.onion",
|
"mainnetTOR": "http://rdq6tvulanl7aqtupmoboyk2z3suzkdwurejwyjyjf4itr3zhxrm2lad.onion",
|
||||||
"mainnetI2P": "undefined",
|
"mainnetI2P": "undefined",
|
||||||
"testnetClearnet": "undefined",
|
"testnetClearnet": "undefined",
|
||||||
"testnetTOR": "undefined",
|
"testnetTOR": "undefined",
|
||||||
|
Loading…
Reference in New Issue
Block a user