Skip to content

Commit 7ef2096

Browse files
author
Marcin Mazurek
committed
[DDW-1174] Custom dimensions - fetch user wallets only once
1 parent e425437 commit 7ef2096

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

source/renderer/app/analytics/getCustomDimensions.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@ export const getCustomDimensions = async (
1717
environment: Environment,
1818
adaApi: AdaApi
1919
) => {
20-
const usesByronWallets = (await adaApi.getWallets()).some(
21-
(wallet) => wallet.isLegacy
22-
);
23-
const usesHardwareWallets = (await adaApi.getWallets()).some(
20+
const userWallets = await adaApi.getWallets();
21+
const usesByronWallets = userWallets.some((wallet) => wallet.isLegacy);
22+
const usesHardwareWallets = userWallets.some(
2423
(wallet) => wallet.isHardwareWallet
2524
);
2625

0 commit comments

Comments
 (0)