mirror of
https://github.com/RoboSats/robosats.git
synced 2024-12-24 04:43:29 +03: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 { 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')}
|
||||
</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>
|
||||
</Tooltip>
|
||||
</Grid>
|
||||
@ -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 = ({
|
||||
<LoadingButton
|
||||
loading={loadingLnproxy}
|
||||
disabled={
|
||||
lightning.lnproxyInvoice.length < 20 || badLnproxyServer || lightning.badLnproxy
|
||||
lightning.lnproxyInvoice.length < 20 ||
|
||||
badLnproxyServer != '' ||
|
||||
lightning.badLnproxy
|
||||
}
|
||||
onClick={fetchLnproxy}
|
||||
variant='outlined'
|
||||
@ -556,7 +569,7 @@ export const LightningPayoutForm = ({
|
||||
)}
|
||||
<LoadingButton
|
||||
loading={loading}
|
||||
disabled={lightning.invoice == ''}
|
||||
disabled={lightning.invoice.length < 20 || lightning.badInvoice}
|
||||
onClick={() => onClickSubmit(lightning.invoice)}
|
||||
variant='outlined'
|
||||
color='primary'
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user