Skip to content

Commit

Permalink
Merge pull request #2453 from decentdao/release/v0.3.8
Browse files Browse the repository at this point in the history
Release/v0.3.8
  • Loading branch information
adamgall authored Nov 6, 2024
2 parents 7fb02fe + 831ddfa commit 7cec799
Show file tree
Hide file tree
Showing 59 changed files with 1,083 additions and 509 deletions.
37 changes: 31 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "decent-interface",
"version": "0.3.7",
"version": "0.3.8",
"private": true,
"dependencies": {
"@amplitude/analytics-browser": "^2.11.1",
Expand All @@ -13,8 +13,9 @@
"@ethersproject/abstract-signer": "^5.7.0",
"@ethersproject/providers": "^5.7.2",
"@fontsource/space-mono": "^5.0.19",
"@fractal-framework/fractal-contracts": "^1.2.17",
"@fractal-framework/fractal-contracts": "^1.3.1",
"@graphprotocol/client-apollo": "^1.0.16",
"@hatsprotocol/modules-sdk": "^1.4.0",
"@hatsprotocol/sdk-v1-core": "^0.9.0",
"@hatsprotocol/sdk-v1-subgraph": "^1.0.0",
"@hotjar/browser": "^1.0.9",
Expand Down
38 changes: 38 additions & 0 deletions src/assets/abi/ZodiacModuleProxyFactoryAbi.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
export const ZodiacModuleProxyFactoryAbi = [
{ inputs: [], name: 'FailedInitialization', type: 'error' },
{
inputs: [{ internalType: 'address', name: 'address_', type: 'address' }],
name: 'TakenAddress',
type: 'error',
},
{
inputs: [{ internalType: 'address', name: 'target', type: 'address' }],
name: 'TargetHasNoCode',
type: 'error',
},
{
inputs: [{ internalType: 'address', name: 'target', type: 'address' }],
name: 'ZeroAddress',
type: 'error',
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'address', name: 'proxy', type: 'address' },
{ indexed: true, internalType: 'address', name: 'masterCopy', type: 'address' },
],
name: 'ModuleProxyCreation',
type: 'event',
},
{
inputs: [
{ internalType: 'address', name: 'masterCopy', type: 'address' },
{ internalType: 'bytes', name: 'initializer', type: 'bytes' },
{ internalType: 'uint256', name: 'saltNonce', type: 'uint256' },
],
name: 'deployModule',
outputs: [{ internalType: 'address', name: 'proxy', type: 'address' }],
stateMutability: 'nonpayable',
type: 'function',
},
] as const;
2 changes: 0 additions & 2 deletions src/assets/theme/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import Progress from './progress';
import Switch from './switch';
import Tabs from './tabs';
import Textarea from './textarea';
import Tooltip from './tooltip';

export default {
Alert,
Expand All @@ -19,5 +18,4 @@ export default {
Progress,
Switch,
Tabs,
Tooltip,
};
13 changes: 0 additions & 13 deletions src/assets/theme/components/tooltip/index.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Button, Text, Flex, Tooltip } from '@chakra-ui/react';
import { Box, Button, Text, Flex } from '@chakra-ui/react';
import { abis } from '@fractal-framework/fractal-contracts';
import { useEffect, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
Expand All @@ -16,6 +16,7 @@ import { useFractal } from '../../../providers/App/AppProvider';
import { useSafeAPI } from '../../../providers/App/hooks/useSafeAPI';
import { useNetworkConfig } from '../../../providers/NetworkConfig/NetworkConfigProvider';
import { MultisigProposal, FractalProposalState } from '../../../types';
import { DecentTooltip } from '../../ui/DecentTooltip';
import ContentBox from '../../ui/containers/ContentBox';
import { ProposalCountdown } from '../../ui/proposal/ProposalCountdown';

Expand Down Expand Up @@ -296,7 +297,7 @@ export function TxActions({ proposal }: { proposal: MultisigProposal }) {
<ProposalCountdown proposal={proposal} />
</Flex>
<Box marginTop={4}>
<Tooltip
<DecentTooltip
placement="top-start"
label={t('notActiveNonceTooltip')}
isDisabled={isActiveNonce}
Expand All @@ -309,7 +310,7 @@ export function TxActions({ proposal }: { proposal: MultisigProposal }) {
>
{t(buttonProps[proposal.state!].text, { ns: 'common' })}
</Button>
</Tooltip>
</DecentTooltip>
</Box>
</ContentBox>
);
Expand Down
7 changes: 4 additions & 3 deletions src/components/Proposals/ProposalActions/CastVote.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, Tooltip, Box, Text, Image, Flex, Radio, RadioGroup, Icon } from '@chakra-ui/react';
import { Button, Box, Text, Image, Flex, Radio, RadioGroup, Icon } from '@chakra-ui/react';
import { Check, CheckCircle } from '@phosphor-icons/react';
import { useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
Expand All @@ -13,6 +13,7 @@ import {
FractalProposalState,
VOTE_CHOICES,
} from '../../../types';
import { DecentTooltip } from '../../ui/DecentTooltip';
import WeightedInput from '../../ui/forms/WeightedInput';
import { useVoteContext } from '../ProposalVotes/context/VoteContext';

Expand Down Expand Up @@ -160,7 +161,7 @@ export function CastVote({ proposal }: { proposal: FractalProposal }) {
}

return (
<Tooltip
<DecentTooltip
placement="left"
maxW={TOOLTIP_MAXW}
title={
Expand Down Expand Up @@ -209,6 +210,6 @@ export function CastVote({ proposal }: { proposal: FractalProposal }) {
{t('vote')}
</Button>
</RadioGroup>
</Tooltip>
</DecentTooltip>
);
}
7 changes: 4 additions & 3 deletions src/components/Proposals/ProposalSummary.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Text, Box, Button, Flex, Tooltip, Icon } from '@chakra-ui/react';
import { Text, Box, Button, Flex, Icon } from '@chakra-ui/react';
import { abis } from '@fractal-framework/fractal-contracts';
import { ArrowUpRight } from '@phosphor-icons/react';
import { format } from 'date-fns';
Expand All @@ -12,6 +12,7 @@ import useBlockTimestamp from '../../hooks/utils/useBlockTimestamp';
import { useFractal } from '../../providers/App/AppProvider';
import { AzoriusGovernance, AzoriusProposal, GovernanceType } from '../../types';
import { DEFAULT_DATE_TIME_FORMAT, formatCoin } from '../../utils/numberFormats';
import { DecentTooltip } from '../ui/DecentTooltip';
import ContentBox from '../ui/containers/ContentBox';
import DisplayTransaction from '../ui/links/DisplayTransaction';
import EtherscanLink from '../ui/links/EtherscanLink';
Expand Down Expand Up @@ -227,13 +228,13 @@ export function AzoriusProposalSummary({ proposal }: { proposal: AzoriusProposal
{t('votingPower')}
</Text>
{showVotingPower ? (
<Tooltip
<DecentTooltip
label={t('votingPowerTooltip')}
placement="left"
maxW={TOOLTIP_MAXW}
>
{ShowVotingPowerButton}
</Tooltip>
</DecentTooltip>
) : (
ShowVotingPowerButton
)}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Text, Box, Button, Flex, Tooltip } from '@chakra-ui/react';
import { Text, Box, Button, Flex } from '@chakra-ui/react';
import { format } from 'date-fns';
import { formatInTimeZone } from 'date-fns-tz';
import { useState } from 'react';
import { useTranslation } from 'react-i18next';
import { TOOLTIP_MAXW } from '../../../constants/common';
import { ExtendedSnapshotProposal } from '../../../types';
import { DEFAULT_DATE_TIME_FORMAT } from '../../../utils/numberFormats';
import { DecentTooltip } from '../../ui/DecentTooltip';
import ContentBox from '../../ui/containers/ContentBox';
import ExternalLink from '../../ui/links/ExternalLink';
import { InfoBoxLoader } from '../../ui/loaders/InfoBoxLoader';
Expand Down Expand Up @@ -117,13 +118,13 @@ export default function SnapshotProposalSummary({ proposal }: ISnapshotProposalS
{t('votingPower')}
</Text>
{showVotingPower ? (
<Tooltip
<DecentTooltip
label={t('votingPowerTooltip')}
placement="left"
maxW={TOOLTIP_MAXW}
>
{ShowVotingPowerButton}
</Tooltip>
</DecentTooltip>
) : (
ShowVotingPowerButton
)}
Expand Down
11 changes: 6 additions & 5 deletions src/components/pages/DAOTreasury/components/AssetCoin.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { Divider, HStack, Flex, Tooltip, Text, Image, Box } from '@chakra-ui/react';
import { Divider, HStack, Flex, Text, Image, Box } from '@chakra-ui/react';
import { useTranslation } from 'react-i18next';
import { useFractal } from '../../../../providers/App/AppProvider';
import { TokenBalance } from '../../../../types';
import { MOCK_MORALIS_ETH_ADDRESS } from '../../../../utils/address';
import { formatPercentage, formatUSD, formatCoin } from '../../../../utils/numberFormats';
import { DecentTooltip } from '../../../ui/DecentTooltip';
import EtherscanLink from '../../../ui/links/EtherscanLink';

export function CoinHeader() {
Expand Down Expand Up @@ -96,25 +97,25 @@ export function CoinRow({ asset }: { asset: TokenBalance }) {
width="100%"
isTruncated
>
<Tooltip
<DecentTooltip
label={formatCoin(asset.balance, false, asset.decimals, asset.symbol)}
placement="top-start"
>
{formatCoin(asset.balance, true, asset.decimals, asset.symbol, false)}
</Tooltip>
</DecentTooltip>
</Text>
{asset.usdPrice && asset.usdValue && (
<Text
textStyle="label-small"
color="neutral-7"
width="100%"
>
<Tooltip
<DecentTooltip
label={`1 ${asset.symbol} = ${formatUSD(asset.usdPrice)}`}
placement="top-start"
>
{formatUSD(asset.usdValue)}
</Tooltip>
</DecentTooltip>
</Text>
)}
</Flex>
Expand Down
11 changes: 6 additions & 5 deletions src/components/pages/DAOTreasury/components/AssetDeFi.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { Divider, HStack, Flex, Tooltip, Text, Image, Box } from '@chakra-ui/react';
import { Divider, HStack, Flex, Text, Image, Box } from '@chakra-ui/react';
import { useTranslation } from 'react-i18next';
import { useFractal } from '../../../../providers/App/AppProvider';
import { DefiBalance } from '../../../../types';
import { MOCK_MORALIS_ETH_ADDRESS } from '../../../../utils/address';
import { formatPercentage, formatUSD, formatCoin } from '../../../../utils/numberFormats';
import { DecentTooltip } from '../../../ui/DecentTooltip';
import EtherscanLink from '../../../ui/links/EtherscanLink';

export function DeFiHeader() {
Expand Down Expand Up @@ -72,7 +73,7 @@ export function DeFiRow({ asset }: { asset: DefiBalance }) {
alignItems="center"
gap="0.5rem"
>
<Tooltip
<DecentTooltip
label={tooltipLabel}
placement="top-start"
>
Expand All @@ -84,7 +85,7 @@ export function DeFiRow({ asset }: { asset: DefiBalance }) {
w="1rem"
h="1rem"
/>
</Tooltip>
</DecentTooltip>
<EtherscanLink
color="white-0"
_hover={{ bg: 'transparent' }}
Expand All @@ -104,12 +105,12 @@ export function DeFiRow({ asset }: { asset: DefiBalance }) {
flexWrap="wrap"
>
{asset.position?.balanceUsd && (
<Tooltip
<DecentTooltip
label={tooltipLabel}
placement="top-start"
>
<Text width="100%">{formatUSD(asset.position.balanceUsd)}</Text>
</Tooltip>
</DecentTooltip>
)}
</Flex>

Expand Down
7 changes: 4 additions & 3 deletions src/components/pages/DAOTreasury/components/LidoButtons.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Button, HStack, Text, Tooltip, Show, Divider } from '@chakra-ui/react';
import { Button, HStack, Text, Show, Divider } from '@chakra-ui/react';
import { useTranslation } from 'react-i18next';
import { DecentTooltip } from '../../../ui/DecentTooltip';
import useTreasuryLidoInteractions from '../hooks/useTreasuryLidoInteractions';

export default function LidoButtons() {
Expand Down Expand Up @@ -49,15 +50,15 @@ export default function LidoButtons() {
</Button>
)}
{showClaimETHButton && (
<Tooltip label={!isLidoClaimable ? t('nonClaimableYet') : ''}>
<DecentTooltip label={!isLidoClaimable ? t('nonClaimableYet') : ''}>
<Button
size="sm"
isDisabled={!isLidoClaimable}
onClick={handleClickClaimButton}
>
{t('claimUnstakedETH')}
</Button>
</Tooltip>
</DecentTooltip>
)}
</HStack>
</Show>
Expand Down
Loading

0 comments on commit 7cec799

Please sign in to comment.