From d491c9a88f2d9a60a25de4546ae4748f538784e5 Mon Sep 17 00:00:00 2001 From: pbca26 Date: Wed, 13 Sep 2017 23:31:43 +0300 Subject: [PATCH 1/4] settings export keys addr copy btn --- .../src/components/dashboard/jumblr/jumblr.js | 6 ------ .../settings/settings.exportKeysPanel.js | 18 ++++++++++++++++-- react/src/translate/en.js | 10 +++++----- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/react/src/components/dashboard/jumblr/jumblr.js b/react/src/components/dashboard/jumblr/jumblr.js index 760151e..75d93a9 100755 --- a/react/src/components/dashboard/jumblr/jumblr.js +++ b/react/src/components/dashboard/jumblr/jumblr.js @@ -128,12 +128,6 @@ class Jumblr extends React.Component { }); } - /*toggleAddressGenMod() { - this.setState({ - jumblrDepositAddressPBased: !this.state.jumblrDepositAddressPBased, - }); - }*/ - generateJumblrSecretAddress() { let _jumblrSecretAddress = []; let _apiSuccessCount = 0; diff --git a/react/src/components/dashboard/settings/settings.exportKeysPanel.js b/react/src/components/dashboard/settings/settings.exportKeysPanel.js index 4e1b64a..7c59ea5 100644 --- a/react/src/components/dashboard/settings/settings.exportKeysPanel.js +++ b/react/src/components/dashboard/settings/settings.exportKeysPanel.js @@ -4,6 +4,7 @@ import { connect } from 'react-redux'; import { encryptWallet, settingsWifkeyState, + copyCoinAddress, } from '../../../actions/actionCreators'; import Store from '../../../store'; @@ -19,6 +20,7 @@ class ExportKeysPanel extends React.Component { this.exportWifKeys = this.exportWifKeys.bind(this); this.exportWifKeysRaw = this.exportWifKeysRaw.bind(this); this.toggleSeedInputVisibility = this.toggleSeedInputVisibility.bind(this); + this._copyCoinAddress = this._copyCoinAddress.bind(this); this.updateInput = this.updateInput.bind(this); } @@ -59,6 +61,10 @@ class ExportKeysPanel extends React.Component { } } + _copyCoinAddress(address) { + Store.dispatch(copyCoinAddress(address)); + } + renderWifKeys() { let items = []; @@ -80,8 +86,16 @@ class ExportKeysPanel extends React.Component { (i === 1 && _key.indexOf('wif') > -1)) { items.push( - { _key } - { _wifKeys[_key] } + { _key.replace('wif', ' WIF') } + + { _wifKeys[_key] } + + ); } diff --git a/react/src/translate/en.js b/react/src/translate/en.js index 91d31c3..88f1910 100644 --- a/react/src/translate/en.js +++ b/react/src/translate/en.js @@ -278,12 +278,12 @@ export const _lang = { 'WALLET_BACKUP': 'Wallet Backup', 'FIAT_CURRENCY': 'Fiat Currency', 'EXPORT_KEYS': 'Export Keys', - 'ONLY_ACTIVE_WIF_KEYS': 'Only the active coin wallet wif keys will be shown here.
' + - 'If you don\'t see a wif key for the coin you are looking for please active it by adding it from EasyDEX Dashboard.
' + - 'You can use these wif keys to import to another coin wallets.', + 'ONLY_ACTIVE_WIF_KEYS': 'Only the active coin wallet WIF keys will be shown here.
' + + 'If you don\'t see a WIF key for the coin you are looking for please active it by adding it from EasyDEX Dashboard.
' + + 'You can use these WIF keys to import to another coin wallets.', 'PLEASE_KEEP_KEYS_SAFE': 'Please keep these keys extra safe and secure.', 'PASSPHRASE': 'Passphrase', - 'GET_WIF_KEYS': 'Get Wif Keys', + 'GET_WIF_KEYS': 'Get WIF Keys', 'IMPORT_KEYS': 'Import Keys', 'IMPORT_KEYS_DESC_P1': 'This section allows you to import private key of all iguana supported coins, Assetchain, Geckochain, or PAXchain by the wallet.', 'IMPORT_KEYS_DESC_P2': 'It is not mandatory to have that coin active in the wallet for which you are executing import private key process.', @@ -590,7 +590,7 @@ export const _lang = { 'SUPPORT_TICKETS': 'Support tickets', 'GET_SLACK_INVITE': 'Get Slack invite', 'ADDRESS_LIST': 'Address list', - 'WIF_KEY_LIST': 'Wif key list', + 'WIF_KEY_LIST': 'WIF (Wallet Import Format) key list', 'CLI_RESPONSE': 'CLI response', 'PASSPHRASE_REQ': 'Passphrase is required.', 'SAVE_APP_CONFIG': 'Save app config', From 83a89467ebed78f4112d074a18715cdc27860198 Mon Sep 17 00:00:00 2001 From: pbca26 Date: Fri, 15 Sep 2017 00:50:25 +0300 Subject: [PATCH 2/4] basilisk fallback message --- assets/mainWindow/js/init.js | 5 ++++ .../walletsBalance/walletsBalance.js | 25 +++++++++++++++++-- .../walletsBalance/walletsBalance.render.js | 2 ++ .../dashboard/walletsData/walletsData.js | 2 ++ .../walletsData/walletsData.render.js | 1 + 5 files changed, 33 insertions(+), 2 deletions(-) diff --git a/assets/mainWindow/js/init.js b/assets/mainWindow/js/init.js index b7f1414..612ba1d 100644 --- a/assets/mainWindow/js/init.js +++ b/assets/mainWindow/js/init.js @@ -3,6 +3,11 @@ $(document).ready(function() { var window = remote.getCurrentWindow(); var appConf = remote.getCurrentWindow().appConfig; + if (!appConf.experimentalFeatures) { + $('#normalStartBtn').hide(); + $('.dropdown-menu').css('right', '34.8%'); + } + $('#pulse').jRoll({ radius: 100, animation: 'pulse' diff --git a/react/src/components/dashboard/walletsBalance/walletsBalance.js b/react/src/components/dashboard/walletsBalance/walletsBalance.js index 3a37d8f..7508115 100755 --- a/react/src/components/dashboard/walletsBalance/walletsBalance.js +++ b/react/src/components/dashboard/walletsBalance/walletsBalance.js @@ -15,15 +15,36 @@ class WalletsBalance extends React.Component { super(); this.state = { currentAddress: null, + isExplorerData: false, }; this.isFullySynced = this.isFullySynced.bind(this); this.refreshBalance = this.refreshBalance.bind(this); } componentWillReceiveProps(props) { - if (!this.state.currentAddress && - this.props.ActiveCoin.activeAddress) { + if (this.props.ActiveCoin.activeAddress) { + const _mode = this.props.ActiveCoin.mode; + let _isExplorerData = false; + + if (_mode === 'basilisk') { + if (this.props.ActiveCoin.cache) { + const _cache = this.props.ActiveCoin.cache; + const _coin = this.props.ActiveCoin.coin; + const _address = this.props.ActiveCoin.activeAddress; + + if (_address && + _cache[_coin] && + _cache[_coin][_address] && + _cache[_coin][_address].getbalance && + _cache[_coin][_address].getbalance.data && + _cache[_coin][_address].getbalance.data.source) { + _isExplorerData = true; + } + } + } + this.setState(Object.assign({}, this.state, { + isExplorerData: _isExplorerData, currentAddress: this.props.ActiveCoin.activeAddress, })); } diff --git a/react/src/components/dashboard/walletsBalance/walletsBalance.render.js b/react/src/components/dashboard/walletsBalance/walletsBalance.render.js index 39b9f63..1513a6b 100644 --- a/react/src/components/dashboard/walletsBalance/walletsBalance.render.js +++ b/react/src/components/dashboard/walletsBalance/walletsBalance.render.js @@ -108,6 +108,8 @@ const WalletsBalanceRender = function() { + +
Notice: balance is fetched from KMD explorer as a fallback measure!
); }; diff --git a/react/src/components/dashboard/walletsData/walletsData.js b/react/src/components/dashboard/walletsData/walletsData.js index c0975ec..747ad58 100644 --- a/react/src/components/dashboard/walletsData/walletsData.js +++ b/react/src/components/dashboard/walletsData/walletsData.js @@ -54,6 +54,7 @@ class WalletsData extends React.Component { searchTerm: null, coin: null, txhistory: null, + isExplorerData: false, }; this.toggleBasiliskActionsMenu = this.toggleBasiliskActionsMenu.bind(this); @@ -344,6 +345,7 @@ class WalletsData extends React.Component { (this.state.coin && this.state.coin !== this.props.ActiveCoin.coin) || (JSON.stringify(this.props.ActiveCoin.txhistory) !== JSON.stringify(this.state.txhistory))) {*/ _stateChange = Object.assign({}, _stateChange, { + isExplorerData: this.props.ActiveCoin.txhistory[0].source ? true : false, itemsList: this.props.ActiveCoin.txhistory, filteredItemsList: this.filterTransactions(this.props.ActiveCoin.txhistory, this.state.searchTerm), txhistory: this.props.ActiveCoin.txhistory, diff --git a/react/src/components/dashboard/walletsData/walletsData.render.js b/react/src/components/dashboard/walletsData/walletsData.render.js index 6aa4c8e..5ef4129 100644 --- a/react/src/components/dashboard/walletsData/walletsData.render.js +++ b/react/src/components/dashboard/walletsData/walletsData.render.js @@ -249,6 +249,7 @@ export const WalletsDataRender = function() {

{ translate('INDEX.TRANSACTION_HISTORY') }

+
Notice: transactions list is fetched from KMD explorer as a fallback measure!
{ this.shouldDisplayAddressList() && From d1ca8bf73dfc11d4710d33fcc5d4d9e46ed20994 Mon Sep 17 00:00:00 2001 From: pbca26 Date: Fri, 15 Sep 2017 02:06:42 +0300 Subject: [PATCH 3/4] hide exp settings --- assets/mainWindow/css/loading.css | 12 ++++++++++-- assets/mainWindow/js/init.js | 1 + assets/mainWindow/js/loading.js | 6 +++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/assets/mainWindow/css/loading.css b/assets/mainWindow/css/loading.css index 50c3a92..8bb4d5a 100644 --- a/assets/mainWindow/css/loading.css +++ b/assets/mainWindow/css/loading.css @@ -41,11 +41,11 @@ body.loading-window { } body.agama-default-window-height { - height: 300px !important; + height: 355px !important; } body.agama-app-settings-window { - height: 820px; + height: 700px; } .agama-logo { @@ -453,4 +453,12 @@ button.toast-close-button { .dropdown-menu li { cursor: pointer; margin: 5px 0; +} + +.iguana-less { + height: 570px !important; +} +.iguana-less #iguanaCorePort, +.iguana-less #useBasiliskInstance { + display: none; } \ No newline at end of file diff --git a/assets/mainWindow/js/init.js b/assets/mainWindow/js/init.js index 612ba1d..224f074 100644 --- a/assets/mainWindow/js/init.js +++ b/assets/mainWindow/js/init.js @@ -6,6 +6,7 @@ $(document).ready(function() { if (!appConf.experimentalFeatures) { $('#normalStartBtn').hide(); $('.dropdown-menu').css('right', '34.8%'); + $('#nativeOnlyBtnCarret').css('margin-right', '0'); } $('#pulse').jRoll({ diff --git a/assets/mainWindow/js/loading.js b/assets/mainWindow/js/loading.js index c50cb4d..51d01c8 100644 --- a/assets/mainWindow/js/loading.js +++ b/assets/mainWindow/js/loading.js @@ -16,13 +16,17 @@ function initSettingsForm() { let appConfSchema = remote.getCurrentWindow().appConfigSchema; _configCopy = Object.assign({}, appConf); + if (!appConf.experimentalFeatures) { + $('.agama-app-settings-window').addClass('iguana-less'); + } + let _htmlOut = ''; for (let key in appConf) { if (appConfSchema[key] && appConfSchema[key].initDisplay) { _htmlOut = ` ${_htmlOut} - +
${appConfSchema[key].displayName}`; From 3757952defaddaffbb64e32d4911819259d8eb27 Mon Sep 17 00:00:00 2001 From: pbca26 Date: Fri, 15 Sep 2017 02:14:21 +0300 Subject: [PATCH 4/4] jira ag-12 --- .../src/components/dashboard/settings/settings.debugLogPanel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react/src/components/dashboard/settings/settings.debugLogPanel.js b/react/src/components/dashboard/settings/settings.debugLogPanel.js index 4fb3408..e0b89c5 100644 --- a/react/src/components/dashboard/settings/settings.debugLogPanel.js +++ b/react/src/components/dashboard/settings/settings.debugLogPanel.js @@ -42,7 +42,7 @@ class DebugLogPanel extends React.Component { _items.push(

{ secondsToString(_appRuntimeLog[i].time, true) } - { JSON.stringify(_appRuntimeLog[i].msg, null, '').replace('\\n', ' ') } + { JSON.stringify(_appRuntimeLog[i].msg, null, '') }

); }