From c73c801b77d74db0bca4c4b50deada26c39becc5 Mon Sep 17 00:00:00 2001 From: Dominique Date: Mon, 1 Apr 2024 18:53:10 +0200 Subject: [PATCH] fix: Staking Payouts query param depth (#1422) --- src/controllers/accounts/AccountsStakingPayoutsController.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/controllers/accounts/AccountsStakingPayoutsController.ts b/src/controllers/accounts/AccountsStakingPayoutsController.ts index b7cc4a9e4..8afdbb9b9 100644 --- a/src/controllers/accounts/AccountsStakingPayoutsController.ts +++ b/src/controllers/accounts/AccountsStakingPayoutsController.ts @@ -115,6 +115,8 @@ export default class AccountsStakingPayoutsController extends AbstractController let sanitizedDepth: string | undefined; if (depth && isKusama) { sanitizedDepth = Math.min(Number(depth), currentEra - 518).toString(); + } else if (depth) { + sanitizedDepth = depth as string; } if (currentEra < 518 && isKusama) { const eraStartBlock: number = earlyErasBlockInfo[currentEra].start;