Skip to content

Commit bd24111

Browse files
authored
Merge pull request #6845 from BitGo/WP-000000/fix-opeth-staking-call
fix(sdk-core): send staking tx signatures based on wallet config
2 parents 7dbd76e + d39af2e commit bd24111

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

modules/bitgo/test/v2/unit/staking/stakingWalletNonTSS.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,14 @@ describe('non-TSS Staking Wallet', function () {
364364
signStub.restore();
365365
});
366366

367+
it('should return true for isSendCallRequired for topethWctStakingWallet', function () {
368+
// Access the private method using type assertion
369+
const isSendCallRequired = (topethWctStakingWallet as any).isSendCallRequired();
370+
371+
// Check that isSendCallRequired returns true because this is not ETH TSS
372+
isSendCallRequired.should.equal(true);
373+
});
374+
367375
it('should build and validate transaction', async function () {
368376
const unsignedTransaction: PrebuildTransactionResult = {
369377
walletId: topethWctStakingWallet.walletId,

modules/sdk-core/src/bitgo/staking/stakingWallet.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/**
22
* @prettier
33
*/
4+
import { CoinFamily } from '@bitgo/statics';
5+
46
import {
57
DelegationOptions,
68
DelegationResults,
@@ -333,9 +335,9 @@ export class StakingWallet implements IStakingWallet {
333335
* @returns true if send API call to staking service is required else false
334336
*/
335337
private isSendCallRequired(): boolean {
336-
if (this.wallet.baseCoin.getFamily() === 'eth') {
338+
if (this.wallet.baseCoin.getFamily() === CoinFamily.ETH) {
337339
return !this.isEthTss;
338-
} else if (this.wallet.baseCoin.supportsTss()) {
340+
} else if (this.wallet.multisigType() === 'tss') {
339341
return this.wallet.baseCoin.getMPCAlgorithm() !== 'ecdsa';
340342
} else {
341343
return true;

0 commit comments

Comments
 (0)