From 4ee494ebb4336cedcfefecc72cdcb1fea2263842 Mon Sep 17 00:00:00 2001 From: Carlo Sala Date: Wed, 21 Aug 2024 11:49:50 +0200 Subject: [PATCH] fix stuff --- src/actions/delegate/DelegateAction.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/actions/delegate/DelegateAction.tsx b/src/actions/delegate/DelegateAction.tsx index a67cf5d..787292b 100644 --- a/src/actions/delegate/DelegateAction.tsx +++ b/src/actions/delegate/DelegateAction.tsx @@ -5,7 +5,7 @@ import { SUSPENSE, useStateObservable, } from "@react-rxjs/core" -import { routeChain$, delegateAccount$ } from "./delegate" +import { routeChain$, routeDelegateAccount$ } from "./delegate" import { combineLatest, concat, @@ -41,7 +41,7 @@ const optimalAmount$ = state((account: SS58String) => from(getOptimalAmount(account)), ) const amount$ = state( - combineLatest([routeChain$, delegateAccount$, selectedAccount$]).pipe( + combineLatest([routeChain$, routeDelegateAccount$, selectedAccount$]).pipe( switchMapSuspended(([, , account]) => { if (!account) return EMPTY return concat( @@ -171,7 +171,7 @@ const SelectTracks: React.FC = () => { const delegateInput$ = state( combineLatest([ selectedAccount$, - delegateAccount$, + routeDelegateAccount$, conviction$.pipe(map((x) => (x === SUSPENSE ? null : x))), amount$.pipe(map((x) => (x === SUSPENSE ? null : x))), concat( @@ -267,7 +267,7 @@ const Warnings: React.FC = () => { export const DelegateAction = () => { const chainData = useStateObservable(routeChain$) - const delegateAccount = useStateObservable(delegateAccount$) + const delegateAccount = useStateObservable(routeDelegateAccount$) return (