Skip to content

Commit

Permalink
Refactor error message handling in SwapPage for mobile compatibility …
Browse files Browse the repository at this point in the history
…and remove unnecessary whitespace in AssetAndChainSelectorModalSearchInput
  • Loading branch information
ericHgorski committed Jan 30, 2025
1 parent 7642e53 commit d146175
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ export const AssetAndChainSelectorModalSearchInput = ({
onChange={handleSearch}
onKeyDown={onKeyDown}
/>

<Row align="center" gap={5}>
{!isMobileScreenSize && (
<>
Expand Down
7 changes: 5 additions & 2 deletions packages/widget/src/pages/SwapPage/SwapPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,14 @@ export const SwapPage = () => {
}

if (isRouteError) {
// special case for multi-tx routes on mobile
const errMsg = routeError?.message.startsWith("no single-tx routes found")
? "Multiple signature routes are currently only supported on the Skip:Go desktop app" : routeError?.message;
return (
<MainButton
label={routeError?.message ?? "No routes found"}
label={errMsg ?? "No routes found"}
disabled
fontSize={routeError?.message ? 18 : 24}
fontSize={errMsg ? 18 : 24}
/>
);
}
Expand Down

0 comments on commit d146175

Please sign in to comment.