diff --git a/apps/minifront/src/fetchers/balances/by-priority-score.ts b/apps/minifront/src/fetchers/balances/by-priority-score.ts index 664dc3cc69..96a5a73d4e 100644 --- a/apps/minifront/src/fetchers/balances/by-priority-score.ts +++ b/apps/minifront/src/fetchers/balances/by-priority-score.ts @@ -24,8 +24,8 @@ export const sortByPriorityScore = (a: BalancesResponse, b: BalancesResponse) => }; export const sortByPriorityScoreAndAccountIndex = (a: BalancesResponse, b: BalancesResponse) => { - const aIndex = getAddressIndex.optional()(a)?.account ?? Infinity; - const bIndex = getAddressIndex.optional()(b)?.account ?? Infinity; + const aIndex = getAddressIndex.optional(a)?.account ?? Infinity; + const bIndex = getAddressIndex.optional(b)?.account ?? Infinity; if (aIndex === bIndex) { return sortByPriorityScore(a, b); diff --git a/docs/adrs/001-getters.md b/docs/adrs/001-getters.md index 19e9a38dea..afbd15fda8 100644 --- a/docs/adrs/001-getters.md +++ b/docs/adrs/001-getters.md @@ -60,7 +60,7 @@ If we want to allow `undefined`, we can add a call to `.optional()`: required because we called `.optional()`. Otherwise, TypeScript would have guaranteed that the return value of `getAddressIndex()` was an actual `AddressIndex`. */} - {getAddressIndex.optional()(addressView)?.account} + {getAddressIndex.optional(addressView)?.account} ```