Skip to content
This repository has been archived by the owner on Jun 3, 2022. It is now read-only.

Commit

Permalink
bump(deps): @defichain/jellyfish dependencies (#988)
Browse files Browse the repository at this point in the history
* Bump @defichain/jellyfish dependencies

* fix(whale-api): build typescript syntax mismatch

Co-authored-by: Jellyfish Bot <[email protected]>
  • Loading branch information
fuxingloh and jellyfishsdk-bot authored May 30, 2022
1 parent 37b093f commit 4868add
Show file tree
Hide file tree
Showing 8 changed files with 206 additions and 209 deletions.
362 changes: 181 additions & 181 deletions package-lock.json

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@
"packages:publish:latest": "lerna exec --no-private -- npm publish --tag latest --access public"
},
"dependencies": {
"@defichain/jellyfish-address": "^2.45.4",
"@defichain/jellyfish-api-core": "^2.45.4",
"@defichain/jellyfish-api-jsonrpc": "^2.45.4",
"@defichain/jellyfish-crypto": "^2.45.4",
"@defichain/jellyfish-json": "^2.45.4",
"@defichain/jellyfish-network": "^2.45.4",
"@defichain/jellyfish-testing": "^2.45.4",
"@defichain/jellyfish-transaction": "^2.45.4",
"@defichain/jellyfish-transaction-builder": "^2.45.4",
"@defichain/jellyfish-wallet": "^2.45.4",
"@defichain/testcontainers": "^2.45.4",
"@defichain/testing": "^2.45.4",
"@defichain/jellyfish-address": "^2.45.5",
"@defichain/jellyfish-api-core": "^2.45.5",
"@defichain/jellyfish-api-jsonrpc": "^2.45.5",
"@defichain/jellyfish-crypto": "^2.45.5",
"@defichain/jellyfish-json": "^2.45.5",
"@defichain/jellyfish-network": "^2.45.5",
"@defichain/jellyfish-testing": "^2.45.5",
"@defichain/jellyfish-transaction": "^2.45.5",
"@defichain/jellyfish-transaction-builder": "^2.45.5",
"@defichain/jellyfish-wallet": "^2.45.5",
"@defichain/testcontainers": "^2.45.5",
"@defichain/testing": "^2.45.5",
"@nestjs/common": "^8.4.2",
"@nestjs/config": "^2.0.0",
"@nestjs/core": "^8.4.2",
Expand All @@ -50,7 +50,7 @@
"cache-manager": "^3.6.1",
"class-transformer": "^0.5.1",
"class-validator": "^0.13.2",
"defichain": "^2.45.4",
"defichain": "^2.45.5",
"graphology": "^0.24.1",
"graphology-components": "^1.5.2",
"graphology-simple-path": "^0.1.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { MasterNodeRegTestContainer } from '@defichain/testcontainers'
const container = new MasterNodeRegTestContainer()
const service = new StubService(container)
const client = new StubWhaleApiClient(service)
let collateralTokenId1: string

/* eslint-disable no-lone-blocks */

Expand Down Expand Up @@ -107,7 +106,7 @@ beforeAll(async () => {
}

{
collateralTokenId1 = await testing.rpc.loan.setCollateralToken({
await testing.rpc.loan.setCollateralToken({
token: 'AAPL',
factor: new BigNumber(0.1),
fixedIntervalPriceId: 'AAPL/USD'
Expand Down Expand Up @@ -244,7 +243,7 @@ describe('get', () => {
it('should get collateral token by symbol', async () => {
const data = await client.loan.getCollateralToken('AAPL')
expect(data).toStrictEqual({
tokenId: collateralTokenId1,
tokenId: expect.any(String),
factor: '0.1',
token: {
collateralAddress: expect.any(String),
Expand All @@ -271,7 +270,7 @@ describe('get', () => {
symbolKey: expect.any(String),
tradeable: true
},
activateAfterBlock: 110,
activateAfterBlock: 0,
fixedIntervalPriceId: 'AAPL/USD',
activePrice: {
active: {
Expand Down
2 changes: 1 addition & 1 deletion packages/whale-api-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"build": "tsc"
},
"dependencies": {
"@defichain/jellyfish-api-jsonrpc": "^2.45.4",
"@defichain/jellyfish-api-jsonrpc": "^2.45.5",
"abort-controller": "^3.0.0",
"cross-fetch": "^3.1.5",
"url-search-params-polyfill": "8.1.1"
Expand Down
4 changes: 2 additions & 2 deletions packages/whale-api-client/src/api/address.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export interface AddressHistory {
amounts: string[]
block: {
height: number
hash: string
time: number
hash?: string
time?: number
}
}
4 changes: 2 additions & 2 deletions packages/whale-api-wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"build": "tsc"
},
"dependencies": {
"@defichain/jellyfish-transaction-builder": "^2.45.4",
"@defichain/jellyfish-wallet": "^2.45.4",
"@defichain/jellyfish-transaction-builder": "^2.45.5",
"@defichain/jellyfish-wallet": "^2.45.5",
"@defichain/whale-api-client": "0.0.0"
}
}
8 changes: 3 additions & 5 deletions src/module.api/loan.collateral.controller.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ const container = new LoanMasterNodeRegTestContainer()
let app: NestFastifyApplication
let controller: LoanController

let collateralTokenId1: string

beforeAll(async () => {
await container.start()
await container.waitForWalletCoinbaseMaturity()
Expand Down Expand Up @@ -68,7 +66,7 @@ beforeAll(async () => {
})
await testing.generate(1)

collateralTokenId1 = await testing.rpc.loan.setCollateralToken({
await testing.rpc.loan.setCollateralToken({
token: 'AAPL',
factor: new BigNumber(0.1),
fixedIntervalPriceId: 'AAPL/USD'
Expand Down Expand Up @@ -175,10 +173,10 @@ describe('get', () => {
const data = await controller.getCollateral('AAPL')
expect(data).toStrictEqual(
{
tokenId: collateralTokenId1,
tokenId: expect.any(String),
fixedIntervalPriceId: 'AAPL/USD',
factor: '0.1',
activateAfterBlock: 108,
activateAfterBlock: 0,
token: {
collateralAddress: expect.any(String),
creation: {
Expand Down
2 changes: 1 addition & 1 deletion src/module.api/loan.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export class LoanController {
tokenId: detail.tokenId,
token: mapTokenData(id, tokenInfo),
factor: detail.factor.toFixed(),
activateAfterBlock: detail?.activateAfterBlock?.toNumber() ?? 0,
activateAfterBlock: 0,
fixedIntervalPriceId: detail.fixedIntervalPriceId,
activePrice: await this.getActivePrice(detail.fixedIntervalPriceId)
}
Expand Down

0 comments on commit 4868add

Please sign in to comment.