Skip to content

Commit

Permalink
Fix values on pool overview page
Browse files Browse the repository at this point in the history
  • Loading branch information
kattylucy committed Jan 7, 2025
1 parent 78d0665 commit 3436fb2
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
12 changes: 10 additions & 2 deletions centrifuge-app/src/components/PoolOverview/KeyMetrics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ export const KeyMetrics = ({ poolId }: Props) => {
metric:
centrifugeTargetAPYs[poolId as keyof typeof centrifugeTargetAPYs] || tinlakeData[poolId as TinlakeDataKey]
? 'Target APY'
: metadata?.tranches
? Object.values(metadata?.tranches)[0].apy
: '30-day APY',
value: tinlakeData[poolId as TinlakeDataKey]
? tinlakeData[poolId as TinlakeDataKey]
Expand Down Expand Up @@ -218,10 +220,16 @@ export const KeyMetrics = ({ poolId }: Props) => {
{metrics.map(({ metric, value }, index) => {
return (
<Box key={index} display="flex" justifyContent="space-between" paddingY={1} alignItems="center">
<Text color="textSecondary" variant="body2" textOverflow="ellipsis" whiteSpace="nowrap">
<Text
textTransform="capitalize"
color="textSecondary"
variant="body2"
textOverflow="ellipsis"
whiteSpace="nowrap"
>
{metric}
</Text>
<Text variant="body2" textOverflow="ellipsis" whiteSpace="nowrap">
<Text textTransform="capitalize" variant="body2" textOverflow="ellipsis" whiteSpace="nowrap">
{value}
</Text>
</Box>
Expand Down
18 changes: 11 additions & 7 deletions centrifuge-app/src/pages/IssuerCreatePool/PoolSetupSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,17 @@ export const PoolSetupSection = () => {
connectedType === 'evm' ? isEvmAddress(field.value) : isAddress(field.value)

return (
<FieldWithErrorMessage
{...field}
as={TextInput}
placeholder="Type address..."
value={isValidAddress ? utils.formatAddress(field.value) : field.value}
onChange={(e) => form.setFieldValue(field.name, e.target.value)}
/>
<Box mt={2}>
<FieldWithErrorMessage
{...field}
as={TextInput}
placeholder="Type address..."
value={isValidAddress ? utils.formatAddress(field.value) : field.value}
onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
form.setFieldValue(field.name, e.target.value)
}
/>
</Box>
)
}}
</Field>
Expand Down
1 change: 1 addition & 0 deletions centrifuge-app/src/pages/IssuerCreatePool/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,7 @@ const IssuerCreatePoolPage = () => {
small
onClick={() => form.handleSubmit()}
loading={createProxiesIsPending || transactionIsPending || form.isSubmitting}
disabled={Object.keys(errors).length > 0}
>
Create pool
</Button>
Expand Down

0 comments on commit 3436fb2

Please sign in to comment.