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

Commit

Permalink
Use terra.js v3 (#100)
Browse files Browse the repository at this point in the history
* Use terra.js v3

* CHANGELOG.md
  • Loading branch information
0xslipk committed Nov 29, 2021
1 parent d7e502a commit bef727a
Show file tree
Hide file tree
Showing 5 changed files with 749 additions and 746 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2.0.0
Published by **[jarcodallo](https://github.com/jarcodallo)** on **2021/11/29**
- [#100](https://github.com/jarcodallo/nestjs-terra/pull/100) Use terra.js v3

## 1.1.0
Published by **[jarcodallo](https://github.com/jarcodallo)** on **2021/10/28**
- [#98](https://github.com/jarcodallo/nestjs-terra/pull/98) Use columbus-5 new endpoints
Expand Down
1 change: 0 additions & 1 deletion __tests__/terra.decorators.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ describe('InjectLCDClient', () => {
async someMethod(): Promise<{ tax: string }> {
const coin = new Coin('uluna', 200)
const tax = await this.terraClient.utils.calculateTax(coin)
console.log('tax ========>', tax)

return { tax: tax?.amount?.toString() ?? '0' }
}
Expand Down
8 changes: 4 additions & 4 deletions __tests__/terra.module.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('Terra Module Initialization', () => {
describe(PlatformAdapter.name, () => {
describe('forRoot', () => {
it('should work with terra testnet client', async () => {
nock(MAINNET_LCD_BASE_URL).get('/bank/total').reply(200, supplyTotalResponse)
nock(MAINNET_LCD_BASE_URL).get('/cosmos/bank/v1beta1/supply').reply(200, supplyTotalResponse)

@Controller('/')
class TestController {
Expand Down Expand Up @@ -134,7 +134,7 @@ describe('Terra Module Initialization', () => {

describe('forRootAsync', () => {
it('should compile properly with useFactory', async () => {
nock(MAINNET_LCD_BASE_URL).get('/bank/total').reply(200, supplyTotalResponse)
nock(MAINNET_LCD_BASE_URL).get('/cosmos/bank/v1beta1/supply').reply(200, supplyTotalResponse)

@Controller('/')
class TestController {
Expand Down Expand Up @@ -198,7 +198,7 @@ describe('Terra Module Initialization', () => {
})

it('should work properly when pass dependencies via providers', async () => {
nock(MAINNET_LCD_BASE_URL).get('/bank/total').reply(200, supplyTotalResponse)
nock(MAINNET_LCD_BASE_URL).get('/cosmos/bank/v1beta1/supply').reply(200, supplyTotalResponse)

@Controller('/')
class TestController {
Expand Down Expand Up @@ -256,7 +256,7 @@ describe('Terra Module Initialization', () => {
})

it('should work properly when useFactory returns Promise', async () => {
nock(MAINNET_LCD_BASE_URL).get('/bank/total').reply(200, supplyTotalResponse)
nock(MAINNET_LCD_BASE_URL).get('/cosmos/bank/v1beta1/supply').reply(200, supplyTotalResponse)

@Controller('/')
class TestController {
Expand Down
Loading

0 comments on commit bef727a

Please sign in to comment.