Skip to content

Commit

Permalink
Wait for geoblock results before sending Segment event (#2423)
Browse files Browse the repository at this point in the history
  • Loading branch information
luads authored Nov 26, 2024
1 parent be2a6b2 commit e2bdc1d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface AddTokensState {
selectedRouteData: RouteData | undefined;
selectedToken: TokenInfo | undefined;
selectedAmount: string;
isSwapAvailable: boolean;
isSwapAvailable: boolean | undefined;
}

export const initialAddTokensState: AddTokensState = {
Expand All @@ -29,7 +29,7 @@ export const initialAddTokensState: AddTokensState = {
selectedRouteData: undefined,
selectedToken: undefined,
selectedAmount: '',
isSwapAvailable: false,
isSwapAvailable: undefined,
};

export interface AddTokensContextState {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ export function AddTokens({
);

useEffect(() => {
if (!id) { return; }
if (!id || isSwapAvailable === undefined) { return; }

page({
userJourney: UserJourney.ADD_TOKENS,
screen: 'InputScreen',
Expand Down

0 comments on commit e2bdc1d

Please sign in to comment.