Skip to content

Commit a5259af

Browse files
OttoAllmendingerllm-git
andcommitted
feat(sdk-core): remove dependency on inferAddressType function
There is no need to infer an address type Issue: BTC-2668 Co-authored-by: llm-git <llm-git@ttll.de>
1 parent 8e3d18f commit a5259af

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

modules/sdk-core/src/bitgo/utils/abstractUtxoCoinUtil.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import * as utxolib from '@bitgo/utxo-lib';
44
import ScriptType2Of3 = utxolib.bitgo.outputScripts.ScriptType2Of3;
55
import { WalletType } from '../wallet';
66

7+
/** @deprecated - will be removed when we drop support for utxolib */
78
export function inferAddressType(addressDetails: { chain: number }): ScriptType2Of3 | null {
89
return utxolib.bitgo.isChainCode(addressDetails.chain)
910
? utxolib.bitgo.scriptTypeForChain(addressDetails.chain)

modules/sdk-core/src/bitgo/wallet/wallet.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ import { TradingAccount } from '../trading';
4040
import { getTxRequest } from '../tss';
4141
import {
4242
EddsaUnsignedTransaction,
43-
inferAddressType,
4443
IntentOptionsForMessage,
4544
IntentOptionsForTypedData,
4645
RequestTracer,
@@ -1389,11 +1388,6 @@ export class Wallet implements IWallet {
13891388
.send(addressParams)
13901389
.result()) as any;
13911390

1392-
// infer its address type
1393-
if (_.isObject(newAddress.coinSpecific)) {
1394-
newAddress.addressType = inferAddressType(newAddress);
1395-
}
1396-
13971391
newAddress.keychains = keychains;
13981392
newAddress.baseAddress = baseAddress ?? _.get(this._wallet, 'coinSpecific.baseAddress');
13991393
newAddress.format = addressParams.format;

0 commit comments

Comments
 (0)