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

cartesi / rollups-explorer / 11726651411

07 Nov 2024 03:57PM CUT coverage: 86.104% (-0.5%) from 86.605%
11726651411

Pull #256

github

nevendyulgerov
chore(packages/ui): Cleanup
Pull Request #256: #251 Add ABI encoding for raw input form

1366 of 1627 branches covered (83.96%)

Branch coverage included in aggregate %.

756 of 920 new or added lines in 13 files covered. (82.17%)

9428 of 10909 relevant lines covered (86.42%)

47.35 hits per line

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

0.0
/apps/web/src/lib/urql.ts
1
import { Client, cacheExchange, createClient, fetchExchange } from "urql/core";
×
2

3
let urqlClient: Client | null = null;
×
4
let urqlServerClient: Client | null = null;
×
5

6
const buildClient = (url?: string) => {
×
7
    if (!url)
×
8
        throw new Error(
×
9
            "Rollups explorer API URL not defined! Check .env.template file for reference.",
×
10
        );
×
11

12
    return createClient({
×
13
        url,
×
14
        exchanges: [cacheExchange, fetchExchange],
×
15
    });
×
16
};
×
17

18
export const getUrqlClient = () => {
×
19
    if (!urqlClient) {
×
20
        const url = process.env.NEXT_PUBLIC_EXPLORER_API_URL ?? "";
×
21
        urqlClient = buildClient(url);
×
22
    }
×
23

24
    return urqlClient;
×
25
};
×
26

27
export const getUrqlServerClient = () => {
×
28
    if (!urqlServerClient) {
×
29
        const url =
×
30
            process.env.INTERNAL_EXPLORER_API_URL ??
×
31
            process.env.NEXT_PUBLIC_EXPLORER_API_URL ??
×
32
            "";
×
33

34
        urqlServerClient = buildClient(url);
×
35
    }
×
36

37
    return urqlServerClient;
×
38
};
×
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