Skip to content

Commit

Permalink
Merge branch '@matthew/add-points-tweet-intent' of https://github.com…
Browse files Browse the repository at this point in the history
…/rainbow-me/rainbow into @matthew/add-points-tweet-intent
  • Loading branch information
walmat committed Dec 7, 2023
2 parents dc1a8e1 + 1fae5ea commit 8ce3e1a
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 25 deletions.
2 changes: 2 additions & 0 deletions crowdin.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
files:
- source: /src/languages/en_US.json
translation: /src/languages/%locale_with_underscore%.json
bundles:
- 2
21 changes: 13 additions & 8 deletions src/navigation/SwipeNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,17 @@ const animationConfig = {

const Swipe = createMaterialTopTabNavigator();

// eslint-disable-next-line no-nested-ternary
export const TAB_BAR_HEIGHT = IS_IOS
? 82
: !isUsingButtonNavigation()
? 72
: 48;
export const getHeaderHeight = () => {
if (IS_IOS) {
return 82;
}

if (!isUsingButtonNavigation()) {
return 72;
}

return 48;
};

const TabBar = ({
state,
Expand Down Expand Up @@ -163,7 +168,7 @@ const TabBar = ({
return (
<ShadowWrapper>
<Box
height={{ custom: TAB_BAR_HEIGHT }}
height={{ custom: getHeaderHeight() }}
position="absolute"
style={{
bottom: 0,
Expand All @@ -176,7 +181,7 @@ const TabBar = ({
blurAmount={40}
blurType={isDarkMode ? 'chromeMaterialDark' : 'chromeMaterialLight'}
width="full"
height={{ custom: TAB_BAR_HEIGHT }}
height={{ custom: getHeaderHeight() }}
>
<Box
height="full"
Expand Down
3 changes: 2 additions & 1 deletion src/resources/pointsTweetIntent/pointsTweetIntentQuery.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useQuery } from '@tanstack/react-query';
import { noop } from 'lodash';

import {
createQueryKey,
queryClient,
Expand Down Expand Up @@ -91,7 +92,7 @@ export function usePointsTweetIntentQuery(
{
enabled,
staleTime: defaultStaleTime,
onSuccess,
onSuccess
}
);
}
20 changes: 5 additions & 15 deletions src/screens/SignTransactionSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,7 @@ export const SignTransactionSheet = () => {
gasFeeParamsBySpeed,
} = useGas();

const simulationUnavailable =
isPersonalSign || currentNetwork === Network.zora;
const simulationUnavailable = isPersonalSign;

const itemCount =
(simulationData?.in?.length || 0) +
Expand Down Expand Up @@ -1427,8 +1426,7 @@ const SimulationCard = ({
);
const spinnerRotation = useSharedValue(0);

const simulationUnavailable =
isPersonalSign || currentNetwork === Network.zora;
const simulationUnavailable = isPersonalSign;

const listStyle = useAnimatedStyle(() => ({
opacity: noChanges
Expand Down Expand Up @@ -1584,11 +1582,9 @@ const SimulationCard = ({
const shouldExpandOnLoad =
isBalanceEnough === false ||
(!isEmpty(simulation) && !noChanges) ||
currentNetwork === Network.zora ||
!!simulationError;
return shouldExpandOnLoad;
}, [
currentNetwork,
isBalanceEnough,
isLoading,
isPersonalSign,
Expand All @@ -1606,13 +1602,7 @@ const SimulationCard = ({
isExpanded={isExpanded}
>
<Stack
space={
simulationError ||
isBalanceEnough === false ||
currentNetwork === Network.zora
? '16px'
: '24px'
}
space={simulationError || isBalanceEnough === false ? '16px' : '24px'}
>
<Box
alignItems="center"
Expand Down Expand Up @@ -1694,12 +1684,12 @@ const SimulationCard = ({
</Text>
) : (
<>
{simulationUnavailable && !isPersonalSign && (
{simulationUnavailable && isPersonalSign && (
<Box style={{ opacity: 0.6 }}>
<Text color="labelQuaternary" size="13pt" weight="semibold">
{i18n.t(
i18n.l.walletconnect.simulation.simulation_card.messages
.unavailable_zora_network
.unavailable_personal_sign
)}
</Text>
</Box>
Expand Down
4 changes: 3 additions & 1 deletion src/screens/discover/components/DiscoverSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import {
getPoapAndOpenSheetWithSecretWord,
} from '@/utils/poaps';
import { navigateToMintCollection } from '@/resources/reservoir/mints';
import { getHeaderHeight } from '@/navigation/SwipeNavigator';

export const SearchContainer = styled(Row)({
height: '100%',
Expand All @@ -61,6 +62,7 @@ export default function DiscoverSearch() {

const { colors } = useTheme();
const profilesEnabled = useExperimentalFlag(PROFILES);
const marginBottom = useMemo(() => getHeaderHeight(), []);

const currencySelectionListRef = useRef();
const [searchQueryForSearch] = useDebounce(searchQuery, 350);
Expand Down Expand Up @@ -277,7 +279,7 @@ export default function DiscoverSearch() {
return (
<View
key={currencyListDataKey}
style={{ height: deviceUtils.dimensions.height - 140 }}
style={{ height: deviceUtils.dimensions.height - 140 - marginBottom }}
>
<SearchContainer>
<CurrencySelectionList
Expand Down

0 comments on commit 8ce3e1a

Please sign in to comment.