From 382451cb6bc39b87514035811dcf414e084b882d Mon Sep 17 00:00:00 2001 From: Hedi EDELBLOUTE Date: Wed, 6 Sep 2023 16:58:21 +0200 Subject: [PATCH] edit comment --- libs/ledger-live-common/src/families/cosmos/api/Cosmos.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libs/ledger-live-common/src/families/cosmos/api/Cosmos.ts b/libs/ledger-live-common/src/families/cosmos/api/Cosmos.ts index 3d9a3373d495..213b9aef5eef 100644 --- a/libs/ledger-live-common/src/families/cosmos/api/Cosmos.ts +++ b/libs/ledger-live-common/src/families/cosmos/api/Cosmos.ts @@ -78,8 +78,7 @@ export class CosmosAPI { }); // We use base_account for Ethermint chains and account for the rest - const srcAccount = - data.account.base_account != null ? data.account.base_account : data.account; + const srcAccount = data.account.base_account || data.account; if (srcAccount.account_number) { accountData.accountNumber = parseInt(srcAccount.account_number); @@ -94,7 +93,9 @@ export class CosmosAPI { accountData.pubKeyType = srcAccount.pub_key["@type"]; } } catch (e) { - log("Could not fetch account info, using default values instead"); + log( + "Could not fetch account info, account might have never been used, using default values instead", + ); } return accountData;