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

Mintbase / mintbase-js / 7929488522

16 Feb 2024 10:48AM UTC coverage: 77.204%. First build
7929488522

Pull #476

github

rubenmarcus
fix attributes by contract
Pull Request #476: fix attributes by contract

839 of 1269 branches covered (66.12%)

Branch coverage included in aggregate %.

1149 of 1306 relevant lines covered (87.98%)

12.91 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 { Network } from '@mintbase-js/sdk';
2
import { requestFromNearRpc } from '../util';
3✔
3

4
export const getBlockHeight = async (network?: Network): Promise<number> => {
3✔
5
  const res = await requestFromNearRpc({
3✔
6
    jsonrpc: '2.0',
7
    id: 'dontcare',
8
    method: 'status',
9
    params: [],
10
  }, network);
11
  const blockHeight = res?.result?.sync_info?.latest_block_height;
3!
12
  if (!blockHeight) {
3!
13
    throw new Error(`Malformed response: ${JSON.stringify(res)}`);
×
14
  }
15
  return blockHeight;
3✔
16
};
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