• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Mintbase / mintbase-js / 7886709676

13 Feb 2024 12:46PM UTC coverage: 76.836%. First build
7886709676

Pull #470

github

rubenmarcus
add to mintbase
Pull Request #470: change node version

803 of 1223 branches covered (65.66%)

Branch coverage included in aggregate %.

1101 of 1255 relevant lines covered (87.73%)

12.72 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

71.43
/packages/rpc/src/methods/blockheight.ts
1
import { requestFromNearRpc } from '../util';
3✔
2

3
export const getBlockHeight = async (network?: string): Promise<number> => {
3✔
4
  const res = await requestFromNearRpc({
3✔
5
    jsonrpc: '2.0',
6
    id: 'dontcare',
7
    method: 'status',
8
    params: [],
9
  }, network);
10
  const blockHeight = res?.result?.sync_info?.latest_block_height;
3!
11
  if (!blockHeight) {
3!
12
    throw new Error(`Malformed response: ${JSON.stringify(res)}`);
×
13
  }
14
  return blockHeight;
3✔
15
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc