Skip to content

Commit 44684d9

Browse files
committed
rm dead code and fix min bytes constant
1 parent 550a2af commit 44684d9

2 files changed

Lines changed: 1 addition & 5 deletions

File tree

packages/bitcore-vault/src/securityManager.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ export class SecurityManager {
3838
const { total } = secureHeapUsed();
3939
return total > 0;
4040
}
41-
42-
public secureHeapAllocationCheck(): boolean {
43-
return this.secureHeapBaseAllocation >= SecurityManager.getCurrentSecureHeapAllocation();
44-
}
4541

4642
// Helpers
4743
public static getCurrentSecureHeapAllocation(): number {

packages/bitcore-vault/src/vaultWalletProxy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ export class VaultWalletProxy {
307307
if (!this.publicKey) throw new Error('Vault not initialized (missing public key)');
308308

309309
const promptText = opts.prompt ?? 'Passphrase: ';
310-
const maxBytes = Math.min(Math.max(opts.maxBytes ?? 256, 8), 4096);
310+
const maxBytes = Math.min(Math.max(opts.maxBytes ?? 256, 8), 190);
311311
const stdin = process.stdin as NodeJS.ReadStream & { setRawMode?: (mode: boolean) => void };
312312
const plain = Buffer.alloc(maxBytes);
313313
let len = 0;

0 commit comments

Comments
 (0)