import { useAsyncRetry } from 'react-use' ; import { PluginITO_RPC } from '../../messages' ; param pid param trader export function usePoolTradeInfo ( pid , trader ) { return useAsyncRetry ( async ( ) => { if ( ! pid || ! trader ) return ; return PluginITO_RPC . getTradeInfo ( pid , trader ) ; } , [ pid , trader ] ) ; }