From f41255d7712186b0b267e11789c8c2e69fbe422e Mon Sep 17 00:00:00 2001 From: Yashvanth B L Date: Wed, 24 Jun 2026 20:15:36 +0530 Subject: [PATCH] fix(sdk-coin-polyx): stub getMaterial in recovery unit tests Ticket: CGD-1862 --- modules/sdk-coin-polyx/test/unit/polyx.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/sdk-coin-polyx/test/unit/polyx.ts b/modules/sdk-coin-polyx/test/unit/polyx.ts index 46f9617253..6b6b7ff5a8 100644 --- a/modules/sdk-coin-polyx/test/unit/polyx.ts +++ b/modules/sdk-coin-polyx/test/unit/polyx.ts @@ -3,6 +3,8 @@ import { TestBitGo, TestBitGoAPI } from '@bitgo/sdk-test'; import { BitGoAPI } from '@bitgo/sdk-api'; import { Polyx, Tpolyx } from '../../src'; import { POLYX_ADDRESS_FORMAT, TPOLYX_ADDRESS_FORMAT } from '../../src/lib/constants'; +import utils from '../../src/lib/utils'; +import { coins } from '@bitgo/statics'; import * as sinon from 'sinon'; import * as testData from '../resources/wrwUsers'; import { afterEach } from 'mocha'; @@ -36,11 +38,14 @@ describe('Polyx:', function () { let accountInfoCB; let headerInfoCB; let getFeeCB; + let getMaterialCB; beforeEach(function () { accountInfoCB = sandBox.stub(Polyx.prototype, 'getAccountInfo' as keyof Polyx); headerInfoCB = sandBox.stub(Polyx.prototype, 'getHeaderInfo' as keyof Polyx); getFeeCB = sandBox.stub(Polyx.prototype, 'getFee' as keyof Polyx); + getMaterialCB = sandBox.stub(Polyx.prototype, 'getMaterial' as keyof Polyx); + getMaterialCB.resolves(utils.getMaterial(coins.get('tpolyx').network.type)); }); afterEach(function () {