From c13b9b86b2063a8f364709c3ab45dbc58892a5b5 Mon Sep 17 00:00:00 2001 From: fly33499 Date: Wed, 20 Oct 2021 20:47:54 +0900 Subject: [PATCH] testcase: add chain test (some refactoring) --- test/04.bank_tx.test.ts | 2 +- test/19.chain.test.ts | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 test/19.chain.test.ts diff --git a/test/04.bank_tx.test.ts b/test/04.bank_tx.test.ts index 7f6bb20..257e63e 100644 --- a/test/04.bank_tx.test.ts +++ b/test/04.bank_tx.test.ts @@ -44,7 +44,7 @@ describe('[04. Bank Tx Test]', () => { // it is not recorded as tx, but an extension is given at the code space level. try { - var result = await firma.Bank.send(wallet, await targetWallet.getAddress(), amount, { memo: "memeo" }); + var result = await firma.Bank.send(wallet, await targetWallet.getAddress(), amount, { memo: "memo" }); } catch (error) { expect(true); diff --git a/test/19.chain.test.ts b/test/19.chain.test.ts new file mode 100644 index 0000000..f7a8fed --- /dev/null +++ b/test/19.chain.test.ts @@ -0,0 +1,20 @@ +import { expect } from 'chai'; +import { FirmaUtil } from '../dist'; +import { FirmaSDK } from "../sdk/FirmaSDK" +import { TestChainConfig } from './config_test'; + +describe('[19. chain Test]', () => { + + const firma = new FirmaSDK(TestChainConfig); + + it('getChainStatus test', async () => { + const result = await firma.BlockChain.getChainStatus(); + console.log(result) + }) + + it.skip('getTransactionByHash test', async () => { + const txHash = "0xC5509A32CF57798F8C3185DFAF03BD2D09DFC04FE842283ECA9298F5F60E340F"; + const result = await firma.BlockChain.getTransactionByHash(txHash); + console.log(result) + }) +}); \ No newline at end of file