From 6ea6603d4ce8a1f2f8a6df4a635a5b20a81ccbef Mon Sep 17 00:00:00 2001 From: petitPapillon Date: Thu, 27 Jul 2017 23:11:06 +0200 Subject: [PATCH 1/6] Rename walletsNativeInfo to walletsInfo rename nativeActiveSection to activeSection --- .../dashboard/receiveCoin/receiveCoin.js | 4 ++-- .../dashboard/walletsBalance/walletsBalance.js | 2 +- .../walletsInfo.js} | 4 ++-- .../walletsInfo.render.js} | 4 ++-- .../walletsNative/walletsNative.render.js | 4 ++-- .../walletsNativeSend/walletsNativeSend.js | 2 +- .../components/dashboard/walletsNav/walletsNav.js | 6 +++--- .../dashboard/walletsTxInfo/walletsTxInfo.js | 2 +- react/src/reducers/activeCoin.js | 14 +++++++------- 9 files changed, 21 insertions(+), 21 deletions(-) rename react/src/components/dashboard/{walletsNativeInfo/walletsNativeInfo.js => walletsInfo/walletsInfo.js} (72%) rename react/src/components/dashboard/{walletsNativeInfo/walletsNativeInfo.render.js => walletsInfo/walletsInfo.render.js} (98%) diff --git a/react/src/components/dashboard/receiveCoin/receiveCoin.js b/react/src/components/dashboard/receiveCoin/receiveCoin.js index 9193512..d084cdd 100644 --- a/react/src/components/dashboard/receiveCoin/receiveCoin.js +++ b/react/src/components/dashboard/receiveCoin/receiveCoin.js @@ -146,10 +146,10 @@ class ReceiveCoin extends React.Component { } render() { - // TODO nativeActiveSection === 'receive' should be removed when native mode is fully merged + // TODO activeSection === 'receive' should be removed when native mode is fully merged // into the rest of the components if (this.props && - (this.props.receive || (this.isNativeMode() && this.props.nativeActiveSection === 'receive'))) { + (this.props.receive || (this.isNativeMode() && this.props.activeSection === 'receive'))) { return ReceiveCoinRender.call(this); } diff --git a/react/src/components/dashboard/walletsBalance/walletsBalance.js b/react/src/components/dashboard/walletsBalance/walletsBalance.js index 1dab912..bb30acc 100755 --- a/react/src/components/dashboard/walletsBalance/walletsBalance.js +++ b/react/src/components/dashboard/walletsBalance/walletsBalance.js @@ -103,7 +103,7 @@ class WalletsBalance extends React.Component { } isNativeBalanceActive() { - return this.isNativeMode() && this.props.ActiveCoin.nativeActiveSection === 'default'; + return this.isNativeMode() && this.props.ActiveCoin.activeSection === 'default'; } isNonNativeBalanceActive() { diff --git a/react/src/components/dashboard/walletsNativeInfo/walletsNativeInfo.js b/react/src/components/dashboard/walletsInfo/walletsInfo.js similarity index 72% rename from react/src/components/dashboard/walletsNativeInfo/walletsNativeInfo.js rename to react/src/components/dashboard/walletsInfo/walletsInfo.js index 6e025e1..11e7280 100644 --- a/react/src/components/dashboard/walletsNativeInfo/walletsNativeInfo.js +++ b/react/src/components/dashboard/walletsInfo/walletsInfo.js @@ -1,5 +1,5 @@ import React from 'react'; -import WalletsNativeInfoRender from './walletsNativeInfo.render'; +import WalletsNativeInfoRender from './walletsInfo.render'; class WalletsNativeInfo extends React.Component { constructor(props) { @@ -10,7 +10,7 @@ class WalletsNativeInfo extends React.Component { if (this.props && this.props.Dashboard && this.props.Dashboard.progress && - this.props.ActiveCoin.nativeActiveSection === 'settings') { + this.props.ActiveCoin.activeSection === 'settings') { return WalletsNativeInfoRender.call(this); } diff --git a/react/src/components/dashboard/walletsNativeInfo/walletsNativeInfo.render.js b/react/src/components/dashboard/walletsInfo/walletsInfo.render.js similarity index 98% rename from react/src/components/dashboard/walletsNativeInfo/walletsNativeInfo.render.js rename to react/src/components/dashboard/walletsInfo/walletsInfo.render.js index 07bd784..b128057 100644 --- a/react/src/components/dashboard/walletsNativeInfo/walletsNativeInfo.render.js +++ b/react/src/components/dashboard/walletsInfo/walletsInfo.render.js @@ -1,7 +1,7 @@ import React from 'react'; import { translate } from '../../../translate/translate'; -const WalletsNativeInfoRender = function() { +const WalletsInfoRender = function() { return (
@@ -146,4 +146,4 @@ const WalletsNativeInfoRender = function() { ); }; -export default WalletsNativeInfoRender; \ No newline at end of file +export default WalletsInfoRender; \ No newline at end of file diff --git a/react/src/components/dashboard/walletsNative/walletsNative.render.js b/react/src/components/dashboard/walletsNative/walletsNative.render.js index 72ecaaf..e71ca60 100644 --- a/react/src/components/dashboard/walletsNative/walletsNative.render.js +++ b/react/src/components/dashboard/walletsNative/walletsNative.render.js @@ -1,6 +1,6 @@ import React from 'react'; import WalletsBalance from '../walletsBalance/walletsBalance'; -import WalletsNativeInfo from '../walletsNativeInfo/walletsNativeInfo'; +import WalletsInfo from '../walletsInfo/walletsInfo'; import WalletsNativeSend from '../walletsNativeSend/walletsNativeSend'; import WalletsProgress from '../walletsProgress/walletsProgress'; import WalletsData from '../walletsData/walletsData'; @@ -32,7 +32,7 @@ const WalletsNativeRender = function() { - +
diff --git a/react/src/components/dashboard/walletsNativeSend/walletsNativeSend.js b/react/src/components/dashboard/walletsNativeSend/walletsNativeSend.js index 3bc67df..21e2f46 100644 --- a/react/src/components/dashboard/walletsNativeSend/walletsNativeSend.js +++ b/react/src/components/dashboard/walletsNativeSend/walletsNativeSend.js @@ -279,7 +279,7 @@ class WalletsNativeSend extends React.Component { render() { if (this.props && this.props.ActiveCoin && - this.props.ActiveCoin.nativeActiveSection === 'send') { + this.props.ActiveCoin.activeSection === 'send') { return WalletsNativeSendRender.call(this); } diff --git a/react/src/components/dashboard/walletsNav/walletsNav.js b/react/src/components/dashboard/walletsNav/walletsNav.js index 0835bfd..02221d6 100644 --- a/react/src/components/dashboard/walletsNav/walletsNav.js +++ b/react/src/components/dashboard/walletsNav/walletsNav.js @@ -35,7 +35,7 @@ class WalletsNav extends React.Component { if (this.props.ActiveCoin.mode === 'native') { Store.dispatch( toggleDashboardActiveSection( - this.props.ActiveCoin.nativeActiveSection === 'settings' ? 'default' : 'settings' + this.props.ActiveCoin.activeSection === 'settings' ? 'default' : 'settings' ) ); } else { @@ -47,7 +47,7 @@ class WalletsNav extends React.Component { if (this.props.ActiveCoin.mode === 'native') { Store.dispatch( toggleDashboardActiveSection( - this.props.ActiveCoin.nativeActiveSection === 'send' ? 'default' : 'send' + this.props.ActiveCoin.activeSection === 'send' ? 'default' : 'send' ) ); } else { @@ -59,7 +59,7 @@ class WalletsNav extends React.Component { if (this.props.ActiveCoin.mode === 'native') { Store.dispatch( toggleDashboardActiveSection( - this.props.ActiveCoin.nativeActiveSection === 'receive' ? 'default' : 'receive' + this.props.ActiveCoin.activeSection === 'receive' ? 'default' : 'receive' ) ); } else { diff --git a/react/src/components/dashboard/walletsTxInfo/walletsTxInfo.js b/react/src/components/dashboard/walletsTxInfo/walletsTxInfo.js index 3055c67..e988b6f 100644 --- a/react/src/components/dashboard/walletsTxInfo/walletsTxInfo.js +++ b/react/src/components/dashboard/walletsTxInfo/walletsTxInfo.js @@ -39,7 +39,7 @@ class WalletsTxInfo extends React.Component { // TODO the conditions below should be merged once the native mode components are fully merged // into the rest of the components (!this.isNativeMode() || - (this.isNativeMode() && this.props.ActiveCoin.nativeActiveSection === 'default'))) { + (this.isNativeMode() && this.props.ActiveCoin.activeSection === 'default'))) { const txInfo = sortByDate(this.props.ActiveCoin.txhistory)[this.props.ActiveCoin.showTransactionInfoTxIndex]; return WalletsTxInfoRender.call(this, txInfo); } diff --git a/react/src/reducers/activeCoin.js b/react/src/reducers/activeCoin.js index ec0dee3..0a976a6 100644 --- a/react/src/reducers/activeCoin.js +++ b/react/src/reducers/activeCoin.js @@ -27,7 +27,7 @@ export function ActiveCoin(state = { send: false, receive: false, balance: 0, - nativeActiveSection: 'default', + activeSection: 'default', showTransactionInfo: false, showTransactionInfoTxIndex: null, txhistory: [], @@ -53,7 +53,7 @@ export function ActiveCoin(state = { receive: state.receive, showTransactionInfo: state.showTransactionInfo, showTransactionInfoTxIndex: state.showTransactionInfoTxIndex, - nativeActiveSection: state.nativeActiveSection, + activeSection: state.activeSection, lastSendToResponse: state.lastSendToResponse, mainBasiliskAddress: state.mainBasiliskAddress, opids: state.opids, @@ -73,7 +73,7 @@ export function ActiveCoin(state = { receive: _coinData.receive, showTransactionInfo: _coinData.showTransactionInfo, showTransactionInfoTxIndex: _coinData.showTransactionInfoTxIndex, - nativeActiveSection: _coinData.nativeActiveSection, + activeSection: _coinData.activeSection, lastSendToResponse: _coinData.lastSendToResponse, mainBasiliskAddress: _coinData.mainBasiliskAddress, opids: _coinData.opids, @@ -91,7 +91,7 @@ export function ActiveCoin(state = { receive: state.receive, showTransactionInfo: state.showTransactionInfo, showTransactionInfoTxIndex: state.showTransactionInfoTxIndex, - nativeActiveSection: state.nativeActiveSection, + activeSection: state.activeSection, lastSendToResponse: state.lastSendToResponse, mainBasiliskAddress: state.mainBasiliskAddress, opids: state.opids, @@ -110,7 +110,7 @@ export function ActiveCoin(state = { receive: false, showTransactionInfo: false, showTransactionInfoTxIndex: null, - nativeActiveSection: 'default', + activeSection: 'default', }); } else { return Object.assign({}, state, { @@ -122,7 +122,7 @@ export function ActiveCoin(state = { receive: false, showTransactionInfo: false, showTransactionInfoTxIndex: null, - nativeActiveSection: 'default', + activeSection: 'default', }); } } @@ -151,7 +151,7 @@ export function ActiveCoin(state = { }); case DASHBOARD_ACTIVE_SECTION: return Object.assign({}, state, { - nativeActiveSection: action.section, + activeSection: action.section, }); case DASHBOARD_ACTIVE_TXINFO_MODAL: return Object.assign({}, state, { From 356bf2c21fbd02c30b4074adf11e9a5858c6ec52 Mon Sep 17 00:00:00 2001 From: Miika Turunen Date: Fri, 4 Aug 2017 00:59:27 +0300 Subject: [PATCH 2/6] Adding missing argument --- react/src/components/dashboard/receiveCoin/receiveCoin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react/src/components/dashboard/receiveCoin/receiveCoin.js b/react/src/components/dashboard/receiveCoin/receiveCoin.js index 34303a6..9f1c1dd 100644 --- a/react/src/components/dashboard/receiveCoin/receiveCoin.js +++ b/react/src/components/dashboard/receiveCoin/receiveCoin.js @@ -179,7 +179,7 @@ class ReceiveCoin extends React.Component { } if (this.state.hideZeroAddresses) { - if (!this.hasNoAmount) { + if (!this.hasNoAmount(address)) { items.push( AddressItemRender.call(this, address, type) ); From 0891d8708ecaf0b66c589c127cf904795ee4256e Mon Sep 17 00:00:00 2001 From: Miika Turunen Date: Fri, 4 Aug 2017 01:05:03 +0300 Subject: [PATCH 3/6] Show toggle button if balance is not 0 --- .../src/components/dashboard/receiveCoin/receiveCoin.render.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react/src/components/dashboard/receiveCoin/receiveCoin.render.js b/react/src/components/dashboard/receiveCoin/receiveCoin.render.js index de187d2..2ad384d 100644 --- a/react/src/components/dashboard/receiveCoin/receiveCoin.render.js +++ b/react/src/components/dashboard/receiveCoin/receiveCoin.render.js @@ -102,7 +102,7 @@ export const ReceiveCoinRender = function() {

{ translate('INDEX.RECEIVING_ADDRESS') }

- { this.checkTotalBalance() === 0 && + { this.checkTotalBalance() !== 0 &&
Date: Fri, 4 Aug 2017 23:07:58 +0300 Subject: [PATCH 4/6] Toggle button label text to the right --- .../dashboard/receiveCoin/receiveCoin.render.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/react/src/components/dashboard/receiveCoin/receiveCoin.render.js b/react/src/components/dashboard/receiveCoin/receiveCoin.render.js index 2ad384d..a95a02d 100644 --- a/react/src/components/dashboard/receiveCoin/receiveCoin.render.js +++ b/react/src/components/dashboard/receiveCoin/receiveCoin.render.js @@ -104,11 +104,6 @@ export const ReceiveCoinRender = function() {
{ this.checkTotalBalance() !== 0 &&
-
- { translate('INDEX.TOGGLE_ZERO_ADDRESSES') } -
+
+ { translate('INDEX.TOGGLE_ZERO_ADDRESSES') } +
} From 346fb0a229721c880ffd7b182c117d8dfda6e06f Mon Sep 17 00:00:00 2001 From: pbca26 Date: Tue, 15 Aug 2017 20:21:19 +0300 Subject: [PATCH 5/6] asset chain crash handler --- react/src/actions/actions/nativeSyncInfo.js | 13 +++++++++++-- react/src/actions/actions/settings.js | 6 +++++- .../coindDownModal/coindDownModal.render.js | 2 +- react/src/components/overrides.scss | 9 ++++++++- 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/react/src/actions/actions/nativeSyncInfo.js b/react/src/actions/actions/nativeSyncInfo.js index b75b161..009c190 100644 --- a/react/src/actions/actions/nativeSyncInfo.js +++ b/react/src/actions/actions/nativeSyncInfo.js @@ -182,7 +182,12 @@ export function getSyncInfoNative(coin, skipDebug) { true ) ); - dispatch(getDebugLog('komodo', 50)); + + if (coin === 'KMD') { + dispatch(getDebugLog('komodo', 50)); + } else { + dispatch(getDebugLog('komodo', 50, coin)); + } dispatch(toggleCoindDownModal(true)); } else { json = JSON.parse(json); @@ -190,7 +195,11 @@ export function getSyncInfoNative(coin, skipDebug) { if (json.error && json.error.message.indexOf('Activating best') === -1) { - dispatch(getDebugLog('komodo', 1)); + if (coin === 'KMD') { + dispatch(getDebugLog('komodo', 1)); + } else { + dispatch(getDebugLog('komodo', 1, coin)); + } } if (Config.debug) { diff --git a/react/src/actions/actions/settings.js b/react/src/actions/actions/settings.js index f38adfa..2b53637 100644 --- a/react/src/actions/actions/settings.js +++ b/react/src/actions/actions/settings.js @@ -167,12 +167,16 @@ function getDebugLogState(json) { } } -export function getDebugLog(target, linesCount) { +export function getDebugLog(target, linesCount, acName) { const payload = { 'herdname': target, 'lastLines': linesCount }; + if (acName) { + payload['ac'] = acName; + } + return dispatch => { return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/debuglog`, { method: 'POST', diff --git a/react/src/components/dashboard/coindDownModal/coindDownModal.render.js b/react/src/components/dashboard/coindDownModal/coindDownModal.render.js index 548e661..3787039 100644 --- a/react/src/components/dashboard/coindDownModal/coindDownModal.render.js +++ b/react/src/components/dashboard/coindDownModal/coindDownModal.render.js @@ -16,7 +16,7 @@ const CoindDownModalRender = function () { onClick={ this.dismiss }> × -

Komodod is down!

+

{ this.props.ActiveCoin.coin === 'KMD' ? 'Komodod' : `Komodod / ${this.props.ActiveCoin.coin}` } is down!

diff --git a/react/src/components/overrides.scss b/react/src/components/overrides.scss index b074e1f..6d1ea2f 100644 --- a/react/src/components/overrides.scss +++ b/react/src/components/overrides.scss @@ -629,12 +629,19 @@ select{ > div { height: 100%; } + .form-group { + &.form-material { + &.floating { + height: 80%; + } + } + } .page-content { width: 90%; height: 100%; textarea { - min-height: 200px; + height: 100%; } } } From a23618cc5a83dea9ba23c58d7b6272c0b542a3b9 Mon Sep 17 00:00:00 2001 From: pbca26 Date: Wed, 16 Aug 2017 11:14:47 +0300 Subject: [PATCH 6/6] updated change.log --- react/change.log | 1 + 1 file changed, 1 insertion(+) diff --git a/react/change.log b/react/change.log index 239bf47..5ee34f5 100644 --- a/react/change.log +++ b/react/change.log @@ -19,6 +19,7 @@ UI: - added coqui assetchain - jumblr - zcashparams folder check +- claim interest modal v0.2.0.21a-beta --------------