Commit c8f6e94d authored by Jonathan Porta's avatar Jonathan Porta
Browse files

Force it to work

parent 8bb347e8
......@@ -49,7 +49,7 @@ class SteemProposalSystem extends React.Component {
last_id: null,
limit: 11,
limitPerPage: 10,
status: 'votable',
status: 'all',
selectedSorter: 'ascending',
};
this.onNext = this.onNext.bind(this);
......@@ -91,9 +91,9 @@ class SteemProposalSystem extends React.Component {
this.props.listVoterProposals({
start: user,
order_by: 'by_creator',
order_direction: 'direction_ascending',
order_direction: 'ascending',
limit: 1000,
status: 'votable',
status: 'all',
});
}
......@@ -101,8 +101,8 @@ class SteemProposalSystem extends React.Component {
limit,
status,
last_id,
order_by = 'by_total_votes',
order_direction = 'direction_descending',
order_by = 'by_creator',
order_direction = 'ascending',
start = ''
) {
if (status === 'voted') {
......@@ -110,11 +110,10 @@ class SteemProposalSystem extends React.Component {
}
this.props.listProposals({
start,
limit,
order_by,
order_direction,
limit,
status,
last_id,
});
}
......@@ -444,19 +443,19 @@ module.exports = {
dispatch(
proposalActions.listProposals({
start: '',
order_by: 'by_total_votes',
order_direction: 'direction_descending',
limit: 11,
order_by: 'by_creator',
order_direction: 'ascending',
status: 'all',
})
);
dispatch(
proposalActions.listVoterProposals({
start: proposal_owner,
order_by: 'by_creator',
order_direction: 'direction_ascending',
limit: 1000,
status: 'votable',
order_by: 'by_creator',
order_direction: 'ascending',
status: 'all',
})
);
},
......
......@@ -29,28 +29,35 @@ export function* listProposals({
reject,
}) {
let proposals;
console.log(
'ProposalSaga->listProposals()::start, order_by, order_direction, limit, status',
start,
order_by,
order_direction,
limit,
status
);
while (!proposals) {
if (status === 'voted') {
const voterProposals = yield call(
[api, api.listProposalsAsync],
start,
[start],
limit,
order_by,
order_direction,
limit,
'votable',
last_id
'votable'
);
proposals = voterProposals[start];
} else {
proposals = yield call(
[api, api.listProposalsAsync],
start,
[start],
limit,
order_by,
order_direction,
limit,
status,
last_id
status
);
}
}
......@@ -77,14 +84,22 @@ export function* listVoterProposals({
let isLast = false;
while (!isLast) {
const data = yield call(
[api, api.listProposalsAsync],
console.log(
'ProposalSaga->listVoterProposals()::start, order_by, order_direction, limit, status',
start,
order_by,
order_direction,
limit,
status,
last_id
status
);
const data = yield call(
[api, api.listProposalsAsync],
[start],
limit,
order_by,
order_direction,
status
);
if (data) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment