1
- import * as rpcClient from "../src/rpc"
1
+ import rpcClient from "../src/rpc"
2
2
3
3
const NETWORK = "testnet"
4
4
const getClient = ( type ) => {
@@ -22,14 +22,14 @@ describe("rpc", () => {
22
22
const client = getClient ( "https" )
23
23
const res = await client . status ( )
24
24
expect ( res ) . toBeTruthy ( )
25
- expect ( res . node_info . network ) . toBe ( "Binance-Chain-Nile " )
25
+ expect ( res . node_info . network ) . toBe ( "Binance-Chain-Ganges " )
26
26
} )
27
27
28
28
it ( "wss status" , async ( ) => {
29
29
const client = getClient ( "wss" )
30
30
const res = await client . status ( )
31
31
expect ( res ) . toBeTruthy ( )
32
- expect ( res . node_info . network ) . toBe ( "Binance-Chain-Nile " )
32
+ expect ( res . node_info . network ) . toBe ( "Binance-Chain-Ganges " )
33
33
client . close ( )
34
34
} )
35
35
@@ -210,8 +210,9 @@ describe("rpc", () => {
210
210
it ( "getTxByHash" , async ( ) => {
211
211
const client = getClient ( "https" )
212
212
const hashStr =
213
- "2029ED36444DFE12E6A235CFE8B1C81B7F31014D23790E382056B395EC1171FE "
213
+ "5E0C54841CF0261EE111EB6B024762DB200F3FA59397967AB4BC641154C0B789 "
214
214
const result = await client . getTxByHash ( hashStr , true )
215
+ // console.log(JSON.stringify(result))
215
216
expect ( result ) . toBeTruthy ( )
216
217
expect ( result . height ) . toBeTruthy ( )
217
218
expect ( result . hash ) . toBe ( hashStr )
0 commit comments