Skip to content

Commit

Permalink
fix(neuron-ui): remove sort of dao cells
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY committed Nov 14, 2019
1 parent f00b241 commit e501072
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -271,17 +271,9 @@ export const backupWallet = (params: Controller.BackupWalletParams) => (dispatch
export const updateNervosDaoData = (walletID: Controller.GetNervosDaoDataParams) => (dispatch: StateDispatch) => {
getNervosDaoData(walletID).then(res => {
if (res.status === 1) {
const withdrawList = res.result
.filter((r: State.NervosDAORecord) => !r.depositOutPoint)
.sort((r1: State.NervosDAORecord, r2: State.NervosDAORecord) => +r2.timestamp - +r1.timestamp)

const claimList = res.result
.filter((r: State.NervosDAORecord) => r.depositOutPoint)
.sort((r1: State.NervosDAORecord, r2: State.NervosDAORecord) => +r2.timestamp - +r1.timestamp)

dispatch({
type: NeuronWalletActions.UpdateNervosDaoData,
payload: { records: [...claimList, ...withdrawList] },
payload: { records: res.result },
})
} else {
addNotification(failureResToNotification(res))(dispatch)
Expand Down

0 comments on commit e501072

Please sign in to comment.