@ledgerhq/coin-tezos 10.0.0 → 10.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,16 +10,9 @@ describe('tezos bakers', () => {
10
10
  const config: TezosCoinConfig = mockConfig as TezosCoinConfig
11
11
 
12
12
  test('atleast 10 whitelisted bakers are online', async () => {
13
- const bakers = await listBakers(config, whitelist)
14
- const retrievedAddresses = bakers.map((o) => o.address)
15
- let available = 0
16
- for (const whitelisted of whitelist) {
17
- if (retrievedAddresses.includes(whitelisted)) {
18
- available++
19
- } else {
20
- console.warn(`Baker ${whitelisted} no longer online !`)
21
- }
22
- }
23
- expect(available).toBeGreaterThan(10)
13
+ const onlineBakersCount = (await listBakers(config, whitelist))
14
+ .map((baker) => baker.address)
15
+ .filter((address) => whitelist.includes(address)).length
16
+ expect(onlineBakersCount).toBeGreaterThan(10)
24
17
  })
25
18
  })