From 6f312b9b5a6c8c98e0c8418f55914a46b13f90c4 Mon Sep 17 00:00:00 2001 From: canonbrother Date: Fri, 3 Nov 2023 15:22:00 +0800 Subject: [PATCH] chore(): 4.0.0 stable (#2168) #### What this PR does / why we need it: #### Which issue(s) does this PR fixes?: Fixes # #### Additional comments?: --- apps/whale-api/docker-compose.yml | 2 +- .../masternode/setGov.locks.token.test.ts | 24 ++++--------------- .../src/containers/DeFiDContainer.ts | 2 +- .../src/containers/NativeChainContainer.ts | 2 +- 4 files changed, 8 insertions(+), 22 deletions(-) diff --git a/apps/whale-api/docker-compose.yml b/apps/whale-api/docker-compose.yml index 90a63e3021..20d3a2456f 100644 --- a/apps/whale-api/docker-compose.yml +++ b/apps/whale-api/docker-compose.yml @@ -2,7 +2,7 @@ version: "3.7" services: defi-blockchain: - image: defi/defichain:4.0.0-rc2 + image: defi/defichain:4.0.0 ports: - "19554:19554" diff --git a/packages/jellyfish-api-core/__tests__/category/masternode/setGov.locks.token.test.ts b/packages/jellyfish-api-core/__tests__/category/masternode/setGov.locks.token.test.ts index 0b2799a936..cc2530801e 100644 --- a/packages/jellyfish-api-core/__tests__/category/masternode/setGov.locks.token.test.ts +++ b/packages/jellyfish-api-core/__tests__/category/masternode/setGov.locks.token.test.ts @@ -250,25 +250,6 @@ describe('SetGov v0/locks/token', () => { const attributes = await testing.rpc.masternode.getGov('ATTRIBUTES') expect(attributes.ATTRIBUTES[`v0/locks/token/${tslaId}`]).toStrictEqual('false') } - - // TODO(canonbrother): bug on 4.0.0-rc2, check on 4.0.0-stable later - // // Lock invalid loan token string - // await testing.rpc.masternode.setGov({ ATTRIBUTES: { 'v0/locks/token/abc': 'true' } }) - // await testing.generate(1) - - // { - // const attributes = await testing.rpc.masternode.getGov('ATTRIBUTES') - // expect(attributes.ATTRIBUTES['v0/locks/token/abc']).toBeUndefined() - // } - - // // Unlock invalid loan token string - // await testing.rpc.masternode.setGov({ ATTRIBUTES: { 'v0/locks/token/abc': 'false' } }) - // await testing.generate(1) - - // { - // const attributes = await testing.rpc.masternode.getGov('ATTRIBUTES') - // expect(attributes.ATTRIBUTES['v0/locks/token/abc']).toBeUndefined() - // } }) it('should update loan token if loan token is unlocked', async () => { @@ -441,6 +422,11 @@ describe('SetGov v0/locks/token', () => { expect(txId.length).toStrictEqual(64) }) + it('should fail if lock invalid token', async () => { + const promise = testing.rpc.masternode.setGov({ ATTRIBUTES: { 'v0/locks/token/abc': 'true' } }) + await expect(promise).rejects.toThrow('Token should be defined as numeric ID') + }) + it('should not lock collateral token', async () => { // Try to lock collateral token const promise = testing.rpc.masternode.setGov({ ATTRIBUTES: { [`v0/locks/token/${dfiId}`]: 'true' } }) diff --git a/packages/testcontainers/src/containers/DeFiDContainer.ts b/packages/testcontainers/src/containers/DeFiDContainer.ts index 8cdce2a54b..e24f14f739 100644 --- a/packages/testcontainers/src/containers/DeFiDContainer.ts +++ b/packages/testcontainers/src/containers/DeFiDContainer.ts @@ -36,7 +36,7 @@ export abstract class DeFiDContainer extends DockerContainer { if (process?.env?.DEFICHAIN_DOCKER_IMAGE !== undefined) { return process.env.DEFICHAIN_DOCKER_IMAGE } - return 'defi/defichain:4.0.0-rc2' // renovate.json regexManagers + return 'defi/defichain:4.0.0' // renovate.json regexManagers } public static readonly DefaultStartOptions = { diff --git a/packages/testcontainers/src/containers/NativeChainContainer.ts b/packages/testcontainers/src/containers/NativeChainContainer.ts index c912b4dc7d..dcaad5ccd7 100644 --- a/packages/testcontainers/src/containers/NativeChainContainer.ts +++ b/packages/testcontainers/src/containers/NativeChainContainer.ts @@ -29,7 +29,7 @@ export class NativeChainContainer extends GenericContainer { if (process?.env?.DEFICHAIN_DOCKER_IMAGE !== undefined) { return process.env.DEFICHAIN_DOCKER_IMAGE } - return 'defi/defichain:4.0.0-rc2' // renovate.json regexManagers + return 'defi/defichain:4.0.0' // renovate.json regexManagers } public static readonly PREFIX = 'defichain-testcontainers-'