File tree Expand file tree Collapse file tree
packages/neuron-ui/src/states/stateProvider/actionCreators Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -271,9 +271,17 @@ export const backupWallet = (params: Controller.BackupWalletParams) => (dispatch
271271export const updateNervosDaoData = ( walletID : Controller . GetNervosDaoDataParams ) => ( dispatch : StateDispatch ) => {
272272 getNervosDaoData ( walletID ) . then ( res => {
273273 if ( res . status === 1 ) {
274+ const withdrawList = res . result
275+ . filter ( ( r : State . NervosDAORecord ) => ! r . depositOutPoint )
276+ . sort ( ( r1 : State . NervosDAORecord , r2 : State . NervosDAORecord ) => + r2 . timestamp - + r1 . timestamp )
277+
278+ const claimList = res . result
279+ . filter ( ( r : State . NervosDAORecord ) => r . depositOutPoint )
280+ . sort ( ( r1 : State . NervosDAORecord , r2 : State . NervosDAORecord ) => + r2 . timestamp - + r1 . timestamp )
281+
274282 dispatch ( {
275283 type : NeuronWalletActions . UpdateNervosDaoData ,
276- payload : { records : res . result } ,
284+ payload : { records : [ ... claimList , ... withdrawList ] } ,
277285 } )
278286 } else {
279287 addNotification ( failureResToNotification ( res ) ) ( dispatch )
You can’t perform that action at this time.
0 commit comments