Skip to content

Commit

Permalink
fix: remove staking related files
Browse files Browse the repository at this point in the history
TICKET: WIN-4297
  • Loading branch information
yash-bitgo committed Jan 30, 2025
1 parent 6484247 commit 440308c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 53 deletions.
7 changes: 0 additions & 7 deletions modules/sdk-coin-tao/src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,9 @@ import * as Interface from './iface';
export { KeyPair } from './keyPair';
export { Transaction } from './transaction';
export { TransactionBuilder } from './transactionBuilder';
export { StakingBuilder } from './stakingBuilder';
export { TransferBuilder } from './transferBuilder';
export { AddressInitializationBuilder } from './addressInitializationBuilder';
export { BatchTransactionBuilder } from './batchTransactionBuilder';
export { UnstakeBuilder } from './unstakeBuilder';
export { UnnominateBuilder } from './unnominateBuilder';
export { WithdrawUnstakedBuilder } from './withdrawUnstakedBuilder';
export { ClaimBuilder } from './claimBuilder';
export { TransactionBuilderFactory } from './transactionBuilderFactory';
export { SingletonRegistry } from './singletonRegistry';
export { NativeTransferBuilder } from './nativeTransferBuilder';
export { RemoveProxyBuilder } from './proxyBuilder';
export { Interface, Utils };
46 changes: 0 additions & 46 deletions modules/sdk-coin-tao/src/lib/transactionBuilderFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,10 @@ import { BaseCoin as CoinConfig } from '@bitgo/statics';
import { decode } from '@substrate/txwrapper-polkadot';
import { AddressInitializationBuilder } from './addressInitializationBuilder';
import { Material, MethodNames } from './iface';
import { RemoveProxyBuilder } from './proxyBuilder';
import { SingletonRegistry } from './singletonRegistry';
import { StakingBuilder } from './stakingBuilder';
import { TransferBuilder } from './transferBuilder';
import { TransactionBuilder } from './transactionBuilder';
import { UnnominateBuilder } from './unnominateBuilder';
import utils from './utils';
import { BatchTransactionBuilder, ClaimBuilder, UnstakeBuilder, WithdrawUnstakedBuilder } from '.';

export class TransactionBuilderFactory extends BaseTransactionBuilderFactory {
protected _material: Material;
Expand All @@ -24,42 +20,14 @@ export class TransactionBuilderFactory extends BaseTransactionBuilderFactory {
return new TransferBuilder(this._coinConfig).material(this._material);
}

getStakingBuilder(): StakingBuilder {
return new StakingBuilder(this._coinConfig).material(this._material);
}

getAddressInitializationBuilder(): AddressInitializationBuilder {
return new AddressInitializationBuilder(this._coinConfig).material(this._material);
}

getRemoveProxyBuilder(): RemoveProxyBuilder {
return new RemoveProxyBuilder(this._coinConfig).material(this._material);
}

getBatchTransactionBuilder(): BatchTransactionBuilder {
return new BatchTransactionBuilder(this._coinConfig).material(this._material);
}

getWalletInitializationBuilder(): void {
throw new NotImplementedError(`walletInitialization for ${this._coinConfig.name} not implemented`);
}

getUnstakeBuilder(): UnstakeBuilder {
return new UnstakeBuilder(this._coinConfig).material(this._material);
}

getWithdrawUnstakedBuilder(): WithdrawUnstakedBuilder {
return new WithdrawUnstakedBuilder(this._coinConfig).material(this._material);
}

getClaimBuilder(): ClaimBuilder {
return new ClaimBuilder(this._coinConfig).material(this._material);
}

getUnnominateBuilder(): UnnominateBuilder {
return new UnnominateBuilder(this._coinConfig);
}

from(rawTxn: string): TransactionBuilder {
const builder = this.getBuilder(rawTxn);
builder.from(rawTxn);
Expand All @@ -85,22 +53,8 @@ export class TransactionBuilderFactory extends BaseTransactionBuilderFactory {
methodName === MethodNames.Proxy
) {
return this.getTransferBuilder();
} else if (methodName === MethodNames.Bond || methodName === MethodNames.BondExtra) {
return this.getStakingBuilder();
} else if (methodName === MethodNames.AddProxy) {
return this.getAddressInitializationBuilder();
} else if (methodName === MethodNames.RemoveProxy) {
return this.getRemoveProxyBuilder();
} else if (methodName === MethodNames.Unbond) {
return this.getUnstakeBuilder();
} else if (methodName === MethodNames.Chill) {
return this.getUnnominateBuilder();
} else if (methodName === MethodNames.WithdrawUnbonded) {
return this.getWithdrawUnstakedBuilder();
} else if (methodName === MethodNames.PayoutStakers) {
return this.getClaimBuilder();
} else if (methodName === MethodNames.Batch || methodName === MethodNames.BatchAll) {
return this.getBatchTransactionBuilder();
} else {
throw new NotSupported('Transaction cannot be parsed or has an unsupported transaction type');
}
Expand Down

0 comments on commit 440308c

Please sign in to comment.