Skip to content

Commit 295755e

Browse files
authored
fix: interpolate longName and shortName in PKI backup download (#959)
This caused {{shortName}} and {{longName}} to appear unformatted in the exported key files: ``` === MESHTASTIC KEYS FOR {{longName}} ({{shortName}}) === Private Key: <censored> Public Key: <censored> === END OF KEYS === ``` The fix simply replicates the behaviour used elsewhere in PKIIBackupDialog.
1 parent b99057d commit 295755e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/web/src/components/Dialog/PKIBackupDialog.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,11 @@ export const PkiBackupDialog = ({
9494
const decodedPublicKey = decodeKeyData(publicKey);
9595

9696
const formattedContent = [
97-
`${t("pkiBackup.header")}\n\n`,
97+
`${t("pkiBackup.header", {
98+
interpolation: { escapeValue: false },
99+
shortName: getMyNode()?.user?.shortName ?? t("unknown.shortName"),
100+
longName: getMyNode()?.user?.longName ?? t("unknown.longName"),
101+
})}\n\n`,
98102
`${t("pkiBackup.privateKey")}\n`,
99103
decodedPrivateKey,
100104
`\n\n${t("pkiBackup.publicKey")}\n`,

0 commit comments

Comments
 (0)