diff --git a/.changeset/green-dogs-leap.md b/.changeset/green-dogs-leap.md new file mode 100644 index 00000000000..f796892349c --- /dev/null +++ b/.changeset/green-dogs-leap.md @@ -0,0 +1,5 @@ +--- +"@fuel-ts/providers": patch +--- + +remove console warn diff --git a/packages/providers/src/provider.ts b/packages/providers/src/provider.ts index 6722b56fe58..c6d21bd9e56 100644 --- a/packages/providers/src/provider.ts +++ b/packages/providers/src/provider.ts @@ -356,7 +356,7 @@ export default class Provider { } private static ensureClientVersionIsSupported(nodeInfo: NodeInfo) { - const { isMajorSupported, isMinorSupported, isPatchSupported, supportedVersion } = + const { isMajorSupported, isMinorSupported, supportedVersion } = checkFuelCoreVersionCompatibility(nodeInfo.nodeVersion); if (!isMajorSupported || !isMinorSupported) { @@ -365,14 +365,6 @@ export default class Provider { `Fuel client version: ${nodeInfo.nodeVersion}, Supported version: ${supportedVersion}` ); } - - if (!isPatchSupported) { - // eslint-disable-next-line no-console - console.warn( - FuelError.CODES.UNSUPPORTED_FUEL_CLIENT_VERSION, - `The patch versions of the client and sdk differ. Fuel client version: ${nodeInfo.nodeVersion}, Supported version: ${supportedVersion}` - ); - } } /** diff --git a/packages/providers/test/provider.test.ts b/packages/providers/test/provider.test.ts index 28bf0d9dedb..e523163da02 100644 --- a/packages/providers/test/provider.test.ts +++ b/packages/providers/test/provider.test.ts @@ -866,29 +866,4 @@ describe('Provider', () => { message: `Fuel client version: ${FUEL_CORE}, Supported version: ${mock.supportedVersion}`, }); }); - - it('warns on difference between patch client version and supported patch version', async () => { - const { FUEL_CORE } = versions; - const [major, minor, patch] = FUEL_CORE.split('.'); - - const patchMismatch = patch === '0' ? 1 : parseInt(patch, 10) - 1; - const mock = { - isMajorSupported: true, - isMinorSupported: true, - isPatchSupported: false, - supportedVersion: `${major}.${minor}.${patchMismatch}`, - }; - if (mock.supportedVersion === FUEL_CORE) throw new Error(); - - const spy = jest.spyOn(fuelTsVersionsMod, 'checkFuelCoreVersionCompatibility'); - spy.mockImplementation(() => mock); - - const warnSpy = jest.spyOn(global.console, 'warn').mockImplementation(() => {}); - await Provider.create(FUEL_NETWORK_URL); - - expect(warnSpy).toHaveBeenCalledWith( - ErrorCode.UNSUPPORTED_FUEL_CLIENT_VERSION, - `The patch versions of the client and sdk differ. Fuel client version: ${FUEL_CORE}, Supported version: ${mock.supportedVersion}` - ); - }); });