Skip to content

Commit

Permalink
chore(): 4.0.0 stable (#2168)
Browse files Browse the repository at this point in the history
<!--  Thanks for sending a pull request! -->

#### What this PR does / why we need it:

#### Which issue(s) does this PR fixes?:
<!--
(Optional) Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Fixes #

#### Additional comments?:
  • Loading branch information
canonbrother committed Nov 3, 2023
1 parent c7359c0 commit 6f312b9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 22 deletions.
2 changes: 1 addition & 1 deletion apps/whale-api/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down Expand Up @@ -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' } })
Expand Down
2 changes: 1 addition & 1 deletion packages/testcontainers/src/containers/DeFiDContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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-'
Expand Down

0 comments on commit 6f312b9

Please sign in to comment.