-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #171 from terra-money/fix/ibc-denom-trace
fix query return format of denomTrace[s]
- Loading branch information
Showing
2 changed files
with
20 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,30 @@ | ||
import { APIRequester } from '../APIRequester'; | ||
import { APIRequester, Pagination } from '../APIRequester'; | ||
import { IbcTransferAPI } from './IbcTransferAPI'; | ||
import { DenomTrace } from '../../../core/ibc-transfer/DenomTrace'; | ||
|
||
const c = new APIRequester('https://bombay-lcd.terra.dev/'); | ||
const ibctx = new IbcTransferAPI(c); | ||
|
||
describe('IbcTransferAPI', () => { | ||
/* | ||
describe('denomTrace', () => { | ||
|
||
it('denomTraces', async () => { | ||
const denomTraces = await ibctx.denomTraces().then(v => v[0]) | ||
denomTraces.forEach(function (denomTrace: DenomTrace.Data) { | ||
expect(denomTrace.path).toMatch("transfer/channel-"); | ||
expect(denomTrace.base_denom).not.toBeUndefined(); | ||
}); | ||
*/ | ||
}); | ||
|
||
it('denomTrace', async () => { | ||
const denomTrace = await ibctx.denomTrace('B8AF5D92165F35AB31F3FC7C7B444B9D240760FA5D406C49D24862BD0284E395') | ||
expect(denomTrace.path).toEqual("transfer/channel-4"); | ||
expect(denomTrace.base_denom).toEqual("uluna"); | ||
}); | ||
|
||
it('params', async () => { | ||
const param = await ibctx.parameters(); | ||
expect(param.send_enabled).toEqual(expect.any(Boolean)); | ||
expect(param.receive_enabled).toEqual(expect.any(Boolean)); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters