Skip to content
This repository was archived by the owner on Apr 2, 2025. It is now read-only.
Merged

V0.25 #195

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@
"qrcode.react": "^0.7.1",
"rc-tree": "^1.4.6",
"react": "^15.3.1",
"react-cryptocoins": "^1.0.10",
"react-dom": "^15.3.1",
"react-hot-loader": "^1.3.0",
"react-qr-reader": "^1.1.3",
"react-redux": "^5.0.3",
"react-router": "^3.0.2",
"react-router-redux": "^4.0.4",
"react-select": "^1.1.0",
"react-table": "~6.5.1",
"react-transform-catch-errors": "^1.0.2",
"react-transform-hmr": "^1.0.4",
Expand Down
4 changes: 1 addition & 3 deletions react/src/actions/actionCreators.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,11 @@ export * from './actions/nativeSyncInfo';
export * from './actions/nativeSend';
export * from './actions/coinList';
export * from './actions/nativeNewAddress';
// export * from './actions/logout';
export * from './actions/settings';
export * from './actions/addCoin';
// export * from './actions/walletAuth';
export * from './actions/copyAddress';
export * from './actions/sysInfo';
export * from './actions/dexCoins';
//export * from './actions/fullTxHistory';
export * from './actions/cli';
export * from './actions/update';
export * from './actions/jumblr';
Expand All @@ -52,6 +49,7 @@ export * from './actions/nativeDashboardUpdate';
export * from './actions/getTxDetails';
export * from './actions/electrum';
export * from './actions/mm';
export * from './actions/nativeNetwork';

export function changeActiveAddress(address) {
return {
Expand Down
5 changes: 2 additions & 3 deletions react/src/actions/actions/addCoin.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
startAssetChain,
startCrypto,
checkCoinType,
checkAC
checkAC,
} from '../../components/addcoin/payload';

function iguanaActiveHandleState(json) {
Expand Down Expand Up @@ -240,10 +240,9 @@ export function shepherdHerd(coin, mode, path, startupParams) {
addCoinResult(coin, mode)
);
} else {
console.warn(acData);
dispatch(
triggerToaster(
translate('TOASTR.ERROR_STARTING_DAEMON', coin) + ' ' + translate('TOASTR.PORT_IS_TAKEN', acData.rpc),
translate('TOASTR.ERROR_STARTING_DAEMON', coin) + ' ' + translate('TOASTR.PORT_IS_TAKEN', acData),
translate('TOASTR.SERVICE_NOTIFICATION'),
'error',
false
Expand Down
59 changes: 0 additions & 59 deletions react/src/actions/actions/logout.js

This file was deleted.

30 changes: 23 additions & 7 deletions react/src/actions/actions/mm.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import {
DEX_UTXO,
DEX_CACHE_PRELOAD,
DEX_PRICES,
DEX_STATS,
DEX_ACTIVE_SECTION,
} from '../storeType';
import { translate } from '../../translate/translate';
import Config from '../../config';
Expand All @@ -18,7 +20,7 @@ import {
} from '../actionCreators';
import Store from '../../store';

export function shepherdMMCachePreloadState(isAuth, asks, bids, pair, coins, swaps, rates) {
export function shepherdMMCachePreloadState(isAuth, asks, bids, pair, coins, swaps, rates, coinsHelper, electrumServersList) {
return {
type: DEX_CACHE_PRELOAD,
isAuth,
Expand All @@ -28,6 +30,8 @@ export function shepherdMMCachePreloadState(isAuth, asks, bids, pair, coins, swa
coins,
swaps,
rates,
coinsHelper,
electrumServersList,
}
}

Expand Down Expand Up @@ -88,7 +92,6 @@ export function shepherdMMStop() {
}

export function shepherdMMRequest(payload) {
console.warn(payload);
return dispatch => {
return fetch(
`http://127.0.0.1:${Config.agamaPort}/shepherd/mm/request`, {
Expand All @@ -101,7 +104,7 @@ export function shepherdMMRequest(payload) {
)
.catch((error) => {
console.log(error);
Store.dispatch(
dispatch(
triggerToaster(
'shepherdMMRequest',
'Error',
Expand All @@ -111,21 +114,34 @@ export function shepherdMMRequest(payload) {
})
.then(response => response.json())
.then(json => {
dispatch(shepherdMMRequstState(payload.mapToProp, json));
console.warn(json);
dispatch(shepherdMMRequestState(payload.mapToProp, json));
});
}
}

export function shepherdMMRequstState(prop, json) {
export function shepherdMMRequestState(prop, json) {
if (prop === 'prices') {
return {
type: DEX_PRICES,
prices: json,
}
} else if (prop === 'statsdisp') {
} else if (prop === 'stats') {
return {
type: DEX_STATS,
prices: json,
stats: json,
}
} else if (prop === 'swaps') {
return {
type: DEX_SWAPS,
swaps: json,
}
}
}

export function dexActiveSection(section) {
return {
type: DEX_ACTIVE_SECTION,
section,
}
}
97 changes: 97 additions & 0 deletions react/src/actions/actions/nativeNetwork.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
import {
DASHBOARD_ACTIVE_COIN_NET_PEERS,
DASHBOARD_ACTIVE_COIN_NET_TOTALS,
} from '../storeType';
import { translate } from '../../translate/translate';
import { triggerToaster } from '../actionCreators';
import Config from '../../config';

export function getNativePeers(coin) {
return dispatch => {
const payload = {
mode: null,
chain: coin,
cmd: 'getpeerinfo',
};

const _fetchConfig = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ payload: payload }),
};

fetch(
`http://127.0.0.1:${Config.agamaPort}/shepherd/cli`,
_fetchConfig
)
.catch((error) => {
console.log(error);
dispatch(
triggerToaster(
'getNativePeers',
'Error',
'error'
)
);
})
.then(response => response.json())
.then(json => {
json = json.result;
dispatch(getNativePeersState(json));
})
};
}

export function getNativeNettotals(coin) {
return dispatch => {
const payload = {
mode: null,
chain: coin,
cmd: 'getnettotals',
};

const _fetchConfig = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ payload: payload }),
};

fetch(
`http://127.0.0.1:${Config.agamaPort}/shepherd/cli`,
_fetchConfig
)
.catch((error) => {
console.log(error);
dispatch(
triggerToaster(
'getNativeNettotals',
'Error',
'error'
)
);
})
.then(response => response.json())
.then(json => {
json = json.result;
dispatch(getNativeNettotalsState(json));
})
};
}

export function getNativePeersState(json) {
return {
type: DASHBOARD_ACTIVE_COIN_NET_PEERS,
peers: json,
}
}

export function getNativeNettotalsState(json) {
return {
type: DASHBOARD_ACTIVE_COIN_NET_TOTALS,
totals: json,
}
}
6 changes: 5 additions & 1 deletion react/src/actions/storeType.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ export const DASHBOARD_ELECTRUM_COINS = 'DASHBOARD_ELECTRUM_COINS';
export const ELECTRUM_SERVER_CHANGED = 'ELECTRUM_SERVER_CHANGED';
export const DISPLAY_ZCASH_PARAMS_FETCH = 'DISPLAY_ZCASH_PARAMS_FETCH';
export const DASHBOARD_REMOVE_COIN = 'DASHBOARD_REMOVE_COIN';
export const DASHBOARD_ACTIVE_COIN_NET_PEERS = 'DASHBOARD_ACTIVE_COIN_NET_PEERS';
export const DASHBOARD_ACTIVE_COIN_NET_TOTALS = 'DASHBOARD_ACTIVE_COIN_NET_TOTALS';

/* dex */
export const DEX_LOGIN = 'DEX_LOGIN';
export const DEX_LOGOUT = 'DEX_LOGOUT';
Expand All @@ -61,4 +64,5 @@ export const DEX_UTXO = 'DEX_UTXO';
export const DEX_PRICES = 'DEX_PRICES';
export const DEX_RESET = 'DEX_RESET';
export const DEX_STATS = 'DEX_STATS';
export const DEX_CACHE_PRELOAD = 'DEX_CACHE_PRELOAD';
export const DEX_CACHE_PRELOAD = 'DEX_CACHE_PRELOAD';
export const DEX_ACTIVE_SECTION = 'DEX_ACTIVE_SECTION';
1 change: 0 additions & 1 deletion react/src/assets/dex/coins/kmd.svg

This file was deleted.

10 changes: 0 additions & 10 deletions react/src/assets/dex/coins/mnz.svg

This file was deleted.

Binary file added react/src/assets/images/cryptologo/blk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added react/src/assets/images/cryptologo/block.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added react/src/assets/images/cryptologo/bsd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added react/src/assets/images/cryptologo/btcz.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified react/src/assets/images/cryptologo/chips.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added react/src/assets/images/cryptologo/hodlc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added react/src/assets/images/cryptologo/iop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added react/src/assets/images/cryptologo/maga.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added react/src/assets/images/cryptologo/mshark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added react/src/assets/images/cryptologo/zen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading