From ec7b8e158425cee07016c41ea124fb2a5562725e Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Tue, 7 Apr 2026 09:12:13 +0200 Subject: [PATCH] Fix: Strong UserAlias type for fetchAllowances Signed-off-by: Jakub Dzikowski --- chaincode/src/allowances/fetchAllowances.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chaincode/src/allowances/fetchAllowances.ts b/chaincode/src/allowances/fetchAllowances.ts index c0a2244a0b..0d01c17ca3 100644 --- a/chaincode/src/allowances/fetchAllowances.ts +++ b/chaincode/src/allowances/fetchAllowances.ts @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { AllowanceType, FetchAllowancesResponse, TokenAllowance } from "@gala-chain/api"; +import { AllowanceType, FetchAllowancesResponse, TokenAllowance, UserAlias } from "@gala-chain/api"; import { GalaChainContext } from "../types"; import { getObjectsByPartialCompositeKey, getObjectsByPartialCompositeKeyWithPagination } from "../utils"; @@ -26,7 +26,7 @@ export interface FetchAllowancesParams { instance?: string; allowanceType?: AllowanceType; grantedTo: string; - grantedBy?: string; + grantedBy?: UserAlias; } /** @@ -137,7 +137,7 @@ function sort(results: TokenAllowance[]): void { results.sort((a: TokenAllowance, b: TokenAllowance): number => (a.created < b.created ? -1 : 1)); } -function filterByGrantedBy(results: TokenAllowance[], grantedBy?: string): TokenAllowance[] { +function filterByGrantedBy(results: TokenAllowance[], grantedBy?: UserAlias): TokenAllowance[] { if (grantedBy) { return results.filter((x: TokenAllowance) => x.grantedBy === grantedBy); } else {