Skip to content

Commit

Permalink
fix nits
Browse files Browse the repository at this point in the history
  • Loading branch information
nitesh authored and nitesh committed Jun 10, 2024
1 parent 6a6754a commit 460d7ca
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion backends/CoreLightningRestApi.ts → backends/CLNRest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
listPeers
} from './CoreLightningRequestHandler';

export default class CoreLightningRestApi extends LND {
export default class CLNRest extends LND {
getHeaders = (rune: string): any => {
return {
Rune: rune
Expand Down
4 changes: 2 additions & 2 deletions backends/CoreLightningRequestHandler.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import CoreLightningRestApi from './CoreLightningRestApi';
import CLNRest from './CLNRest';

const api = new CoreLightningRestApi();
const api = new CLNRest();

// Returns onchain balance of core-lightning node
export const getBalance = (data: any) => {
Expand Down
4 changes: 2 additions & 2 deletions components/SetFeesForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export default class SetFeesForm extends React.Component<
>
{`${localeString('components.SetFeesForm.feeRate')} (${
implementation === 'c-lightning-REST' ||
implementation === 'core-lightning-rest-api'
implementation === 'cln-rest'
? localeString(
'components.SetFeesForm.ppmMilliMsat'
)
Expand All @@ -136,7 +136,7 @@ export default class SetFeesForm extends React.Component<
placeholder={
feeRate ||
implementation === 'c-lightning-REST' ||
implementation === 'core-lightning-rest-api'
implementation === 'cln-rest'
? '1'
: '0.001'
}
Expand Down
2 changes: 1 addition & 1 deletion stores/ChannelsStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ export default class ChannelsStore {

if (
implementation === 'c-lightning-REST' ||
implementation === 'core-lightning-rest-api' ||
implementation === 'cln-rest' ||
implementation === 'eclair' ||
implementation === 'spark'
) {
Expand Down
4 changes: 2 additions & 2 deletions stores/SettingsStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export const INTERFACE_KEYS = [
{ key: 'Embedded LND', value: 'embedded-lnd' },
{ key: 'LND (REST)', value: 'lnd' },
{ key: 'LND (Lightning Node Connect)', value: 'lightning-node-connect' },
{ key: 'Core Lightning REST API', value: 'core-lightning-rest-api' },
{ key: 'Core Lightning (CLNRest)', value: 'cln-rest' },
{ key: 'LNDHub', value: 'lndhub' },
{
key: '[DEPRECATED] Core Lightning (c-lightning-REST)',
Expand All @@ -220,7 +220,7 @@ export type Implementations =
| 'embedded-lnd'
| 'lnd'
| 'lightning-node-connect'
| 'core-lightning-rest-api'
| 'cln-rest'
| 'lndhub'
| 'c-lightning-REST'
| 'spark'
Expand Down
3 changes: 1 addition & 2 deletions stores/TransactionsStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,7 @@ export default class TransactionsStore {

const payFunc =
(this.settingsStore.implementation === 'c-lightning-REST' ||
this.settingsStore.implementation ===
'core-lightning-rest-api' ||
this.settingsStore.implementation === 'cln-rest' ||
this.settingsStore.implementation === 'embedded-lnd') &&
pubkey
? BackendUtils.sendKeysend
Expand Down
10 changes: 5 additions & 5 deletions utils/BackendUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import LightningNodeConnect from '../backends/LightningNodeConnect';
import EmbeddedLND from '../backends/EmbeddedLND';
// Core Lightning
import CLightningREST from '../backends/CLightningREST';
import CoreLightningRestApi from '../backends/CoreLightningRestApi';
import CLNRest from '../backends/CLNRest';
import Spark from '../backends/Spark';
// Eclair
import Eclair from '../backends/Eclair';
Expand All @@ -17,7 +17,7 @@ class BackendUtils {
lightningNodeConnect: LightningNodeConnect;
embeddedLND: EmbeddedLND;
clightningREST: CLightningREST;
coreLightningRestApi: CoreLightningRestApi;
clnRest: CLNRest;
spark: Spark;
eclair: Eclair;
lndHub: LndHub;
Expand All @@ -26,7 +26,7 @@ class BackendUtils {
this.lightningNodeConnect = new LightningNodeConnect();
this.embeddedLND = new EmbeddedLND();
this.clightningREST = new CLightningREST();
this.coreLightningRestApi = new CoreLightningRestApi();
this.clnRest = new CLNRest();
this.spark = new Spark();
this.eclair = new Eclair();
this.lndHub = new LndHub();
Expand All @@ -43,8 +43,8 @@ class BackendUtils {
return this.embeddedLND;
case 'c-lightning-REST':
return this.clightningREST;
case 'core-lightning-rest-api':
return this.coreLightningRestApi;
case 'cln-rest':
return this.clnRest;
case 'spark':
return this.spark;
case 'eclair':
Expand Down
2 changes: 1 addition & 1 deletion views/Settings/NodeConfiguration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1352,7 +1352,7 @@ export default class NodeConfiguration extends React.Component<
)}
</>
)}
{implementation === 'core-lightning-rest-api' && (
{implementation === 'cln-rest' && (
<>
<Text
style={{
Expand Down

0 comments on commit 460d7ca

Please sign in to comment.