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

safe-global / safe-client-gateway / 9396999065

06 Jun 2024 07:41AM UTC coverage: 92.899% (+0.08%) from 92.822%
9396999065

push

github

web-flow
Add Counterfactual Safes ERC-20 balances (#1615)

Make BalancesApiManager.getBalancesApi return ZerionBalancesApi when the Safe data is unavailable through the Safe Transaction Service.

2011 of 2456 branches covered (81.88%)

Branch coverage included in aggregate %.

13 of 13 new or added lines in 4 files covered. (100.0%)

1 existing line in 1 file now uncovered.

7133 of 7387 relevant lines covered (96.56%)

328.49 hits per line

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

80.0
/src/routes/transactions/entities/__tests__/human-description.builder.ts
1
import { Builder, IBuilder } from '@/__tests__/builder';
2✔
2
import {
2✔
3
  RichAddressFragment,
4
  RichTokenValueFragment,
5
  RichTextFragment,
6
  RichDecodedInfoFragment,
7
  RichFragmentType,
8
} from '@/routes/transactions/entities/human-description.entity';
9
import { faker } from '@faker-js/faker';
2✔
10

11
function richTokenValueFragmentBuilder(): IBuilder<RichTokenValueFragment> {
12
  return new Builder<RichTokenValueFragment>()
4✔
13
    .with('type', RichFragmentType.TokenValue)
14
    .with('value', faker.string.numeric())
15
    .with('symbol', faker.finance.currencySymbol())
16
    .with('logoUri', faker.image.avatar());
17
}
18

19
function richTextFragmentBuilder(): IBuilder<RichTextFragment> {
UNCOV
20
  return new Builder<RichTextFragment>()
×
21
    .with('type', RichFragmentType.Text)
22
    .with('value', faker.word.words());
23
}
24

25
function richAddressFragmentBuilder(): IBuilder<RichAddressFragment> {
26
  return new Builder<RichAddressFragment>()
×
27
    .with('type', RichFragmentType.Address)
28
    .with('value', faker.finance.ethereumAddress());
29
}
30

31
const humanDescriptionBuilders: Array<() => IBuilder<RichDecodedInfoFragment>> =
32
  [
2✔
33
    richTokenValueFragmentBuilder,
34
    richTextFragmentBuilder,
35
    richAddressFragmentBuilder,
36
  ];
37

38
export function buildHumanDescription(): RichDecodedInfoFragment[] {
2✔
39
  return Array.from({ length: faker.number.int({ min: 0, max: 6 }) }, () =>
2✔
40
    faker.helpers.arrayElement(humanDescriptionBuilders)().build(),
4✔
41
  );
42
}
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