address PR comments
This commit is contained in:
parent
934c39ada4
commit
2eff37c401
|
@ -177,7 +177,6 @@ class CreateProposal extends React.Component<Props, State> {
|
|||
const milestoneAmounts = milestones.map(milestone =>
|
||||
Wei(milestoneToMilestoneAmount(milestone, targetInWei)),
|
||||
);
|
||||
console.log('milestoneAmounts', milestoneAmounts);
|
||||
const immediateFirstMilestonePayout = milestones[0].immediatePayout;
|
||||
|
||||
const contractData = {
|
||||
|
|
|
@ -3,6 +3,9 @@ import { Spin } from 'antd';
|
|||
import { CrowdFund } from 'modules/proposals/reducers';
|
||||
import UserRow from 'components/UserRow';
|
||||
import * as ProposalStyled from '../styled';
|
||||
import Placeholder from '../../Placeholder';
|
||||
import { fromWei } from '../../../utils/units';
|
||||
import UnitDisplay from '../../UnitDisplay';
|
||||
|
||||
interface Props {
|
||||
crowdFund: CrowdFund;
|
||||
|
@ -16,11 +19,20 @@ const ContributorsBlock = ({ crowdFund }: Props) => {
|
|||
<UserRow
|
||||
key={contributor.address}
|
||||
address={contributor.address}
|
||||
amount={contributor.contributionAmount}
|
||||
secondary={<UnitDisplay value={contributor.contributionAmount} symbol="ETH" />}
|
||||
/>
|
||||
));
|
||||
} else {
|
||||
content = <h5>No contributors found.</h5>;
|
||||
content = (
|
||||
<Placeholder
|
||||
style={{ minHeight: '220px' }}
|
||||
title="No contributors found"
|
||||
subtitle={`
|
||||
It appears that your campaign hasn't yet been funded.
|
||||
Check back later once you've received at least one contribution!
|
||||
`}
|
||||
/>
|
||||
);
|
||||
}
|
||||
} else {
|
||||
content = <Spin />;
|
||||
|
|
|
@ -2,14 +2,13 @@ import React from 'react';
|
|||
import ShortAddress from 'components/ShortAddress';
|
||||
import Identicon from 'components/Identicon';
|
||||
import * as Styled from './styled';
|
||||
import { Wei, fromWei } from 'utils/units';
|
||||
|
||||
interface Props {
|
||||
address: string;
|
||||
amount?: Wei;
|
||||
secondary?: React.ReactNode;
|
||||
}
|
||||
|
||||
const UserRow = ({ address, amount }: Props) => (
|
||||
const UserRow = ({ address, secondary }: Props) => (
|
||||
<Styled.Container>
|
||||
<Styled.Avatar>
|
||||
<Identicon address={address} />
|
||||
|
@ -18,9 +17,7 @@ const UserRow = ({ address, amount }: Props) => (
|
|||
<Styled.InfoMain>
|
||||
<ShortAddress address={address} />
|
||||
</Styled.InfoMain>
|
||||
{amount && (
|
||||
<Styled.InfoSecondary>{fromWei(amount, 'ether')} ETH</Styled.InfoSecondary>
|
||||
)}
|
||||
{secondary && <Styled.InfoSecondary>{secondary}</Styled.InfoSecondary>}
|
||||
</Styled.Info>
|
||||
</Styled.Container>
|
||||
);
|
||||
|
|
|
@ -29,7 +29,7 @@ export async function getCrowdFundState(
|
|||
? 0
|
||||
: balance
|
||||
.mul(new BN(100))
|
||||
.divRound(target)
|
||||
.div(target)
|
||||
.toNumber();
|
||||
const amountVotingForRefund = isRaiseGoalReached
|
||||
? Wei(await crowdFundContract.methods.amountVotingForRefund().call({ from: account }))
|
||||
|
|
Loading…
Reference in New Issue