OSDN Git Service

get detail transactions
authorYongfeng LI <wliyongfeng@gmail.com>
Mon, 29 Jan 2018 06:14:31 +0000 (14:14 +0800)
committerYongfeng LI <wliyongfeng@gmail.com>
Mon, 29 Jan 2018 06:14:31 +0000 (14:14 +0800)
src/features/transactions/components/List.jsx
src/sdk/api/transactions.js

index a4bccc8..ba9c1c0 100644 (file)
@@ -6,7 +6,6 @@ import { pageSize } from '../../../utility/environment'
 
 const type = 'transaction'
 
-
 class List extends React.Component {
   componentWillReceiveProps(nextProps) {
     if (nextProps.blockHeight != this.props.blockHeight) {
@@ -17,18 +16,12 @@ class List extends React.Component {
   }
   render() {
     const ItemList = BaseList.ItemList
-    //pagination create
-    let pagination = null
-    if(!this.props.noResults){
-      pagination = <Pagination
-        currentPage={this.props.currentPage}
-        isLastPage={this.props.isLastPage}
-        pushList={this.props.pushList}/>
-    }
-
     return <div>
       <ItemList {...this.props}/>
-      {pagination}
+      {!this.props.noResults && <Pagination
+        currentPage={this.props.currentPage}
+        isLastPage={this.props.isLastPage}
+        pushList={this.props.pushList}/>}
     </div>
   }
 }
index 2bec551..af7705a 100644 (file)
@@ -69,7 +69,9 @@ const transactionsAPI = (client) => {
   )
 
   return {
-    query: (params, cb) => shared.query(client, 'transactions', '/list-transactions', params, {cb}),
+    query: (params, cb) => shared.query(client, 'transactions', '/list-transactions',
+      Object.assign({}, params, {detail: true}),
+      {cb}),
 
     queryAll: (params, processor, cb) => shared.queryAll(client, 'transactions', params, processor, cb),