@ -11,6 +11,9 @@ import {
} from '../../actions/actionCreators' ;
import Store from '../../store' ;
import WalletsBasiliskRefresh from './walletsBasiliskRefresh' ;
import WalletsBasiliskConnection from './walletsBasiliskConnection' ;
import { SocketProvider } from 'socket.io-react' ;
import io from 'socket.io-client' ;
@ -53,7 +56,7 @@ class WalletsData extends React.Component {
} ) ) ;
}
if ( data && data . message && data . message . shepherd . method && data . message . shepherd . method === 'cache-one' && data . message . shepherd . status === 'done' ) {
//_totalStackLength = _currentStackLength = 0;
Store . dispatch ( basiliskRefresh ( false ) ) ;
}
}
@ -323,103 +326,109 @@ class WalletsData extends React.Component {
render ( ) {
if ( this . props && this . props . ActiveCoin && this . props . ActiveCoin . coin && this . props . ActiveCoin . mode !== 'native' && ! this . props . ActiveCoin . send && ! this . props . ActiveCoin . receive ) {
return (
< div data - edexcoin = "COIN" id = "edexcoin_dashboardinfo" >
< div className = "col-xs-12 margin-top-20" >
< div className = "panel nav-tabs-horizontal" >
< div data - edexcoin = "COIN" id = "edexcoin_dashoard_sect io n" >
< div className = "col-xlg-12 col-lg-12 col-sm-12 col-xs-12 edexcoin_dashoard_section_main_div " >
< div id = "edexcoin_txhistory" className = "panel" >
< header className = "panel-heading" style = { { zIndex : '10' } } >
Sockets : { this . state . currentStackLength } / { this . state . totalStackLength }
< div className = { this . props . ActiveCoin . mode === 'basilisk' ? 'panel-actions' : 'panel-actions hide' } >
< a href = "javascript:void(0)" className = "dropdown-toggle white btn-xs btn-info btn_refresh_edexcoin_dashboard" data - edexcoin = "COIN" aria - expanded = "false" role = "button" onClick = { this . refreshTxList } >
< i className = "icon fa-refresh margin-right-10" aria - hidden = "true" > < / i > { t r a n s l a t e ( ' I N D E X . R E F R E S H ' ) }
< / a >
< div className = { this . state . basiliskActionsMenu ? 'dropdown open' : 'dropdown' } onClick = { this . toggleBasiliskActionsMenu } >
< a className = "dropdown-toggle btn-xs btn-default" data - edexcoin = "COIN" id = "btn_edexcoin_basilisk" data - toggle = "dropdown" href = "javascript:void(0)"
aria - expanded = "false" role = "button" >
< i className = "icon fa-magic margin-right-10" aria - hidden = "true" > < / i > { t r a n s l a t e ( ' I N D E X . B A S I L I S K _ A C T I O N S ' ) } < s p a n c l a s s N a m e = " c a r e t " > < / s p a n >
< span >
< WalletsBasiliskRefresh { ... this . props } / >
< WalletsBasiliskConnection { ... this . props } / >
< div data - edexcoin = "COIN" id = "edexcoin_dashb oardinfo " >
< div className = "col-xs-12 margin-top-20 " >
< div className = "panel nav-tabs-horizonta l" >
< div data - edexcoin = "COIN" id = "edexcoin_dashoard_section" >
< div className = "col-xlg-12 col-lg-12 col-sm-12 col-xs-12 edexcoin_dashoard_section_main_div" >
< div id = "edexcoin_txhistory" className = "panel" >
< header className = "panel-heading" style = { { zIndex : '10' } } >
< d iv className = { this . props . ActiveCoin . mode === 'basilisk' ? 'panel-actions' : 'panel-actions hide' } >
< div className = { this . state . currentStackLength === 1 || ( this . state . currentStackLength === 0 && this . state . totalStackLength === 0 ) ? 'hide' : '' } >
< strong > Processing requests : < /strong> {this.state.currentStackLength} / { this . state . totalStackLength }
< / d i v >
< a href = "javascript:void(0)" className = "dropdown-toggle white btn-xs btn-info btn_refresh_edexcoin_dashboard margin-right-10" data - edexcoin = "COIN" aria - expanded = "false" role = "button" onClick = { this . refreshTxList } >
< i className = "icon fa-refresh margin-right-10" aria - hidden = "true" > < / i > { t r a n s l a t e ( ' I N D E X . R E F R E S H ' ) }
< / a >
< ul className = "dropdown-menu dropdown-menu-right" aria - labelledby = "btn_edexcoin_basilisk"
role = "menu" >
< li role = "presentation" >
< a className = "btn_edexcoin_dashboard_getnotaries" data - edexcoin = "COIN" id = "btn_edexcoin_dashboard_getnotaries" role = "menuitem" onClick = { this . getDexNotariesAction } >
< i className = "icon fa-sitemap" aria - hidden = "true" > < / i > { t r a n s l a t e ( ' I N D E X . G E T _ N O T A R Y _ N O D E S _ L I S T ' ) }
< / a >
< / l i >
< li role = "presentation" >
< a className = "btn_edexcoin_dashboard_refresh_basilisk_conn" data - edexcoin = "COIN" id = "btn_edexcoin_dashboard_refresh_basilisk_conn" role = "menuitem" onClick = { this . basiliskConnectionAction } >
< i className = "icon wb-refresh" aria - hidden = "true" > < / i > { t r a n s l a t e ( ' I N D E X . R E F R E S H _ B A S I L I S K _ C O N N E C T I O N S ' ) }
< / a >
< / l i >
< li data - edexcoin = "COIN" role = "presentation" >
< a className = "btn_edexcoin_dashboard_fetchdata" data - edexcoin = "COIN" id = "btn_edexcoin_dashboard_fetchdata" role = "menuitem" onClick = { this . basiliskRefreshAction } >
< i className = "icon fa-cloud-download" aria - hidden = "true" > < / i > { t r a n s l a t e ( ' I N D E X . F E T C H _ W A L L E T _ D A T A ' ) }
< / a >
< / l i >
< li data - edexcoin = "COIN" role = "presentation" >
< a className = "btn_edexcoin_dashboard_refetchdata" data - edexcoin = "COIN" id = "btn_edexcoin_dashboard_refetchdata" role = "menuitem" >
< i className = "icon fa-cloud-download" aria - hidden = "true" > < / i > { t r a n s l a t e ( ' I N D E X . R E F E T C H _ W A L L E T _ D A T A ' ) }
< / a >
< / l i >
< / u l >
< / d i v >
< / d i v >
< h4 className = "panel-title" > { translate ( 'INDEX.TRANSACTION_HISTORY' ) } < / h 4 >
< / h e a d e r >
< div className = "panel-body" >
< div className = "row" >
< div className = "col-sm-6" >
{ this . renderAddressList ( ) }
< div className = { this . state . basiliskActionsMenu ? 'dropdown open' : 'dropdown' } onClick = { this . toggleBasiliskActionsMenu } >
< a className = "dropdown-toggle btn-xs btn-default" data - edexcoin = "COIN" id = "btn_edexcoin_basilisk" data - toggle = "dropdown" href = "javascript:void(0)"
aria - expanded = "false" role = "button" >
< i className = "icon fa-magic margin-right-10" aria - hidden = "true" > < / i > { t r a n s l a t e ( ' I N D E X . B A S I L I S K _ A C T I O N S ' ) } < s p a n c l a s s N a m e = " c a r e t " > < / s p a n >
< / a >
< ul className = "dropdown-menu dropdown-menu-right" aria - labelledby = "btn_edexcoin_basilisk"
role = "menu" >
< li role = "presentation" >
< a className = "btn_edexcoin_dashboard_getnotaries" data - edexcoin = "COIN" id = "btn_edexcoin_dashboard_getnotaries" role = "menuitem" onClick = { this . getDexNotariesAction } >
< i className = "icon fa-sitemap" aria - hidden = "true" > < / i > { t r a n s l a t e ( ' I N D E X . G E T _ N O T A R Y _ N O D E S _ L I S T ' ) }
< / a >
< / l i >
< li role = "presentation" >
< a className = "btn_edexcoin_dashboard_refresh_basilisk_conn" data - edexcoin = "COIN" id = "btn_edexcoin_dashboard_refresh_basilisk_conn" role = "menuitem" onClick = { this . basiliskConnectionAction } >
< i className = "icon wb-refresh" aria - hidden = "true" > < / i > { t r a n s l a t e ( ' I N D E X . R E F R E S H _ B A S I L I S K _ C O N N E C T I O N S ' ) }
< / a >
< / l i >
< li data - edexcoin = "COIN" role = "presentation" >
< a className = "btn_edexcoin_dashboard_fetchdata" data - edexcoin = "COIN" id = "btn_edexcoin_dashboard_fetchdata" role = "menuitem" onClick = { this . basiliskRefreshAction } >
< i className = "icon fa-cloud-download" aria - hidden = "true" > < / i > { t r a n s l a t e ( ' I N D E X . F E T C H _ W A L L E T _ D A T A ' ) }
< / a >
< / l i >
< li data - edexcoin = "COIN" role = "presentation" >
< a className = "btn_edexcoin_dashboard_refetchdata" data - edexcoin = "COIN" id = "btn_edexcoin_dashboard_refetchdata" role = "menuitem" >
< i className = "icon fa-cloud-download" aria - hidden = "true" > < / i > { t r a n s l a t e ( ' I N D E X . R E F E T C H _ W A L L E T _ D A T A ' ) }
< / a >
< / l i >
< / u l >
< / d i v >
< / d i v >
< / d i v >
< div className = "row" >
< div className = "col-sm-6" >
{ this . renderPaginationItemsPerPageSelector ( ) }
< h4 className = "panel-title" > { translate ( 'INDEX.TRANSACTION_HISTORY' ) } < / h 4 >
< / h e a d e r >
< div className = "panel-body" >
< div className = "row" >
< div className = "col-sm-6" >
{ this . renderAddressList ( ) }
< / d i v >
< / d i v >
< div className = "col-sm-6" >
< div id = "kmd-tx-history-tbl_filter" className = "dataTables_filter" >
< label >
Search : < input type = "search" className = "form-control input-sm" placeholder = "" aria - controls = "kmd-tx-history-tbl" disabled = "true" / >
< / l a b e l >
< div className = "row" >
< div className = "col-sm-6" >
{ this . renderPaginationItemsPerPageSelector ( ) }
< / d i v >
< div className = "col-sm-6" >
< div id = "kmd-tx-history-tbl_filter" className = "dataTables_filter" >
< label >
Search : < input type = "search" className = "form-control input-sm" placeholder = "" aria - controls = "kmd-tx-history-tbl" disabled = "true" / >
< / l a b e l >
< / d i v >
< / d i v >
< / d i v >
< div className = "row" >
< table className = "table table-hover dataTable table-striped" data - edexcoin = "COIN" id = "edex-tx-history-tbl" width = "100%" >
< thead >
< tr >
< th > { translate ( 'INDEX.DIRECTION' ) } < / t h >
< th className = "hidden-xs hidden-sm" > { translate ( 'INDEX.CONFIRMATIONS' ) } < / t h >
< th > { translate ( 'INDEX.AMOUNT' ) } < / t h >
< th > { translate ( 'INDEX.TIME' ) } < / t h >
< th > { translate ( 'INDEX.DEST_ADDRESS' ) } < / t h >
< th className = "hidden-xs hidden-sm" > { translate ( 'INDEX.TX_DETAIL' ) } < / t h >
< / t r >
< / t h e a d >
< tbody >
{ this . renderTxHistoryList ( ) }
< / t b o d y >
< tfoot >
< tr >
< th > { translate ( 'INDEX.DIRECTION' ) } < / t h >
< th > { translate ( 'INDEX.CONFIRMATIONS' ) } < / t h >
< th > { translate ( 'INDEX.AMOUNT' ) } < / t h >
< th > { translate ( 'INDEX.TIME' ) } < / t h >
< th > { translate ( 'INDEX.DEST_ADDRESS' ) } < / t h >
< th className = "hidden-xs hidden-sm" > { translate ( 'INDEX.TX_DETAIL' ) } < / t h >
< / t r >
< / t f o o t >
< / t a b l e >
< / d i v >
{ this . renderPagination ( ) }
< / d i v >
< div className = "row" >
< table className = "table table-hover dataTable table-striped" data - edexcoin = "COIN" id = "edex-tx-history-tbl" width = "100%" >
< thead >
< tr >
< th > { translate ( 'INDEX.DIRECTION' ) } < / t h >
< th className = "hidden-xs hidden-sm" > { translate ( 'INDEX.CONFIRMATIONS' ) } < / t h >
< th > { translate ( 'INDEX.AMOUNT' ) } < / t h >
< th > { translate ( 'INDEX.TIME' ) } < / t h >
< th > { translate ( 'INDEX.DEST_ADDRESS' ) } < / t h >
< th className = "hidden-xs hidden-sm" > { translate ( 'INDEX.TX_DETAIL' ) } < / t h >
< / t r >
< / t h e a d >
< tbody >
{ this . renderTxHistoryList ( ) }
< / t b o d y >
< tfoot >
< tr >
< th > { translate ( 'INDEX.DIRECTION' ) } < / t h >
< th > { translate ( 'INDEX.CONFIRMATIONS' ) } < / t h >
< th > { translate ( 'INDEX.AMOUNT' ) } < / t h >
< th > { translate ( 'INDEX.TIME' ) } < / t h >
< th > { translate ( 'INDEX.DEST_ADDRESS' ) } < / t h >
< th className = "hidden-xs hidden-sm" > { translate ( 'INDEX.TX_DETAIL' ) } < / t h >
< / t r >
< / t f o o t >
< / t a b l e >
< / d i v >
{ this . renderPagination ( ) }
< / d i v >
< / d i v >
< / d i v >
< / d i v >
< / d i v >
< / d i v >
< / d i v >
< / s p a n >
) ;
} else {
return null ;