Browse Source

native only mode (wip)

all-modes
pbca26 8 years ago
parent
commit
a9c49d6683
  1. 8
      react/src/actions/actions/addCoin.js
  2. 9
      react/src/actions/actions/nativeSyncInfo.js
  3. BIN
      react/src/assets/images/agama-wallet.png
  4. BIN
      react/src/assets/images/easydex-logo-big.png
  5. 4
      react/src/components/addcoin/addcoin.render.js
  6. 32
      react/src/components/addcoin/addcoinOptionsCrypto.js
  7. 4
      react/src/components/addcoin/coin-selectors.render.js
  8. 2
      react/src/components/dashboard/walletsData/walletsData.js
  9. 32
      react/src/components/dashboard/walletsNative/walletsNative.js
  10. 4
      react/src/translate/en.js

8
react/src/actions/actions/addCoin.js

@ -240,9 +240,11 @@ export function shepherdHerd(coin, mode, path) {
dispatch(
addCoinResult(coin, mode)
);
dispatch(
iguanaActiveHandleBypass()
);
setTimeout(() => {
dispatch(
iguanaActiveHandleBypass()
);
}, 1000);
} else {
dispatch(
iguanaAddCoin(

9
react/src/actions/actions/nativeSyncInfo.js

@ -19,12 +19,13 @@ export function getSyncInfoNativeKMD(skipDebug) {
'timestamp': _timestamp,
'function': 'getSyncInfoNativeKMD',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}/api/dex/getinfo?userpass=tmpIgRPCUser@${sessionStorage.getItem('IguanaRPCAuth')}&symbol=${coin}`,
'url': Config.iguanaLessMode ? 'http://kmd.explorer.supernet.org/api/status?q=getInfo' : `http://127.0.0.1:${Config.iguanaCorePort}/api/dex/getinfo?userpass=tmpIgRPCUser@${sessionStorage.getItem('IguanaRPCAuth')}&symbol=${coin}`,
'payload': '',
'status': 'pending',
}));
return fetch(`http://127.0.0.1:${Config.iguanaCorePort}/api/dex/getinfo?userpass=tmpIgRPCUser@${sessionStorage.getItem('IguanaRPCAuth')}&symbol=${coin}`, {
return fetch(
Config.iguanaLessMode ? 'http://kmd.explorer.supernet.org/api/status?q=getInfo' : `http://127.0.0.1:${Config.iguanaCorePort}/api/dex/getinfo?userpass=tmpIgRPCUser@${sessionStorage.getItem('IguanaRPCAuth')}&symbol=${coin}`, {
method: 'GET',
})
.catch(function(error) {
@ -47,9 +48,9 @@ export function getSyncInfoNativeKMD(skipDebug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
'response': Config.iguanaLessMode ? json.info : json,
}));
dispatch(getSyncInfoNativeState({ 'remoteKMDNode': json }));
dispatch(getSyncInfoNativeState({ 'remoteKMDNode': Config.iguanaLessMode ? json.info : json }));
})
.then(function() {
if (!skipDebug) {

BIN
react/src/assets/images/agama-wallet.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
react/src/assets/images/easydex-logo-big.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 15 KiB

4
react/src/components/addcoin/addcoin.render.js

@ -49,10 +49,10 @@ const AddCoinRender = function() {
</button>
</div>
<div className="col-sm-12">
<p>
<p className={ this.state.nativeOnly ? 'hide' : '' }>
<strong>{ translate('INDEX.FULL_MODE') }:</strong> { translate('INDEX.FULL_MODE_DESC') }
</p>
<p>
<p className={ this.state.nativeOnly ? 'hide' : '' }>
<strong>{ translate('INDEX.BASILISK_MODE') }:</strong> { translate('INDEX.BASILISK_MODE_DESC') }
</p>
<p>

32
react/src/components/addcoin/addcoinOptionsCrypto.js

@ -1,26 +1,34 @@
import React from 'react';
import { translate } from '../../translate/translate';
import { Config } from '../../actions/actionCreators';
class AddCoinOptionsCrypto extends React.Component {
constructor(props) {
super(props);
this.state = {
nativeOnly: Config.iguanaLessMode,
}
}
render() {
//<option value="ANC|full">AnonCoin (ANC)</option>
//<option value="MZC|full">MazaCoin (MZC)</option>
//<option value="SYS|full">SysCoin (SYS)</option>
return (
<optgroup label="Crypto Currencies">
<option value="BTCD|full">BitcoinDark (BTCD)</option>
<option value="BTC|full|basilisk">Bitcoin (BTC)</option>
<option value="BTM|full">Bitmark (BTM)</option>
<option value="CARB|full">Carboncoin (CARB)</option>
<option value="DGB|full">Digibyte (DGB)</option>
<option value="DOGE|full">Dogecoin (DOGE)</option>
<option value="FRK|full">Franko (FRK)</option>
<option value="GAME|full">Gamecredits (GAME)</option>
<option value="BTCD|full" className={ this.state.nativeOnly ? 'hide' : '' }>BitcoinDark (BTCD)</option>
<option value="BTC|full|basilisk" className={ this.state.nativeOnly ? 'hide' : '' }>Bitcoin (BTC)</option>
<option value="BTM|full" className={ this.state.nativeOnly ? 'hide' : '' }>Bitmark (BTM)</option>
<option value="CARB|full" className={ this.state.nativeOnly ? 'hide' : '' }>Carboncoin (CARB)</option>
<option value="DGB|full" className={ this.state.nativeOnly ? 'hide' : '' }>Digibyte (DGB)</option>
<option value="DOGE|full" className={ this.state.nativeOnly ? 'hide' : '' }>Dogecoin (DOGE)</option>
<option value="FRK|full" className={ this.state.nativeOnly ? 'hide' : '' }>Franko (FRK)</option>
<option value="GAME|full" className={ this.state.nativeOnly ? 'hide' : '' }>Gamecredits (GAME)</option>
<option value="KMD|basilisk|native">Komodo (KMD)</option>
<option value="LTC|full">Litecoin (LTC)</option>
<option value="UNO|full">Unobtanium (UNO)</option>
<option value="ZEC|full">Zcash (ZEC)</option>
<option value="ZET|full">Zetacoin (ZET)</option>
<option value="LTC|full" className={ this.state.nativeOnly ? 'hide' : '' }>Litecoin (LTC)</option>
<option value="UNO|full" className={ this.state.nativeOnly ? 'hide' : '' }>Unobtanium (UNO)</option>
<option value="ZEC|full" className={ this.state.nativeOnly ? 'hide' : '' }>Zcash (ZEC)</option>
<option value="ZET|full" className={ this.state.nativeOnly ? 'hide' : '' }>Zetacoin (ZET)</option>
</optgroup>
);
}

4
react/src/components/addcoin/coin-selectors.render.js

@ -34,7 +34,7 @@ const CoinSelectorsRender = function(item, coin, i) {
</button>
</div>
<div className="col-sm-12 text-center">
<div className="form-group col-lg-4 col-md-4 col-sm-6 col-xs-6 style-addcoin-lbl-mdl-login">
<div className={ this.state.nativeOnly ? 'hide' : 'form-group col-lg-4 col-md-4 col-sm-6 col-xs-6 style-addcoin-lbl-mdl-login' }>
<input
type="radio"
className="to-labelauty labelauty"
@ -64,7 +64,7 @@ const CoinSelectorsRender = function(item, coin, i) {
</span>
</label>
</div>
<div className="form-group col-lg-4 col-md-4 col-sm-6 col-xs-6 style-addcoin-lbl-mdl-login">
<div className={ this.state.nativeOnly ? 'hide' : 'form-group col-lg-4 col-md-4 col-sm-6 col-xs-6 style-addcoin-lbl-mdl-login' }>
<input
type="radio"
className="to-labelauty labelauty"

2
react/src/components/dashboard/walletsData/walletsData.js

@ -1,8 +1,8 @@
import React from 'react';
import Config from '../../../config';
import { translate } from '../../../translate/translate';
import { sortByDate } from '../../../util/sort';
import {
Config,
basiliskRefresh,
basiliskConnection,
toggleDashboardTxInfoModal,

32
react/src/components/dashboard/walletsNative/walletsNative.js

@ -1,9 +1,41 @@
import React from 'react';
import WalletsNativeRender from './walletsNative.render';
import { translate } from '../../../translate/translate';
import {
Config,
triggerToaster
} from '../../../actions/actionCreators';
import Store from '../../../store';
import { SocketProvider } from 'socket.io-react';
import io from 'socket.io-client';
const socket = io.connect('http://127.0.0.1:' + Config.agamaPort);
class WalletsNative extends React.Component {
constructor(props) {
super(props);
socket.on('service', msg => this.updateSocketsData(msg));
}
updateSocketsData(data) {
if (data &&
data.komodod &&
data.komodod.error) {
switch (data.komodod.error) {
case 'run -reindex':
Store.dispatch(
triggerToaster(
'Restart Agama and run Komodo with -reindex param',
translate('TOASTR.WALLET_NOTIFICATION'),
'info',
false
)
);
break;
}
}
}
defaultBG() {

4
react/src/translate/en.js

@ -32,7 +32,7 @@ export const _lang = {
'SYNC_ERR_BLOCKS': 'Unable to get current sync progress. Err: no blocks param in response',
'COIN_IS_BUSY': 'Coin is busy processing',
'REFRESHING_BASILISK_NET': 'Refreshing Basilisk Network Connections',
'SELECT_A_COIN': 'Select Coin to add to EasyDEX',
'SELECT_A_COIN': 'Select Coin to add to Agama Wallet',
'WALLETS': 'Wallets',
'ACTIVATE_COIN': 'Activate Coin',
'WELCOME_PLEASE_ADD': 'Welcome. Please add coin to start.',
@ -55,7 +55,7 @@ export const _lang = {
'NATIVE_MODE_DESC6': 'Private Transactions',
'UNSUPPORTED_BROWSER': 'Uh Oh! Unsupported Web Browser :-(',
'CLOSE': 'Close',
'IE_UNSUPPORTED': 'The current version of EasyDEX-GUI doesn\'t support Internet Explorer',
'IE_UNSUPPORTED': 'The current version of Agama Wallet doesn\'t support Internet Explorer',
'PLEASE_USE': 'Please use either',
'OR': 'or',
'TO_USE': 'to use',

Loading…
Cancel
Save