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 =>
|
const milestoneAmounts = milestones.map(milestone =>
|
||||||
Wei(milestoneToMilestoneAmount(milestone, targetInWei)),
|
Wei(milestoneToMilestoneAmount(milestone, targetInWei)),
|
||||||
);
|
);
|
||||||
console.log('milestoneAmounts', milestoneAmounts);
|
|
||||||
const immediateFirstMilestonePayout = milestones[0].immediatePayout;
|
const immediateFirstMilestonePayout = milestones[0].immediatePayout;
|
||||||
|
|
||||||
const contractData = {
|
const contractData = {
|
||||||
|
|
|
@ -3,6 +3,9 @@ import { Spin } from 'antd';
|
||||||
import { CrowdFund } from 'modules/proposals/reducers';
|
import { CrowdFund } from 'modules/proposals/reducers';
|
||||||
import UserRow from 'components/UserRow';
|
import UserRow from 'components/UserRow';
|
||||||
import * as ProposalStyled from '../styled';
|
import * as ProposalStyled from '../styled';
|
||||||
|
import Placeholder from '../../Placeholder';
|
||||||
|
import { fromWei } from '../../../utils/units';
|
||||||
|
import UnitDisplay from '../../UnitDisplay';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
crowdFund: CrowdFund;
|
crowdFund: CrowdFund;
|
||||||
|
@ -16,11 +19,20 @@ const ContributorsBlock = ({ crowdFund }: Props) => {
|
||||||
<UserRow
|
<UserRow
|
||||||
key={contributor.address}
|
key={contributor.address}
|
||||||
address={contributor.address}
|
address={contributor.address}
|
||||||
amount={contributor.contributionAmount}
|
secondary={<UnitDisplay value={contributor.contributionAmount} symbol="ETH" />}
|
||||||
/>
|
/>
|
||||||
));
|
));
|
||||||
} else {
|
} 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 {
|
} else {
|
||||||
content = <Spin />;
|
content = <Spin />;
|
||||||
|
|
|
@ -2,14 +2,13 @@ import React from 'react';
|
||||||
import ShortAddress from 'components/ShortAddress';
|
import ShortAddress from 'components/ShortAddress';
|
||||||
import Identicon from 'components/Identicon';
|
import Identicon from 'components/Identicon';
|
||||||
import * as Styled from './styled';
|
import * as Styled from './styled';
|
||||||
import { Wei, fromWei } from 'utils/units';
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
address: string;
|
address: string;
|
||||||
amount?: Wei;
|
secondary?: React.ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
const UserRow = ({ address, amount }: Props) => (
|
const UserRow = ({ address, secondary }: Props) => (
|
||||||
<Styled.Container>
|
<Styled.Container>
|
||||||
<Styled.Avatar>
|
<Styled.Avatar>
|
||||||
<Identicon address={address} />
|
<Identicon address={address} />
|
||||||
|
@ -18,9 +17,7 @@ const UserRow = ({ address, amount }: Props) => (
|
||||||
<Styled.InfoMain>
|
<Styled.InfoMain>
|
||||||
<ShortAddress address={address} />
|
<ShortAddress address={address} />
|
||||||
</Styled.InfoMain>
|
</Styled.InfoMain>
|
||||||
{amount && (
|
{secondary && <Styled.InfoSecondary>{secondary}</Styled.InfoSecondary>}
|
||||||
<Styled.InfoSecondary>{fromWei(amount, 'ether')} ETH</Styled.InfoSecondary>
|
|
||||||
)}
|
|
||||||
</Styled.Info>
|
</Styled.Info>
|
||||||
</Styled.Container>
|
</Styled.Container>
|
||||||
);
|
);
|
||||||
|
|
|
@ -29,7 +29,7 @@ export async function getCrowdFundState(
|
||||||
? 0
|
? 0
|
||||||
: balance
|
: balance
|
||||||
.mul(new BN(100))
|
.mul(new BN(100))
|
||||||
.divRound(target)
|
.div(target)
|
||||||
.toNumber();
|
.toNumber();
|
||||||
const amountVotingForRefund = isRaiseGoalReached
|
const amountVotingForRefund = isRaiseGoalReached
|
||||||
? Wei(await crowdFundContract.methods.amountVotingForRefund().call({ from: account }))
|
? Wei(await crowdFundContract.methods.amountVotingForRefund().call({ from: account }))
|
||||||
|
|
Loading…
Reference in New Issue