Skip to content

Commit 19a918f

Browse files
committed
refactor(batch-snapshot): remove Clarity API key references from batch structures
- Removed hasClarityApiKey and clarityApiKeyLength fields from BatchProgress and BatchResults interfaces. - Updated logging in BatchSnapshotOrchestrator to exclude Clarity API key information for improved clarity and security. - Adjusted WalletFailure interface to remove Clarity API key references in the wallet structure.
1 parent 186dd3e commit 19a918f

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

scripts/batch-snapshot-orchestrator.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,13 @@ interface BatchProgress {
4646
isArchived: boolean;
4747
verified: number;
4848
hasDRepKeys: boolean;
49-
hasClarityApiKey: boolean;
5049
// Character counts for key fields
5150
scriptCborLength: number;
5251
stakeCredentialLength: number;
5352
signersAddressesLength: number;
5453
signersStakeKeysLength: number;
5554
signersDRepKeysLength: number;
5655
signersDescriptionsLength: number;
57-
clarityApiKeyLength: number;
5856
};
5957
}>;
6058
}
@@ -94,15 +92,13 @@ interface BatchResults {
9492
isArchived: boolean;
9593
verified: number;
9694
hasDRepKeys: boolean;
97-
hasClarityApiKey: boolean;
9895
// Character counts for key fields
9996
scriptCborLength: number;
10097
stakeCredentialLength: number;
10198
signersAddressesLength: number;
10299
signersStakeKeysLength: number;
103100
signersDRepKeysLength: number;
104101
signersDescriptionsLength: number;
105-
clarityApiKeyLength: number;
106102
};
107103
}>;
108104
failureSummary: Record<string, number>;
@@ -290,7 +286,6 @@ class BatchSnapshotOrchestrator {
290286
console.log(` • Is Archived: ${structure.isArchived}`);
291287
console.log(` • Verified Count: ${structure.verified}`);
292288
console.log(` • Has DRep Keys: ${structure.hasDRepKeys} (${structure.signersDRepKeysLength} items)`);
293-
console.log(` • Has Clarity API Key: ${structure.hasClarityApiKey} (${structure.clarityApiKeyLength} chars)`);
294289
console.log(` • Signers Addresses: ${structure.signersAddressesLength} items`);
295290
console.log(` • Signers Stake Keys: ${structure.signersStakeKeysLength} items`);
296291
console.log(` • Signers Descriptions: ${structure.signersDescriptionsLength} items`);

src/pages/api/v1/stats/run-snapshots-batch.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,13 @@ interface WalletFailure {
3434
isArchived: boolean;
3535
verified: number;
3636
hasDRepKeys: boolean;
37-
hasClarityApiKey: boolean;
3837
// Character counts for key fields
3938
scriptCborLength: number;
4039
stakeCredentialLength: number;
4140
signersAddressesLength: number;
4241
signersStakeKeysLength: number;
4342
signersDRepKeysLength: number;
4443
signersDescriptionsLength: number;
45-
clarityApiKeyLength: number;
4644
};
4745
}
4846

@@ -86,15 +84,13 @@ function getWalletStructure(wallet: DbWallet): WalletFailure['walletStructure']
8684
isArchived: wallet.isArchived || false,
8785
verified: wallet.verified?.length || 0, // verified is String[] in schema
8886
hasDRepKeys: !!(wallet.signersDRepKeys && wallet.signersDRepKeys.length > 0),
89-
hasClarityApiKey: !!wallet.clarityApiKey,
9087
// Character counts for key fields
9188
scriptCborLength: wallet.scriptCbor?.length || 0,
9289
stakeCredentialLength: wallet.stakeCredentialHash?.length || 0,
9390
signersAddressesLength: wallet.signersAddresses?.length || 0,
9491
signersStakeKeysLength: wallet.signersStakeKeys?.length || 0,
9592
signersDRepKeysLength: wallet.signersDRepKeys?.length || 0,
9693
signersDescriptionsLength: wallet.signersDescriptions?.length || 0,
97-
clarityApiKeyLength: wallet.clarityApiKey?.length || 0,
9894
};
9995
}
10096

0 commit comments

Comments
 (0)