Skip to content

Commit 8083f1b

Browse files
Milestones can now be created without smart contracts
1 parent 3fad19c commit 8083f1b

11 files changed

+120
-507
lines changed

package.json

-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@
2121
"giveth-liquidpledging": "2.0.0-beta.4",
2222
"history": "^4.7.2",
2323
"localforage": "^1.5.0",
24-
"lpp-campaign": "2.0.0-beta.0",
25-
"lpp-capped-native-milestone": "1.0.0-beta.0",
26-
"minimetoken": "^0.2.0",
2724
"moment": "^2.19.2",
2825
"node-fetch": "^2.1.1",
2926
"node-sass-chokidar": "^1.3.4",

src/components/MilestoneCard.jsx

-17
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import React, { Component } from 'react';
22
import PropTypes from 'prop-types';
33
import Avatar from 'react-avatar';
4-
import BigNumber from 'bignumber.js';
54

65
import { getTruncatedText, isOwner, getUserAvatar, getUserName, history } from '../lib/helpers';
7-
import { checkBalance } from '../lib/middleware';
86
import User from '../models/User';
97
import CardStats from './CardStats';
108
import GivethLogo from '../assets/logo.svg';
@@ -34,20 +32,6 @@ class MilestoneCard extends Component {
3432

3533
editMilestone(e) {
3634
e.stopPropagation();
37-
38-
checkBalance(this.props.balance)
39-
.then(() => {
40-
history.push(
41-
`/campaigns/${this.props.milestone.campaign._id}/milestones/${
42-
this.props.milestone._id
43-
}/edit`,
44-
);
45-
})
46-
.catch(err => {
47-
if (err === 'noBalance') {
48-
// handle no balance error
49-
}
50-
});
5135
}
5236

5337
render() {
@@ -129,7 +113,6 @@ MilestoneCard.propTypes = {
129113
}).isRequired,
130114
}).isRequired,
131115
currentUser: PropTypes.instanceOf(User),
132-
balance: PropTypes.instanceOf(BigNumber).isRequired,
133116
};
134117

135118
MilestoneCard.defaultProps = {

0 commit comments

Comments
 (0)