Skip to content

Commit

Permalink
Merge pull request #1361 from kaloudis/node-info-pubkey
Browse files Browse the repository at this point in the history
Node info: display pubkey
  • Loading branch information
kaloudis authored Mar 13, 2023
2 parents 57a18d9 + e7ba056 commit b4e856e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions components/KeyValue.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ export default function KeyValue({

const styles = StyleSheet.create({
key: {
paddingRight: 40,
maxWidth: '52%'
paddingRight: 35,
maxWidth: '50%'
},
value: {
flex: 1,
Expand Down
1 change: 1 addition & 0 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@
"views.NodeInfo.forwarding": "Forwarding",
"views.NodeInfo.copyUri": "Copy URI",
"views.NodeInfo.alias": "Alias",
"views.NodeInfo.pubkey": "Pubkey",
"views.NodeInfo.implementationVersion": "Implementation Version",
"views.NodeInfo.zeusVersion": "Zeus Version",
"views.NodeInfo.synced": "Synced to Chain",
Expand Down
2 changes: 1 addition & 1 deletion models/NodeInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default class NodeInfo extends BaseModel {
api_version?: string;

@computed public get nodeId(): string {
return this.id || this.pubkey || this.identity_pubkey || 'N/A';
return this.id || this.pubkey || this.identity_pubkey || '';
}

@computed public get isTestNet(): boolean {
Expand Down
8 changes: 8 additions & 0 deletions views/NodeInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ export default class NodeInfo extends React.Component<NodeInfoProps, {}> {
sensitive
/>

{nodeInfo.nodeId && (
<KeyValue
keyValue={localeString('views.NodeInfo.pubkey')}
value={nodeInfo.nodeId}
sensitive
/>
)}

{nodeInfo.version && (
<KeyValue
keyValue={localeString(
Expand Down

0 comments on commit b4e856e

Please sign in to comment.