Skip to content

Commit 703e07f

Browse files
refactor(abstract-utxo): remove dead code altScriptHash and supportAltScriptDestination
These properties were set but never read anywhere in the BitGo codebase. Removing them also eliminates the utxo-lib dependency from ltc.ts and tltc.ts. Co-authored-by: Cursor <cursoragent@cursor.com> TICKET: BTC-2650
1 parent 839372c commit 703e07f

3 files changed

Lines changed: 0 additions & 18 deletions

File tree

modules/abstract-utxo/src/abstractUtxoCoin.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,6 @@ export abstract class AbstractUtxoCoin
400400
{
401401
abstract name: UtxoCoinName;
402402

403-
public altScriptHash?: number;
404-
public supportAltScriptDestination?: boolean;
405403
public readonly amountType: 'number' | 'bigint';
406404

407405
protected constructor(bitgo: BitGoBase, amountType: 'number' | 'bigint' = 'number') {

modules/abstract-utxo/src/impl/ltc/ltc.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
11
import { BitGoBase } from '@bitgo/sdk-core';
2-
import * as utxolib from '@bitgo/utxo-lib';
32

43
import { AbstractUtxoCoin } from '../../abstractUtxoCoin';
54
import { UtxoCoinName } from '../../names';
65

76
export class Ltc extends AbstractUtxoCoin {
87
readonly name: UtxoCoinName = 'ltc';
98

10-
constructor(bitgo: BitGoBase) {
11-
super(bitgo);
12-
// use legacy script hash version, which is the current Bitcoin one
13-
this.altScriptHash = utxolib.networks.bitcoin.scriptHash;
14-
// do not support alt destinations in prod
15-
this.supportAltScriptDestination = false;
16-
}
17-
189
static createInstance(bitgo: BitGoBase): Ltc {
1910
return new Ltc(bitgo);
2011
}

modules/abstract-utxo/src/impl/ltc/tltc.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { BitGoBase } from '@bitgo/sdk-core';
2-
import * as utxolib from '@bitgo/utxo-lib';
32

43
import { UtxoCoinName } from '../../names';
54

@@ -8,12 +7,6 @@ import { Ltc } from './ltc';
87
export class Tltc extends Ltc {
98
readonly name: UtxoCoinName = 'tltc';
109

11-
constructor(bitgo: BitGoBase) {
12-
super(bitgo);
13-
this.altScriptHash = utxolib.networks.testnet.scriptHash;
14-
// support alt destinations on test
15-
this.supportAltScriptDestination = false;
16-
}
1710
static createInstance(bitgo: BitGoBase): Tltc {
1811
return new Tltc(bitgo);
1912
}

0 commit comments

Comments
 (0)