@ledgerhq/coin-tron
Version:
Ledger Tron Coin integration
12 lines (10 loc) • 317 B
text/typescript
import type { BlockInfo } from "@ledgerhq/coin-module-framework/api/index";
import { getLastBlock } from "../network";
export async function lastBlock(): Promise<BlockInfo> {
const block = await getLastBlock();
return {
height: block.height,
hash: block.hash,
time: block.time ?? new Date(0),
};
}