Skip to content

Commit

Permalink
feat(neuron-ui): double click on tx item shows its details
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY committed Jul 31, 2019
1 parent bc32a45 commit 383db66
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/neuron-ui/src/components/TransactionList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
} from 'office-ui-fabric-react'

import { StateDispatch } from 'states/stateProvider/reducer'
import { contextMenu } from 'services/remote'
import { contextMenu, showTransactionDetails } from 'services/remote'

import { useLocalDescription } from 'utils/hooks'
import { shannonToCKBFormatter, uniformTimeFormatter as timeFormatter, uniformTimeFormatter } from 'utils/formatters'
Expand Down Expand Up @@ -203,6 +203,9 @@ const TransactionList = ({
onRenderHeader,
}}
checkboxVisibility={CheckboxVisibility.hidden}
onItemInvoked={item => {
showTransactionDetails(item.hash)
}}
onItemContextMenu={item => {
if (item) {
contextMenu({ type: 'transactionList', id: item.hash })
Expand Down
5 changes: 5 additions & 0 deletions packages/neuron-ui/src/services/remote/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@ export const contextMenu = controllerMethodWrapper(CONTROLLER_NAME)(
controller => (params: { type: string; id: string }) => controller.contextMenu(params)
)

export const showTransactionDetails = controllerMethodWrapper(CONTROLLER_NAME)(controller => (hash: string) =>
controller.showTransactionDetails(hash)
)

export default {
getNeuronWalletState,
handleViewError,
contextMenu,
showTransactionDetails,
}

0 comments on commit 383db66

Please sign in to comment.