@ledgerhq/coin-tron
Version:
Ledger Tron Coin integration
25 lines (22 loc) • 565 B
text/typescript
import { lastBlock } from "./lastBlock";
import coinConfig from "../config";
describe("lastBlock", () => {
beforeAll(() => {
coinConfig.setCoinConfig(() => ({
status: {
type: "active",
},
explorer: {
url: "https://tron.coin.ledger.com",
},
}));
});
it("returns last block info", async () => {
// When
const result = await lastBlock();
// Then
expect(result.hash?.length).toBeGreaterThan(0);
expect(result.height).toBeGreaterThan(0);
expect(result.time).toBeInstanceOf(Date);
});
});