Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop -> Main #1209

Merged
merged 6 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/common/BarChart.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function BarChart ({ labels, yAxisData, loading, formatTooltipLabel = und
},
ticks: {
callback: function (val) {
return val === 0 ? 0 : formatCurrency(this.getLabelForValue(val).replace(/,/g, ''), router.locale, '', true, true).short
return val === 0 ? 0 : formatCurrency(this.getLabelForValue(val).replace(/,/g, ''), router.locale, '', true).short
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/common/CardStatusBadge.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export function identifyStatus (status, defaultValue = E_CARD_STATUS.NORMAL) {

switch (status.toLowerCase()) {
case 'reporting':
case 'incidenthappened':
case 'incident happened':
case 'incident occurred':
return E_CARD_STATUS.INCIDENT
Expand Down
10 changes: 4 additions & 6 deletions src/config/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ export const POLICY_POINTS_PER_DOLLAR = 0.00625
export const EMISSION_ROUNDING_MODE = BigNumber.ROUND_FLOOR

export const latestSnapshotIpfsData = {
hash: 'QmaNVByqbYqP4aYXJrmUyprHzX9MVbk69yZTgcL3kSCDLB',
epochId: 2,
hash: 'QmNnwpnHzKbkZJ6gCR5zfrvdE2T2CYuYc7vDFoLbCaeR2T',
epochId: 3,
networkType: 'mainnet',
pools: [
{
Expand All @@ -176,8 +176,6 @@ export const latestSnapshotIpfsData = {
}
],
emission: '375000000000000000000000',
votingStartsAt: '2024-05-16T18:30:00.000Z',
votingEndsAt: '2024-05-23T18:30:00.000Z',
epochStartsAfter: '2024-05-28T00:00:00.000Z',
epochEndsAt: '2024-06-27T23:59:59.000Z'
epochStartsAfter: '2024-06-28T00:00:00.000Z',
epochEndsAt: '2024-07-27T23:59:59.999Z'
}
7 changes: 4 additions & 3 deletions src/modules/insights/Consensus.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ import {
import { formatCurrency } from '@/utils/formatter/currency'
import { t } from '@lingui/macro'
import { useLingui } from '@lingui/react'
import { convertFromUnits } from '@/utils/bn'

const renderStatus = (row) => {
const status = identifyStatus(row.status)
const status = identifyStatus(row.coverOrProductData.productStatusEnum)

return (
<td className='max-w-xs p-4 text-sm leading-5 whitespace-nowrap text-01052D'>
Expand Down Expand Up @@ -113,9 +114,9 @@ const renderCover = (row, _extraData) => {
)
}

const renderProtection = (row, { locale }) => {
const renderProtection = (row, { locale, liquidityTokenDecimals }) => {
const protection = formatCurrency(
row.coverOrProductData.commitment.toString(),
convertFromUnits(row.coverOrProductData.commitment.toString(), liquidityTokenDecimals),
locale
)

Expand Down
2 changes: 1 addition & 1 deletion src/modules/my-policies/MyPoliciesTxsTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ const CxTokenAmountRenderer = ({ row }) => {

const tokenAmountWithSymbol = row.txType === ROW_TYPES.COVER_PURCHASED
? <TokenAmountSpan amountInUnits={row.cxtokenAmount} decimals={0} symbol={row.tokenSymbol} />
: <TokenAmountSpan className='text-FA5C2F' amountInUnits={row.stablecoinAmount} decimals={0} symbol={row.tokenSymbol} />
: <TokenAmountSpan className='text-FA5C2F' amountInUnits={row.cxtokenAmount} decimals={0} symbol={row.tokenSymbol} />

return (
<td className='max-w-sm px-6 py-6 text-right' data-testid='col-amount'>
Expand Down
2 changes: 1 addition & 1 deletion src/modules/reporting/DisputeFormSkeleton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Skeleton } from '@/common/Skeleton/Skeleton'
export const DisputeFormSkeleton = () => {
return (
<Container className='pt-12 bg-white border-t pb-44 border-t-B0C4DB max-w-none md:bg-transparent' data-testid='dispute-form-loading-skeleton'>
<div className='px-2 mx-auto bg-white border rounded-lg max-w-7xl md:py-16 md:px-24 border-B0C4DB'>
<div className='px-2 mx-auto bg-white rounded-lg md:border max-w-7xl md:py-16 md:px-24 border-B0C4DB'>
<Skeleton className='w-48 mb-4 h-9' />

<div className='my-12'>
Expand Down
2 changes: 1 addition & 1 deletion src/modules/reporting/NewDisputeReportForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export const NewDisputeReportForm = ({
data-testid='dispute-report-form'
ref={form}
onSubmit={onSubmit}
className='px-2 mx-auto bg-white border rounded-lg max-w-7xl md:py-16 md:px-24 border-B0C4DB'
className='px-2 mx-auto bg-white rounded-lg md:border max-w-7xl md:py-16 md:px-24 border-B0C4DB'
>
<h2 className='mb-4 font-bold text-display-sm'>
<Trans>Submit Your Dispute</Trans>
Expand Down
2 changes: 1 addition & 1 deletion src/modules/reporting/NewIncidentReportForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export function NewIncidentReportForm ({ coverKey, productKey, minReportingStake
data-testid='incident-report-form'
ref={form}
onSubmit={onSubmit}
className='px-2 mx-auto bg-white border rounded-lg max-w-7xl md:py-16 md:px-24 border-B0C4DB'
className='px-2 mx-auto bg-white rounded-lg md:border max-w-7xl md:py-16 md:px-24 border-B0C4DB'
>
<h2 className='mb-4 font-bold text-display-sm'>
{/* @note: Intentional Capitalization of the word "Incident" below */}
Expand Down