mirror of
https://github.com/apotdevin/thunderhub.git
synced 2025-02-22 06:21:37 +01:00
fix: ๐ correct hop public key
This commit is contained in:
parent
96f953ff86
commit
64e8f96da4
5 changed files with 6 additions and 4 deletions
|
@ -68,7 +68,7 @@ export const getWithCopy = (text: string) => {
|
|||
};
|
||||
|
||||
export const getNodeLink = (publicKey: string, alias?: string) => {
|
||||
if (alias && alias === 'Node not found') {
|
||||
if (!publicKey || (alias && alias === 'Node not found')) {
|
||||
return 'Node not found';
|
||||
}
|
||||
const link = `${appUrls.oneml}${publicKey}`;
|
||||
|
|
|
@ -72,7 +72,7 @@ export type GetResumeQuery = { __typename?: 'Query' } & {
|
|||
node?: Types.Maybe<
|
||||
{ __typename?: 'nodeType' } & Pick<
|
||||
Types.NodeType,
|
||||
'alias'
|
||||
'alias' | 'public_key'
|
||||
>
|
||||
>;
|
||||
}
|
||||
|
@ -126,6 +126,7 @@ export const GetResumeDocument = gql`
|
|||
hops {
|
||||
node {
|
||||
alias
|
||||
public_key
|
||||
}
|
||||
}
|
||||
id
|
||||
|
|
|
@ -39,6 +39,7 @@ export const GET_RESUME = gql`
|
|||
hops {
|
||||
node {
|
||||
alias
|
||||
public_key
|
||||
}
|
||||
}
|
||||
id
|
||||
|
|
|
@ -89,7 +89,7 @@ export const Decoded = ({ request, setShow }: DecodedProps) => {
|
|||
{renderLine('Forwarded Tokens', hop.forward)}
|
||||
{renderLine(
|
||||
`Destination `,
|
||||
getNodeLink(destination, hop.node.node.alias)
|
||||
getNodeLink(hop.public_key, hop.node.node.alias)
|
||||
)}
|
||||
{renderLine('Channel', hop.channel)}
|
||||
{renderLine(
|
||||
|
|
|
@ -82,7 +82,7 @@ export const PaymentsCard = ({
|
|||
{hops.map((hop, index: number) =>
|
||||
renderLine(
|
||||
`Hop ${index + 1}:`,
|
||||
getNodeLink(destination, hop.node.alias)
|
||||
getNodeLink(hop.node.public_key, hop.node.alias)
|
||||
)
|
||||
)}
|
||||
{renderLine('Id:', id)}
|
||||
|
|
Loadingโฆ
Add table
Reference in a new issue