Compare commits
No commits in common. "190e38dfc1feb20a1bc56a1b17ccb94b37b69297" and "36c7401fa8702d9fc3be69c6d674f03b228ed068" have entirely different histories.
190e38dfc1
...
36c7401fa8
1 changed files with 1 additions and 6 deletions
7
index.ts
7
index.ts
|
@ -36,7 +36,6 @@ import {
|
||||||
isValidJSON,
|
isValidJSON,
|
||||||
parseATagQuery,
|
parseATagQuery,
|
||||||
} from './utils.ts';
|
} from './utils.ts';
|
||||||
import { encryptUint8Array, encryptionKey } from './utils/encryption.ts';
|
|
||||||
import { getEveFilePath } from './utils/files.ts';
|
import { getEveFilePath } from './utils/files.ts';
|
||||||
import { log, setupLogger } from './utils/logs.ts';
|
import { log, setupLogger } from './utils/logs.ts';
|
||||||
import { mixQuery, sql, sqlPartial } from './utils/queries.ts';
|
import { mixQuery, sql, sqlPartial } from './utils/queries.ts';
|
||||||
|
@ -974,11 +973,7 @@ async function handleAddCCN(
|
||||||
|
|
||||||
const ccnPublicKey = nostrTools.getPublicKey(privateKeyBytes);
|
const ccnPublicKey = nostrTools.getPublicKey(privateKeyBytes);
|
||||||
const ccnPrivPath = await getEveFilePath(`ccn_keys/${ccnPublicKey}`);
|
const ccnPrivPath = await getEveFilePath(`ccn_keys/${ccnPublicKey}`);
|
||||||
const encryptedPrivateKey = encryptUint8Array(
|
Deno.writeTextFileSync(ccnPrivPath, encodeBase64(privateKeyBytes));
|
||||||
privateKeyBytes,
|
|
||||||
encryptionKey,
|
|
||||||
);
|
|
||||||
Deno.writeTextFileSync(ccnPrivPath, encodeBase64(encryptedPrivateKey));
|
|
||||||
|
|
||||||
db.run('BEGIN TRANSACTION');
|
db.run('BEGIN TRANSACTION');
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue