Skip to content

Commit

Permalink
optional balance
Browse files Browse the repository at this point in the history
  • Loading branch information
lvndry committed Oct 13, 2023
1 parent 758f243 commit 2d9b161
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/ledger-live-common/src/families/stellar/api/horizon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export const fetchBaseFee = async (): Promise<{
* Get all account-related data
*
* @async
* @param {*} addr
* @param {string} addr
*/
export const fetchAccount = async (
addr: string,
Expand All @@ -132,7 +132,7 @@ export const fetchAccount = async (
return balance.asset_type === "native";
})?.balance || "0";
// Getting all non-native (XLM) assets on the account
assets = account.balances.filter(balance => {
assets = account.balances?.filter(balance => {
return balance.asset_type !== "native";
}) as BalanceAsset[];
} catch (e) {
Expand Down

0 comments on commit 2d9b161

Please sign in to comment.