Browse Source

Merge branch 'redux' into tx-history-improvements

# Conflicts:
#	react/src/components/dashboard/walletsData/walletsData.js
#	react/src/components/dashboard/walletsData/walletsData.render.js
#	react/src/components/dashboard/walletsTxInfo/walletsTxInfo.render.js
all-modes
Ivana Trajanovska 8 years ago
parent
commit
e775f76693
  1. 3
      react/change.log
  2. 4
      react/src/actions/actionCreators.js
  3. 42
      react/src/actions/actions/addCoin.js
  4. 216
      react/src/actions/actions/addressBalance.js
  5. 42
      react/src/actions/actions/atomic.js
  6. 84
      react/src/actions/actions/basiliskProcessAddress.js
  7. 42
      react/src/actions/actions/createWallet.js
  8. 42
      react/src/actions/actions/dexCoins.js
  9. 72
      react/src/actions/actions/edexBalance.js
  10. 42
      react/src/actions/actions/edexGetTx.js
  11. 42
      react/src/actions/actions/fullTxHistory.js
  12. 42
      react/src/actions/actions/getAddrByAccount.js
  13. 42
      react/src/actions/actions/iguanaHelpers.js
  14. 42
      react/src/actions/actions/logout.js
  15. 42
      react/src/actions/actions/nativeBalance.js
  16. 42
      react/src/actions/actions/nativeNewAddress.js
  17. 95
      react/src/actions/actions/nativeSend.js
  18. 84
      react/src/actions/actions/nativeSyncInfo.js
  19. 42
      react/src/actions/actions/nativeTxHistory.js
  20. 84
      react/src/actions/actions/notary.js
  21. 168
      react/src/actions/actions/sendFullBasilisk.js
  22. 126
      react/src/actions/actions/settings.js
  23. 42
      react/src/actions/actions/syncInfo.js
  24. 168
      react/src/actions/actions/walletAuth.js
  25. 14
      react/src/components/dashboard/coinTile/coinTileItem.js
  26. 20
      react/src/components/dashboard/main/dashboard.render.js
  27. 20
      react/src/components/dashboard/qrModal/qrModal.js
  28. 8
      react/src/components/dashboard/qrModal/qrModal.render.js
  29. 14
      react/src/components/dashboard/receiveCoin/receiveCoin.js
  30. 8
      react/src/components/dashboard/receiveCoin/receiveCoin.render.js
  31. 36
      react/src/components/dashboard/sendCoin/sendCoin.js
  32. 124
      react/src/components/dashboard/sendCoin/sendCoin.render.js
  33. 51
      react/src/components/dashboard/settings/settings.js
  34. 12
      react/src/components/dashboard/settings/settings.render.js
  35. 31
      react/src/components/dashboard/walletsBalance/walletsBalance.js
  36. 41
      react/src/components/dashboard/walletsBalance/walletsBalance.render.js
  37. 180
      react/src/components/dashboard/walletsData/walletsData.js
  38. 12
      react/src/components/dashboard/walletsData/walletsData.render.js
  39. 111
      react/src/components/dashboard/walletsNativeSend/walletsNativeSend.js
  40. 124
      react/src/components/dashboard/walletsNativeSend/walletsNativeSend.render.js
  41. 46
      react/src/components/dashboard/walletsNav/walletsNav.js
  42. 32
      react/src/components/dashboard/walletsNav/walletsNav.render.js
  43. 22
      react/src/components/dashboard/walletsProgress/walletsProgress.js
  44. 4
      react/src/components/dashboard/walletsProgress/walletsProgress.render.js
  45. 4
      react/src/components/dashboard/walletsTxInfo/walletsTxInfo.js
  46. 220
      react/src/components/dashboard/walletsTxInfo/walletsTxInfo.render.js
  47. 12
      react/src/components/login/login.js
  48. 10
      react/src/components/main/main.js
  49. 1
      react/src/components/main/walletMain.js
  50. 36
      react/src/components/overrides.scss
  51. 4
      react/src/translate/en.js
  52. 8
      react/src/translate/translate.js
  53. 13
      react/src/util/formatValue.js
  54. 15
      react/src/util/sort.js
  55. 8
      react/src/util/time.js
  56. 25
      react/www/index.html

3
react/change.log

@ -13,6 +13,9 @@ UI:
- reset app setting to default
- manual balance / transactions list refresh
- quick access dropdown on login to open settings / about / sync only modals
- qr code generator / scan
- basilisk send form reset fix
- added native wallet info button
v0.2.0.21a-beta
--------------

4
react/src/actions/actionCreators.js

@ -325,9 +325,9 @@ export function getNativeTxHistoryState(json) {
if (json &&
json.error) {
json = null;
} else if (json && json.result) {
} else if (json && json.result && json.result.length) {
json = json.result;
} else if (!json.length) {
} else if (!json || !json.result.length) {
json = 'no data';
}

42
react/src/actions/actions/addCoin.js

@ -97,14 +97,16 @@ export function addCoin(coin, mode, syncOnly, port, startupParams) {
export function iguanaAddCoin(coin, mode, acData, port) {
function _iguanaAddCoin(dispatch) {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'iguanaAddCoin',
'type': 'post',
'url': `http://127.0.0.1:${(port ? port : Config.iguanaCorePort)}`,
'payload': acData,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'iguanaAddCoin',
'type': 'post',
'url': `http://127.0.0.1:${(port ? port : Config.iguanaCorePort)}`,
'payload': acData,
'status': 'pending',
}));
}
return fetch(`http://127.0.0.1:${(port ? port : Config.iguanaCorePort)}`, {
method: 'POST',
@ -112,11 +114,13 @@ export function iguanaAddCoin(coin, mode, acData, port) {
})
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
translate('TOASTR.FAILED_TO_ADDCOIN'),
@ -127,11 +131,13 @@ export function iguanaAddCoin(coin, mode, acData, port) {
})
.then(response => response.json())
.then(json => {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
dispatch(
addCoinResult(
coin,

216
react/src/actions/actions/addressBalance.js

@ -106,14 +106,16 @@ export function getKMDAddressesNative(coin, mode, currentAddress) {
}
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getKMDAddressesNative',
'type': 'post',
'url': Config.cli.default ? `http://127.0.0.1:${Config.agamaPort}/shepherd/cli` : `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getKMDAddressesNative',
'type': 'post',
'url': Config.cli.default ? `http://127.0.0.1:${Config.agamaPort}/shepherd/cli` : `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
}
let _fetchConfig = {
method: 'POST',
@ -137,11 +139,13 @@ export function getKMDAddressesNative(coin, mode, currentAddress) {
)
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'getKMDAddressesNative',
@ -152,11 +156,13 @@ export function getKMDAddressesNative(coin, mode, currentAddress) {
})
.then(response => response.json())
.then(json => {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
resolve(Config.cli.default && mode === 'native' ? json.result : json);
})
}
@ -249,25 +255,27 @@ export function getKMDAddressesNative(coin, mode, currentAddress) {
for (let a = 0; a < result.length; a++) {
newAddressArray[a] = [];
for (let b = 0; b < result[a].length; b++) {
let filteredArray;
if (result[a]) {
for (let b = 0; b < result[a].length; b++) {
let filteredArray;
if (mode === 'basilisk') {
filteredArray = json.map(res => res.amount);
} else {
filteredArray = json.filter(res => res.address === result[a][b]).map(res => res.amount);
}
if (mode === 'basilisk') {
filteredArray = json.map(res => res.amount);
} else {
filteredArray = json.filter(res => res.address === result[a][b]).map(res => res.amount);
}
let sum = 0;
for (let i = 0; i < filteredArray.length; i++) {
sum += filteredArray[i];
}
let sum = 0;
for (let i = 0; i < filteredArray.length; i++) {
sum += filteredArray[i];
}
newAddressArray[a][b] = {
address: result[a][b],
amount: currentAddress === result[a][b] || mode === 'native' ? sum : 'N/A',
type: a === 0 ? 'public': 'private',
};
newAddressArray[a][b] = {
address: result[a][b],
amount: currentAddress === result[a][b] || mode === 'native' ? sum : 'N/A',
type: a === 0 ? 'public': 'private',
};
}
}
}
@ -277,7 +285,7 @@ export function getKMDAddressesNative(coin, mode, currentAddress) {
Promise.all(result[1].map((_address, index) => {
return new Promise((resolve, reject) => {
const _timestamp = Date.now();
let ajaxDataToHex = `[\"${_address}\"]`;
let ajaxDataToHex = '["' + _address + '"]';
iguanaHashHex(ajaxDataToHex, dispatch)
.then((hashHexJson) => {
@ -299,14 +307,16 @@ export function getKMDAddressesNative(coin, mode, currentAddress) {
'hex': hashHexJson,
};
}
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getKMDAddressesNative+ZBalance',
'type': 'post',
'url': Config.cli.default ? `http://127.0.0.1:${Config.agamaPort}/shepherd/cli` : `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getKMDAddressesNative+ZBalance',
'type': 'post',
'url': Config.cli.default ? `http://127.0.0.1:${Config.agamaPort}/shepherd/cli` : `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
}
let _fetchConfig = {
method: 'POST',
@ -339,11 +349,13 @@ export function getKMDAddressesNative(coin, mode, currentAddress) {
)
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'getKMDAddressesNative+ZBalance',
@ -357,11 +369,13 @@ export function getKMDAddressesNative(coin, mode, currentAddress) {
if (json &&
json.error) {
resolve(0);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': json,
}));
}
dispatch(
triggerToaster(
'getKMDAddressesNative+ZBalance',
@ -380,11 +394,13 @@ export function getKMDAddressesNative(coin, mode, currentAddress) {
amount: json,
type: 'private',
};
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
}
});
});
@ -433,14 +449,16 @@ export function getKMDAddressesNative(coin, mode, currentAddress) {
calcBalance(result, json[coin][currentAddress].refresh.data, dispatch, mode);
} else {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getKMDAddressesNative+Balance',
'type': 'post',
'url': `http://127.0.0.1:${(Config.useBasiliskInstance && mode === 'basilisk' ? Config.iguanaCorePort + 1 : Config.iguanaCorePort)}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getKMDAddressesNative+Balance',
'type': 'post',
'url': `http://127.0.0.1:${(Config.useBasiliskInstance && mode === 'basilisk' ? Config.iguanaCorePort + 1 : Config.iguanaCorePort)}`,
'payload': payload,
'status': 'pending',
}));
}
fetch(`http://127.0.0.1:${(Config.useBasiliskInstance && mode === 'basilisk' ? Config.iguanaCorePort + 1 : Config.iguanaCorePort)}`, {
method: 'POST',
@ -448,11 +466,13 @@ export function getKMDAddressesNative(coin, mode, currentAddress) {
})
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'getKMDAddressesNative+Balance',
@ -463,11 +483,13 @@ export function getKMDAddressesNative(coin, mode, currentAddress) {
})
.then(response => response.json())
.then(function(json) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
updatedCache.basilisk[coin][currentAddress].refresh = {
'data': json,
'status': 'done',
@ -485,14 +507,16 @@ export function getKMDAddressesNative(coin, mode, currentAddress) {
})
} else {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getKMDAddressesNative+Balance',
'type': 'post',
'url': `http://127.0.0.1:${(Config.useBasiliskInstance && mode === 'basilisk' ? Config.iguanaCorePort + 1 : Config.iguanaCorePort)}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getKMDAddressesNative+Balance',
'type': 'post',
'url': `http://127.0.0.1:${(Config.useBasiliskInstance && mode === 'basilisk' ? Config.iguanaCorePort + 1 : Config.iguanaCorePort)}`,
'payload': payload,
'status': 'pending',
}));
}
let _fetchConfig = {
method: 'POST',
@ -523,11 +547,13 @@ export function getKMDAddressesNative(coin, mode, currentAddress) {
)
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'getKMDAddressesNative+Balance',
@ -542,11 +568,13 @@ export function getKMDAddressesNative(coin, mode, currentAddress) {
mode === 'native') {
json = json.result;
}
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
calcBalance(
result,
json,

42
react/src/actions/actions/atomic.js

@ -9,14 +9,16 @@ import Config from '../../config';
export function atomic(payload) {
return dispatch => {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'atomic',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'atomic',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
}
return fetch(`http://127.0.0.1:${Config.iguanaCorePort}`, {
method: 'POST',
@ -24,11 +26,13 @@ export function atomic(payload) {
})
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
payload.method,
@ -39,11 +43,13 @@ export function atomic(payload) {
})
.then(response => response.json())
.then(json => {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
dispatch(atomicState(json));
});
}

84
react/src/actions/actions/basiliskProcessAddress.js

@ -17,14 +17,16 @@ export function checkAddressBasilisk(coin, address) {
return dispatch => {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'checkAddressBasilisk',
'type': 'post',
'url': `http://127.0.0.1:${Config.useBasiliskInstance ? Config.iguanaCorePort + 1 : Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'checkAddressBasilisk',
'type': 'post',
'url': `http://127.0.0.1:${Config.useBasiliskInstance ? Config.iguanaCorePort + 1 : Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
}
return fetch(`http://127.0.0.1:${Config.useBasiliskInstance ? Config.iguanaCorePort + 1 : Config.iguanaCorePort}`, {
method: 'POST',
@ -32,11 +34,13 @@ export function checkAddressBasilisk(coin, address) {
})
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'checkAddressBasilisk',
@ -47,11 +51,13 @@ export function checkAddressBasilisk(coin, address) {
})
.then(response => response.json())
.then(json => {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
dispatch(checkAddressBasiliskHandle(json));
})
}
@ -97,14 +103,16 @@ export function validateAddressBasilisk(coin, address) {
return dispatch => {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'validateAddressBasilisk',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'validateAddressBasilisk',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
}
return fetch(`http://127.0.0.1:${Config.useBasiliskInstance ? Config.iguanaCorePort + 1 : Config.iguanaCorePort}`, {
method: 'POST',
@ -112,11 +120,13 @@ export function validateAddressBasilisk(coin, address) {
})
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'validateAddressBasilisk',
@ -127,11 +137,13 @@ export function validateAddressBasilisk(coin, address) {
})
.then(response => response.json())
.then(json => {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
dispatch(validateAddressBasiliskHandle(json));
})
}

42
react/src/actions/actions/createWallet.js

@ -42,14 +42,16 @@ export function createNewWallet(_passphrase) {
return dispatch => {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'createNewWallet',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'createNewWallet',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
}
return fetch(`http://127.0.0.1:${Config.iguanaCorePort}`, {
method: 'POST',
@ -57,11 +59,13 @@ export function createNewWallet(_passphrase) {
})
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'createNewWallet',
@ -72,11 +76,13 @@ export function createNewWallet(_passphrase) {
})
.then(response => response.json())
.then(json => {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
dispatch(createNewWalletState(json));
})
}

42
react/src/actions/actions/dexCoins.js

@ -17,14 +17,16 @@ export function getDexCoins() {
return dispatch => {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getDexCoins',
'type': 'post',
'url': Config.iguanaLessMode ? `http://127.0.0.1:${Config.agamaPort}/shepherd/InstantDEX/allcoins` : `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': _payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getDexCoins',
'type': 'post',
'url': Config.iguanaLessMode ? `http://127.0.0.1:${Config.agamaPort}/shepherd/InstantDEX/allcoins` : `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': _payload,
'status': 'pending',
}));
}
let _fetchConfig = {
method: 'POST',
@ -46,11 +48,13 @@ export function getDexCoins() {
)
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'Error getDexCoins',
@ -61,11 +65,13 @@ export function getDexCoins() {
})
.then(response => response.json())
.then(json => {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
dispatch(dashboardCoinsState(json));
});
}

72
react/src/actions/actions/edexBalance.js

@ -17,14 +17,16 @@ export function iguanaEdexBalance(coin) {
return dispatch => {
if (coin) {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'iguanaEdexBalance',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': _payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'iguanaEdexBalance',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': _payload,
'status': 'pending',
}));
}
return fetch(`http://127.0.0.1:${Config.iguanaCorePort}`, {
method: 'POST',
@ -32,11 +34,13 @@ export function iguanaEdexBalance(coin) {
})
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'Error iguanaEdexBalance',
@ -70,14 +74,16 @@ export function getDexBalance(coin, mode, addr) {
return new Promise((resolve, reject) => {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getDexBalance',
'type': 'post',
'url': `http://127.0.0.1:${Config.useBasiliskInstance ? Config.iguanaCorePort + 1 : Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getDexBalance',
'type': 'post',
'url': `http://127.0.0.1:${Config.useBasiliskInstance ? Config.iguanaCorePort + 1 : Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
}
fetch(`http://127.0.0.1:${Config.useBasiliskInstance ? Config.iguanaCorePort + 1 : Config.iguanaCorePort}`, {
method: 'POST',
@ -85,11 +91,13 @@ export function getDexBalance(coin, mode, addr) {
})
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'getDexBalance',
@ -101,11 +109,13 @@ export function getDexBalance(coin, mode, addr) {
.then(response => response.json())
.then(json => {
console.log(json);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
})
resolve(index);

42
react/src/actions/actions/edexGetTx.js

@ -17,14 +17,16 @@ export function edexGetTransaction(data, dispatch) {
return new Promise((resolve, reject) => {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'edexGetTransaction',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'edexGetTransaction',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
}
fetch(`http://127.0.0.1:${Config.iguanaCorePort}`, {
method: 'POST',
@ -32,11 +34,13 @@ export function edexGetTransaction(data, dispatch) {
})
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'edexGetTransaction',
@ -47,11 +51,13 @@ export function edexGetTransaction(data, dispatch) {
})
.then(response => response.json())
.then(json => {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
resolve(json);
})
});

42
react/src/actions/actions/fullTxHistory.js

@ -22,14 +22,16 @@ export function getFullTransactionsList(coin) {
return dispatch => {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getFullTransactionsList',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getFullTransactionsList',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
}
return fetch(`http://127.0.0.1:${Config.iguanaCorePort}`, {
method: 'POST',
@ -37,11 +39,13 @@ export function getFullTransactionsList(coin) {
})
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'getFullTransactionsList',
@ -52,11 +56,13 @@ export function getFullTransactionsList(coin) {
})
.then(response => response.json())
.then(json => {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
dispatch(getNativeTxHistoryState(json));
})
}

42
react/src/actions/actions/getAddrByAccount.js

@ -37,14 +37,16 @@ export function getAddressesByAccount(coin, mode) {
return dispatch => {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getAddressesByAccount',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getAddressesByAccount',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
}
return fetch(`http://127.0.0.1:${Config.iguanaCorePort}`, {
method: 'POST',
@ -52,11 +54,13 @@ export function getAddressesByAccount(coin, mode) {
})
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(updateErrosStack('activeHandle'));
dispatch(
triggerToaster(
@ -68,11 +72,13 @@ export function getAddressesByAccount(coin, mode) {
})
.then(response => response.json())
.then(json => {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
dispatch(
getAddressesByAccountState(
json,

42
react/src/actions/actions/iguanaHelpers.js

@ -30,14 +30,16 @@ export function iguanaHashHex(data, dispatch) {
resolve(true);
} else {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'iguanaHashHex',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'iguanaHashHex',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
}
fetch(`http://127.0.0.1:${Config.iguanaCorePort}`, {
method: 'POST',
@ -45,11 +47,13 @@ export function iguanaHashHex(data, dispatch) {
})
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'iguanaHashHex',
@ -60,11 +64,13 @@ export function iguanaHashHex(data, dispatch) {
})
.then(response => response.json())
.then(json => {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
resolve(json.hex);
})
}

42
react/src/actions/actions/logout.js

@ -39,14 +39,16 @@ function walletLock() {
return dispatch => {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'walletLock',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'walletLock',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
}
return fetch(`http://127.0.0.1:${Config.iguanaCorePort}`, {
method: 'POST',
@ -54,11 +56,13 @@ function walletLock() {
})
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'walletLock',
@ -69,11 +73,13 @@ function walletLock() {
})
.then(response => response.json())
.then(json => {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
dispatch(logoutState(json));
dispatch(logoutResetAppState());
})

42
react/src/actions/actions/nativeBalance.js

@ -42,14 +42,16 @@ export function getKMDBalanceTotal(coin) {
return dispatch => {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getKMDBalanceTotal',
'type': 'post',
'url': Config.cli.default ? `http://127.0.0.1:${Config.agamaPort}/shepherd/cli` : `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getKMDBalanceTotal',
'type': 'post',
'url': Config.cli.default ? `http://127.0.0.1:${Config.agamaPort}/shepherd/cli` : `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
}
let _fetchConfig = {
method: 'POST',
@ -72,11 +74,13 @@ export function getKMDBalanceTotal(coin) {
)
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'getKMDBalanceTotal',
@ -87,11 +91,13 @@ export function getKMDBalanceTotal(coin) {
})
.then(response => response.json())
.then(function(json) { // TODO: figure out why komodod spits out "parse error"
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
if (json &&
!json.error) {
dispatch(getNativeBalancesState(json));

42
react/src/actions/actions/nativeNewAddress.js

@ -49,14 +49,16 @@ export function getNewKMDAddresses(coin, pubpriv) {
return dispatch => {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getNewKMDAddresses',
'type': 'post',
'url': Config.cli.default ? `http://127.0.0.1:${Config.agamaPort}/shepherd/cli` : `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getNewKMDAddresses',
'type': 'post',
'url': Config.cli.default ? `http://127.0.0.1:${Config.agamaPort}/shepherd/cli` : `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
}
let _fetchConfig = {
method: 'POST',
@ -85,11 +87,13 @@ export function getNewKMDAddresses(coin, pubpriv) {
)
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'getNewKMDAddresses',
@ -103,11 +107,13 @@ export function getNewKMDAddresses(coin, pubpriv) {
if (Config.cli.default) {
json = json.result;
}
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
dispatch(
handleGetNewKMDAddresses(
pubpriv,

95
react/src/actions/actions/nativeSend.js

@ -16,8 +16,9 @@ export function sendNativeTx(coin, _payload) {
let payload;
let _apiMethod;
if (_payload.addressType === 'public' && // transparent
_payload.sendTo.length !== 95) {
// iguana core
if ((_payload.addressType === 'public' && // transparent
_payload.sendTo.length !== 95) || !_payload.sendFrom) {
_apiMethod = 'sendtoaddress';
ajaxDataToHex = `["${_payload.sendTo}", ${Number(_payload.amount) - Number(_payload.fee)}]`;
} else { // private
@ -47,27 +48,29 @@ export function sendNativeTx(coin, _payload) {
}
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'sendNativeTx',
'type': 'post',
'url': Config.cli.default ? `http://127.0.0.1:${Config.agamaPort}/shepherd/cli` : `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'sendNativeTx',
'type': 'post',
'url': Config.cli.default ? `http://127.0.0.1:${Config.agamaPort}/shepherd/cli` : `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
}
let _fetchConfig = {
method: 'POST',
body: JSON.stringify(payload),
};
if (Config.cli.default) {
if (Config.cli.default) { // rpc
payload = {
mode: null,
chain: coin,
cmd: payload.function,
params:
_payload.addressType === 'public' && _payload.sendTo.length !== 95 ?
(_payload.addressType === 'public' && _payload.sendTo.length !== 95) || !_payload.sendFrom ?
[
_payload.sendTo,
_payload.amount
@ -97,11 +100,13 @@ export function sendNativeTx(coin, _payload) {
)
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'sendNativeTx',
@ -115,15 +120,17 @@ export function sendNativeTx(coin, _payload) {
return _response;
})
.then(function(json) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
if (json.indexOf('"code":') > -1) {
const _message = json.substring(
`${json.indexOf('"message":"')}11`,
`${json.indexOf('"message":"')}11`,
json.indexOf('"},"id":"jl777"')
);
@ -208,14 +215,16 @@ export function getKMDOPID(opid, coin) {
}
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getKMDOPID',
'type': 'post',
'url': Config.cli.default ? `http://127.0.0.1:${Config.agamaPort}/shepherd/cli` : `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getKMDOPID',
'type': 'post',
'url': Config.cli.default ? `http://127.0.0.1:${Config.agamaPort}/shepherd/cli` : `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
}
let _fetchConfig = {
method: 'POST',
@ -244,11 +253,13 @@ export function getKMDOPID(opid, coin) {
)
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'getKMDOPID',
@ -262,11 +273,13 @@ export function getKMDOPID(opid, coin) {
if (Config.cli.default) {
json = json.result;
}
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
dispatch(getKMDOPIDState(json));
})
})

84
react/src/actions/actions/nativeSyncInfo.js

@ -16,14 +16,16 @@ export function getSyncInfoNativeKMD(skipDebug) {
return dispatch => {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getSyncInfoNativeKMD',
'type': 'post',
'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',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getSyncInfoNativeKMD',
'type': 'post',
'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(
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}`, {
@ -31,11 +33,13 @@ export function getSyncInfoNativeKMD(skipDebug) {
})
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'getSyncInfoNativeKMD',
@ -46,11 +50,13 @@ export function getSyncInfoNativeKMD(skipDebug) {
})
.then(response => response.json())
.then(json => {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': Config.iguanaLessMode ? json.info : json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': Config.iguanaLessMode ? json.info : json,
}));
}
dispatch(getSyncInfoNativeState({ 'remoteKMDNode': Config.iguanaLessMode ? json.info : json }));
})
.then(function() {
@ -104,14 +110,16 @@ export function getSyncInfoNative(coin, skipDebug) {
return dispatch => {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getSyncInfo',
'type': 'post',
'url': Config.cli.default ? `http://127.0.0.1:${Config.agamaPort}/shepherd/cli` : `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getSyncInfo',
'type': 'post',
'url': Config.cli.default ? `http://127.0.0.1:${Config.agamaPort}/shepherd/cli` : `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
}
let _fetchConfig = {
method: 'POST',
body: JSON.stringify(payload),
@ -133,11 +141,13 @@ export function getSyncInfoNative(coin, skipDebug) {
)
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'getSyncInfo',
@ -172,11 +182,13 @@ export function getSyncInfoNative(coin, skipDebug) {
dispatch(getDebugLog('komodo', 1));
}
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
dispatch(
getSyncInfoNativeState(
json,

42
react/src/actions/actions/nativeTxHistory.js

@ -33,14 +33,16 @@ export function getNativeTxHistory(coin) {
return dispatch => {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getNativeTxHistory',
'type': 'post',
'url': Config.cli.default ? `http://127.0.0.1:${Config.agamaPort}/shepherd/cli` : `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getNativeTxHistory',
'type': 'post',
'url': Config.cli.default ? `http://127.0.0.1:${Config.agamaPort}/shepherd/cli` : `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
}
let _fetchConfig = {
method: 'POST',
@ -69,11 +71,13 @@ export function getNativeTxHistory(coin) {
)
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'getNativeTxHistory',
@ -84,11 +88,13 @@ export function getNativeTxHistory(coin) {
})
.then(response => response.json())
.then(json => {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
dispatch(getNativeTxHistoryState(json));
})
}

84
react/src/actions/actions/notary.js

@ -23,25 +23,29 @@ function initNotaryNodesConSequence(nodes) {
return new Promise((resolve, reject) => {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': `initNotaryNodesConSequence+${node}`,
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': `initNotaryNodesConSequence+${node}`,
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
}
fetch(`http://127.0.0.1:${(Config.useBasiliskInstance ? Config.iguanaCorePort + 1 : Config.iguanaCorePort)}/api/dex/getinfo?userpass=${('tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'))}&symbol=${node}`, {
method: 'GET',
})
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
`getInfoDexNode+${node}`,
@ -52,11 +56,13 @@ function initNotaryNodesConSequence(nodes) {
})
.then(response => response.json())
.then(json => {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
dispatch(
updateNotaryNodeConState(
json,
@ -171,25 +177,29 @@ export function getDexNotaries(coin) {
return dispatch => {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getDexNotaries',
'type': 'post',
'url': `http://127.0.0.1:${Config.useBasiliskInstance ? Config.iguanaCorePort + 1 : Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getDexNotaries',
'type': 'post',
'url': `http://127.0.0.1:${Config.useBasiliskInstance ? Config.iguanaCorePort + 1 : Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
}
return fetch(`http://127.0.0.1:${Config.useBasiliskInstance ? Config.iguanaCorePort + 1 : Config.iguanaCorePort}`, {
method: 'POST',
body: JSON.stringify(payload),
})
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'getDexNotaries',
@ -200,11 +210,13 @@ export function getDexNotaries(coin) {
})
.then(response => response.json())
.then(json => {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
dispatch(getDexNotariesState(json));
})
}

168
react/src/actions/actions/sendFullBasilisk.js

@ -25,14 +25,16 @@ export function sendToAddress(coin, _payload) {
return dispatch => {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'sendToAddress',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'sendToAddress',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
}
return fetch(`http://127.0.0.1:${Config.iguanaCorePort}`, {
method: 'POST',
@ -40,11 +42,13 @@ export function sendToAddress(coin, _payload) {
})
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'sendToAddress',
@ -55,11 +59,13 @@ export function sendToAddress(coin, _payload) {
})
.then(response => response.json())
.then(json => {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
dispatch(sendToAddressState(json, dispatch));
})
}
@ -81,14 +87,16 @@ export function sendFromAddress(coin, _payload) {
return dispatch => {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'sendFromAddress',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'sendFromAddress',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
}
return fetch(`http://127.0.0.1:${Config.iguanaCorePort}`, {
method: 'POST',
@ -96,11 +104,13 @@ export function sendFromAddress(coin, _payload) {
})
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'sendFromAddress',
@ -111,11 +121,13 @@ export function sendFromAddress(coin, _payload) {
})
.then(response => response.json())
.then(json => {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
dispatch(sendToAddressState(json, dispatch));
})
}
@ -140,14 +152,16 @@ export function iguanaUTXORawTX(data, dispatch) {
return new Promise((resolve, reject) => {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'iguanaUTXORawTX',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'iguanaUTXORawTX',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
}
fetch(`http://127.0.0.1:${Config.iguanaCorePort}`, {
method: 'POST',
@ -155,11 +169,13 @@ export function iguanaUTXORawTX(data, dispatch) {
})
.catch(function(error) {
console.log(error);
dispatch => dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch => dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'iguanaUTXORawTX',
@ -170,11 +186,13 @@ export function iguanaUTXORawTX(data, dispatch) {
})
.then(response => response.json())
.then(json => {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
resolve(json);
})
});
@ -191,14 +209,16 @@ export function dexSendRawTX(data, dispatch) {
return new Promise((resolve, reject) => {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'dexSendRawTX',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'dexSendRawTX',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
}
fetch('http://127.0.0.1:' + Config.iguanaCorePort, {
method: 'POST',
@ -206,11 +226,13 @@ export function dexSendRawTX(data, dispatch) {
})
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'dexSendRawTX',
@ -225,11 +247,13 @@ export function dexSendRawTX(data, dispatch) {
return _response;
})
.then(function(json) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
resolve(json);
})
});

126
react/src/actions/actions/settings.js

@ -101,14 +101,16 @@ export function importPrivKey(wifKey) {
return dispatch => {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'importPrivKey',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'importPrivKey',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
}
return fetch(`http://127.0.0.1:${Config.iguanaCorePort}`, {
method: 'POST',
@ -116,11 +118,13 @@ export function importPrivKey(wifKey) {
})
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'importPrivKey',
@ -131,11 +135,13 @@ export function importPrivKey(wifKey) {
})
.then(response => response.json())
.then(json => {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
dispatch(
parseImportPrivKeyResponse(
json,
@ -200,14 +206,16 @@ export function getPeersList(coin) {
return dispatch => {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getPeersList',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getPeersList',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
}
return fetch(`http://127.0.0.1:${Config.iguanaCorePort}`, {
method: 'POST',
@ -215,11 +223,13 @@ export function getPeersList(coin) {
})
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'getPeersList',
@ -230,11 +240,13 @@ export function getPeersList(coin) {
})
.then(response => response.json())
.then(json => {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
dispatch(getPeersListState(json, dispatch));
})
}
@ -316,14 +328,16 @@ export function addPeerNode(coin, ip) {
return dispatch => {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'addPeerNode',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'addPeerNode',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
}
return fetch(`http://127.0.0.1:${Config.iguanaCorePort}`, {
method: 'POST',
@ -331,11 +345,13 @@ export function addPeerNode(coin, ip) {
})
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'addPeerNode',
@ -346,11 +362,13 @@ export function addPeerNode(coin, ip) {
})
.then(response => response.json())
.then(json => {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
dispatch(addPeerNodeState(json, dispatch));
})
}

42
react/src/actions/actions/syncInfo.js

@ -31,14 +31,16 @@ export function getSyncInfo(coin) {
return dispatch => {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getSyncInfo',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getSyncInfo',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
}
return fetch(`http://127.0.0.1:${Config.iguanaCorePort}`, {
method: 'POST',
@ -46,11 +48,13 @@ export function getSyncInfo(coin) {
})
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'getSyncInfo',
@ -65,11 +69,13 @@ export function getSyncInfo(coin) {
return _response;
})
.then(function(json) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
if (json.indexOf('coin is busy processing') === -1) {
dispatch(getSyncInfoState(json, dispatch));
}

168
react/src/actions/actions/walletAuth.js

@ -24,14 +24,16 @@ export function encryptWallet(_passphrase, cb, coin) {
return dispatch => {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'encryptWallet',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'encryptWallet',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
}
return fetch(`http://127.0.0.1:${Config.iguanaCorePort}`, {
method: 'POST',
@ -39,11 +41,13 @@ export function encryptWallet(_passphrase, cb, coin) {
})
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'encryptWallet',
@ -55,11 +59,13 @@ export function encryptWallet(_passphrase, cb, coin) {
.then(dispatch(walletPassphrase(_passphrase)))
.then(response => response.json())
.then(json => {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
dispatch(
cb.call(
this,
@ -82,14 +88,16 @@ export function walletPassphrase(_passphrase) {
return dispatch => {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'walletpassphrase',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'walletpassphrase',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
}
return fetch(`http://127.0.0.1:${Config.iguanaCorePort}`, {
method: 'POST',
@ -97,11 +105,13 @@ export function walletPassphrase(_passphrase) {
})
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'walletPassphrase',
@ -111,11 +121,13 @@ export function walletPassphrase(_passphrase) {
);
})
.then(json => {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
})
}
}
@ -132,14 +144,16 @@ export function iguanaWalletPassphrase(_passphrase) {
return dispatch => {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'iguanaWalletPassphrase',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': _payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'iguanaWalletPassphrase',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': _payload,
'status': 'pending',
}));
}
return fetch(`http://127.0.0.1:${Config.iguanaCorePort}`, {
method: 'POST',
@ -147,11 +161,13 @@ export function iguanaWalletPassphrase(_passphrase) {
})
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(
triggerToaster(
'Error iguanaWalletPassphrase',
@ -162,11 +178,13 @@ export function iguanaWalletPassphrase(_passphrase) {
})
.then(response => response.json())
.then(json => {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
dispatch(iguanaWalletPassphraseState(json, dispatch));
});
}
@ -181,14 +199,16 @@ export function iguanaActiveHandle(getMainAddress) {
return dispatch => {
const _timestamp = Date.now();
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'iguanaActiveHandle',
'type': 'post',
'url': Config.iguanaLessMode ? `http://127.0.0.1:${Config.agamaPort}/shepherd/SuperNET/activehandle` : `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': _payload,
'status': 'pending',
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'iguanaActiveHandle',
'type': 'post',
'url': Config.iguanaLessMode ? `http://127.0.0.1:${Config.agamaPort}/shepherd/SuperNET/activehandle` : `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': _payload,
'status': 'pending',
}));
}
let _fetchConfig = {
method: 'POST',
@ -210,11 +230,13 @@ export function iguanaActiveHandle(getMainAddress) {
)
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': error,
}));
}
dispatch(updateErrosStack('activeHandle'));
dispatch(
triggerToaster(
@ -226,11 +248,13 @@ export function iguanaActiveHandle(getMainAddress) {
})
.then(response => response.json())
.then(json => {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (Config.debug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
dispatch(getMainAddress ? getMainAddressState(json) : iguanaActiveHandleState(json));
});
}

14
react/src/components/dashboard/coinTile/coinTileItem.js

@ -76,7 +76,7 @@ class CoinTileItem extends React.Component {
const useAddress = this.props.ActiveCoin.mainBasiliskAddress ? this.props.ActiveCoin.mainBasiliskAddress : this.props.Dashboard.activeHandle[coin];
Store.dispatch(iguanaActiveHandle(true));
Store.dispatch(
getKMDAddressesNative(
coin,
@ -107,6 +107,11 @@ class CoinTileItem extends React.Component {
dashboardChangeActiveCoin(coin, mode) {
if (coin !== this.props.ActiveCoin.coin) {
Store.dispatch(dashboardChangeActiveCoin(coin, mode));
setTimeout(() => {
this.dispatchCoinActions(coin, mode);
}, 100);
Store.dispatch(
stopInterval(
'sync',
@ -121,10 +126,6 @@ class CoinTileItem extends React.Component {
)
);
Store.dispatch(dashboardChangeActiveCoin(coin, mode));
this.dispatchCoinActions(coin, mode);
if (mode === 'full') {
const _iguanaActiveHandle = setInterval(() => {
this.dispatchCoinActions(coin, mode);
@ -147,6 +148,7 @@ class CoinTileItem extends React.Component {
if (mode === 'basilisk') {
const _activeHandle = this.props.Dashboard.activeHandle;
const _basiliskMainAddress = _activeHandle[coin] || JSON.parse(sessionStorage.getItem('IguanaActiveAccount'))[coin];
Store.dispatch(changeActiveAddress(_basiliskMainAddress));
if (_basiliskMainAddress) {
@ -178,7 +180,7 @@ class CoinTileItem extends React.Component {
_iguanaActiveHandle
)
);
Store.dispatch(
startInterval(
'basilisk',

20
react/src/components/dashboard/main/dashboard.render.js

@ -36,21 +36,21 @@ const DashboardRender = function() {
<WalletsTxInfo {...this.props} />
<WalletsNative {...this.props} />
</div>
<div className={ this.isSectionActive('edex') ? 'show' : 'hide' }>
{ this.isSectionActive('edex') &&
<EDEX {...this.props} />
</div>
<div className={ this.isSectionActive('atomic') ? 'show full-height' : 'hide' }>
}
{ this.isSectionActive('atomic') &&
<Atomic {...this.props} />
</div>
<div className={ this.isSectionActive('jumblr') ? 'show' : 'hide' }>
}
{ this.isSectionActive('jumblr') &&
<Jumblr {...this.props} />
</div>
<div className={ this.isSectionActive('settings') ? 'show' : 'hide' }>
}
{ this.isSectionActive('settings') &&
<Settings {...this.props} />
</div>
<div className={ this.isSectionActive('about') ? 'show' : 'hide' }>
}
{ this.isSectionActive('about') &&
<About {...this.props} />
</div>
}
</div>
</div>
);

20
react/src/components/dashboard/qrModal/qrModal.js

@ -19,22 +19,28 @@ class QRModal extends React.Component {
this.closeModal = this.closeModal.bind(this);
this.handleScan = this.handleScan.bind(this);
this.handleError = this.handleError.bind(this);
document.body.addEventListener('click', this.closeModal);
}
handleScan(data) {
if (data !== null) {
if (this.props.mode === 'scan') {
this.props.setRecieverFromScan(data)
this.props.setRecieverFromScan(data);
}
this.closeModal();
}
}
handleError(err) {
this.setState({
error: err,
});
if (err.name === 'NoVideoInputDevicesError') {
this.setState({
error: 'Error: No video input devices found!',
});
} else {
this.setState({
error: 'Error: unknown error!',
});
}
}
openModal() {
@ -60,10 +66,6 @@ class QRModal extends React.Component {
this.setState({
modalIsOpen: false,
});
if (this.props.mode === 'scan') {
ReactDOM.unmountComponentAtNode(document.getElementById('webcam'));
}
}
render() {

8
react/src/components/dashboard/qrModal/qrModal.render.js

@ -66,7 +66,13 @@ export const QRModalReaderRender = function () {
</div>
<div className="modal-body">
<div className="animsition vertical-align fade-in">
<div className="page-content vertical-align-middle">
<div
className="page-content vertical-align-middle"
style={{
width: '100%',
textAlign: 'center',
fontSize: '16px'
}}>
<div id="webcam">
{ this.state.error }
</div>

14
react/src/components/dashboard/receiveCoin/receiveCoin.js

@ -167,15 +167,17 @@ class ReceiveCoin extends React.Component {
if (this.isBasiliskMode() &&
this.hasNoAmount(address)) {
address.amount = _cache && _cache[_coin][address.address]
&& _cache[_coin][address.address].getbalance.data
&& _cache[_coin][address.address].getbalance.data.balance ? _cache[_coin][address.address].getbalance.data.balance : 'N/A';
address.amount = _cache && _cache[_coin][address.address] &&
_cache[_coin][address.address].getbalance &&
_cache[_coin][address.address].getbalance.data &&
_cache[_coin][address.address].getbalance.data.balance ? _cache[_coin][address.address].getbalance.data.balance : 'N/A';
}
if (this.isBasiliskMode() &&
this.hasNoInterest(address)) {
address.interest = _cache && _cache[_coin][address.address]
&& _cache[_coin][address.address].getbalance.data
&& _cache[_coin][address.address].getbalance.data.interest ? _cache[_coin][address.address].getbalance.data.interest : 'N/A';
address.interest = _cache && _cache[_coin][address.address] &&
_cache[_coin][address.address].getbalance &&
_cache[_coin][address.address].getbalance.data &&
_cache[_coin][address.address].getbalance.data.interest ? _cache[_coin][address.address].getbalance.data.interest : 'N/A';
}
if (this.state.hideZeroAddresses) {

8
react/src/components/dashboard/receiveCoin/receiveCoin.render.js

@ -26,9 +26,7 @@ export const AddressActionsBasiliskModeRender = function(address) {
onClick={ () => this._validateAddressBasilisk(address) }>
<i className="icon fa-info-circle"></i>
</span>
<QRModal
content={address}
/>
<QRModal content={ address } />
</td>
);
};
@ -45,9 +43,7 @@ export const AddressActionsNonBasiliskModeRender = function(address, type) {
onClick={ () => this._copyCoinAddress(address) }>
<i className="icon wb-copy"></i> { translate('INDEX.COPY') }
</button>
<QRModal
content={address}
/>
<QRModal content={ address } />
</td>
);
};

36
react/src/components/dashboard/sendCoin/sendCoin.js

@ -1,9 +1,7 @@
import React from 'react';
import Config from '../../../config';
import { translate } from '../../../translate/translate';
import {
checkTimestamp
} from '../../../util/time';
import { checkTimestamp } from '../../../util/time';
import {
edexGetTxIDList,
edexRemoveTXID
@ -55,7 +53,6 @@ class SendCoin extends React.Component {
currentStackLength: 0,
totalStackLength: 0,
utxoMethodInProgress: false,
isCameraFeatureDetected: false,
};
this.updateInput = this.updateInput.bind(this);
this.handleBasiliskSend = this.handleBasiliskSend.bind(this);
@ -66,27 +63,9 @@ class SendCoin extends React.Component {
this._fetchNewUTXOData = this._fetchNewUTXOData.bind(this);
this.handleClickOutside = this.handleClickOutside.bind(this);
this.setRecieverFromScan = this.setRecieverFromScan.bind(this);
this.detectCamera = this.detectCamera.bind(this);
socket.on('messages', msg => this.updateSocketsData(msg));
}
// test device camera capabilities
detectCamera() {
const _getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
_getUserMedia(
{ 'video': true },
function() {
this.setState({
isCameraFeatureDetected: true,
});
},
function() {
console.warn('this device doesn\'t have camera!');
}
);
}
setRecieverFromScan(receiver) {
this.setState({
sendTo: receiver
@ -101,8 +80,6 @@ class SendCoin extends React.Component {
this.handleClickOutside,
false
);
this.detectCamera();
}
componentWillUnmount() {
@ -323,7 +300,7 @@ class SendCoin extends React.Component {
);
} else {
return (
<span>- { translate('SEND.SELECT_T_OR_Z_ADDR') } -</span>
<span>{ translate('SEND.SELECT_T_OR_Z_ADDR') }</span>
);
}
}
@ -347,7 +324,7 @@ class SendCoin extends React.Component {
<ul className="dropdown-menu inner">
<li className="selected">
<a>
<span className="text"> - { translate('SEND.SELECT_T_OR_Z_ADDR') } - </span>
<span className="text">{ translate('SEND.SELECT_T_OR_Z_ADDR') }</span>
<span className="glyphicon glyphicon-ok check-mark"></span>
</a>
</li>
@ -395,7 +372,7 @@ class SendCoin extends React.Component {
amount: 0,
fee: 0.0001,
sendSig: false,
sendApiType: false,
sendApiType: true,
addressSelectorOpen: false,
currentStackLength: 0,
totalStackLength: 0,
@ -697,6 +674,8 @@ class SendCoin extends React.Component {
);
}
} else if (key === 'sendrawtransaction') {
const _lastSendToResponse = this.props.ActiveCoin.lastSendToResponse;
if (_lastSendToResponse[key] === 'success') {
return (
<span className="label label-success">true</span>
@ -707,6 +686,8 @@ class SendCoin extends React.Component {
);
}
} else if (key === 'txid' || key === 'sent') {
const _lastSendToResponse = this.props.ActiveCoin.lastSendToResponse;
return (
<span>{ _lastSendToResponse[key] }</span>
);
@ -775,6 +756,7 @@ class SendCoin extends React.Component {
return null;
}
render() {
if (this.props.ActiveCoin &&
this.props.ActiveCoin.send &&

124
react/src/components/dashboard/sendCoin/sendCoin.render.js

@ -8,6 +8,8 @@ import {
import QRModal from '../qrModal/qrModal';
export const UTXOCacheInfoRender = function(refreshCacheData, isReadyToUpdate, waitUntilCallIsFinished, timestamp) {
const _progress = 100 - this.state.currentStackLength * 100 / this.state.totalStackLength;
return (
<div className="col-lg-12">
<hr />
@ -25,7 +27,7 @@ export const UTXOCacheInfoRender = function(refreshCacheData, isReadyToUpdate, w
<div className={ 'full-width margin-bottom-10 margin-top-10 ' + (this.state.currentStackLength === 1 || (this.state.currentStackLength === 0 && this.state.totalStackLength === 0) ? 'hide' : 'progress progress-sm') }>
<div
className="progress-bar progress-bar-striped active progress-bar-indicating progress-bar-success font-size-80-percent"
style={{ width: 100 - `${(this.state.currentStackLength * 100 / this.state.totalStackLength)}%` }}>
style={{ width: `${_progress}%` }}>
{ translate('SEND.PROCESSING_REQ') }: { this.state.currentStackLength } / { this.state.totalStackLength }
</div>
</div>
@ -40,7 +42,7 @@ export const UTXOCacheInfoRender = function(refreshCacheData, isReadyToUpdate, w
);
};
export const SendCoinResponseRender = function () {
export const SendCoinResponseRender = function() {
if (this.props.ActiveCoin.lastSendToResponse) {
let items = [];
const _response = this.props.ActiveCoin.lastSendToResponse;
@ -59,55 +61,59 @@ export const SendCoinResponseRender = function () {
return items;
} else {
return (
<div className="padding-20 text-align-center">
<div className="vertical-padding-10 horizontal-padding-0">
{ translate('SEND.PROCESSING_TRANSACTION') }...<br />
{ translate('SEND.NOTE_IT_WILL_TAKE') }.
</div>
<div className="loader-wrapper active">
<div className="loader-layer loader-blue">
<div className="loader-circle-left">
<div className="circle"></div>
</div>
<div className="loader-circle-gap"></div>
<div className="loader-circle-right">
<div className="circle"></div>
</div>
</div>
<div className="loader-layer loader-red">
<div className="loader-circle-left">
<div className="circle"></div>
</div>
<div className="loader-circle-gap"></div>
<div className="loader-circle-right">
<div className="circle"></div>
</div>
</div>
<div className="loader-layer loader-green">
<div className="loader-circle-left">
<div className="circle"></div>
</div>
<div className="loader-circle-gap"></div>
<div className="loader-circle-right">
<div className="circle"></div>
</div>
</div>
<div className="loader-layer loader-yellow">
<div className="loader-circle-left">
<div className="circle"></div>
<tr className="hover--none">
<td colSpan="2">
<div className="padding-20 text-align-center">
<div className="vertical-padding-10 horizontal-padding-0">
{ translate('SEND.PROCESSING_TRANSACTION') }...<br />
{ translate('SEND.NOTE_IT_WILL_TAKE') }.
</div>
<div className="loader-circle-gap"></div>
<div className="loader-circle-right">
<div className="circle"></div>
<div className="loader-wrapper active">
<div className="loader-layer loader-blue">
<div className="loader-circle-left">
<div className="circle"></div>
</div>
<div className="loader-circle-gap"></div>
<div className="loader-circle-right">
<div className="circle"></div>
</div>
</div>
<div className="loader-layer loader-red">
<div className="loader-circle-left">
<div className="circle"></div>
</div>
<div className="loader-circle-gap"></div>
<div className="loader-circle-right">
<div className="circle"></div>
</div>
</div>
<div className="loader-layer loader-green">
<div className="loader-circle-left">
<div className="circle"></div>
</div>
<div className="loader-circle-gap"></div>
<div className="loader-circle-right">
<div className="circle"></div>
</div>
</div>
<div className="loader-layer loader-yellow">
<div className="loader-circle-left">
<div className="circle"></div>
</div>
<div className="loader-circle-gap"></div>
<div className="loader-circle-right">
<div className="circle"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</td>
</tr>
);
}
}
export const OASendUIRender = function () {
export const OASendUIRender = function() {
return (
<div className="row">
<div className="col-lg-6 form-group form-material">
@ -136,7 +142,7 @@ export const OASendUIRender = function () {
);
};
export const SendApiTypeSelectorRender = function () {
export const SendApiTypeSelectorRender = function() {
return (
<div className="row">
<div className="col-lg-8 margin-bottom-10">
@ -144,7 +150,8 @@ export const SendApiTypeSelectorRender = function () {
<label className="switch">
<input
type="checkbox"
checked={ this.state.sendApiType } />
checked={ this.state.sendApiType }
readOnly />
<div
className="slider"
onClick={ this.toggleSendAPIType }></div>
@ -156,18 +163,16 @@ export const SendApiTypeSelectorRender = function () {
</div>
</span>
</div>
{ this.stateisCameraFeatureDetected &&
<div className="col-lg-4 text-right">
<QRModal
mode="scan"
setRecieverFromScan={this.setRecieverFromScan} />
</div>
}
<div className="col-lg-4 text-right">
<QRModal
mode="scan"
setRecieverFromScan={ this.setRecieverFromScan } />
</div>
</div>
);
};
export const SendCoinRender = function () {
export const SendCoinRender = function() {
return (
<div className="col-sm-12 padding-top-10">
<div className="col-xlg-12 col-md-12 col-sm-12 col-xs-12">
@ -247,9 +252,8 @@ export const SendCoinRender = function () {
className="form-control"
id="edexcoinAmount"
name="amount"
placeholder="0.000"
placeholder="0.001"
autoComplete="off"
defaultValue={ this.state.amount }
value={ this.state.amount }
onChange={ this.updateInput } />
</div>
@ -264,16 +268,15 @@ export const SendCoinRender = function () {
className="form-control"
id="edexcoinFee"
name="fee"
defaultValue={ this.state.fee }
value={ this.state.fee }
placeholder="0.000"
placeholder="0.001"
autoComplete="off"
onChange={ this.updateInput } />
</div>
<div className="col-lg-12">
<strong>
{ translate('INDEX.TOTAL') }&nbsp;
({ translate('INDEX.AMOUNT_SM') } - txfee):
({ translate('INDEX.AMOUNT_SM') } - fee):
</strong>&nbsp;
{ Number(this.state.amount) - Number(this.state.fee) } { this.props.ActiveCoin.coin }
</div>
@ -282,7 +285,8 @@ export const SendCoinRender = function () {
<label className="switch">
<input
type="checkbox"
checked={ this.state.sendSig } />
checked={ this.state.sendSig }
readOnly />
<div
className="slider"
onClick={ this.toggleSendSig }></div>

51
react/src/components/dashboard/settings/settings.js

@ -79,9 +79,21 @@ class Settings extends React.Component {
this.toggleSeedInputVisibility = this.toggleSeedInputVisibility.bind(this);
this._checkForUpdateUIPromise = this._checkForUpdateUIPromise.bind(this);
this._updateUIPromise = this._updateUIPromise.bind(this);
}
componentWillMount() {
socket.on('patch', msg => this.updateSocketsData(msg));
}
componentWillUnmount() {
socket.removeAllListeners('patch', msg => this.updateSocketsData(msg));
if (!this.state.disableWalletSpecificUI) {
document.documentElement.style.height = '100%';
document.body.style.height = '100%';
}
}
componentDidMount() {
if (!this.props.disableWalletSpecificUI) {
Store.dispatch(iguanaActiveHandle());
@ -207,23 +219,27 @@ class Settings extends React.Component {
for (let i = 0; i < this.state.updateLog.length; i++) {
items.push(
<div>{ this.state.updateLog[i] }</div>
<div key={ `settings-update-log-${i}` }>{ this.state.updateLog[i] }</div>
);
}
return (
<div style={{ minHeight: '200px' }}>
<hr />
<h5>Progress:</h5>
<div className="padding-bottom-15">{ items }</div>
<div className={ updateProgressBar.patch > -1 ? 'progress progress-sm' : 'hide' }>
<div
className="progress-bar progress-bar-striped active progress-bar-indicating progress-bar-success font-size-80-percent"
style={{ width: updateProgressBar.patch + '%' }}>
if (this.state.updateLog.length) {
return (
<div style={{ minHeight: '200px' }}>
<hr />
<h5>Progress:</h5>
<div className="padding-bottom-15">{ items }</div>
<div className={ updateProgressBar.patch > -1 ? 'progress progress-sm' : 'hide' }>
<div
className="progress-bar progress-bar-striped active progress-bar-indicating progress-bar-success font-size-80-percent"
style={{ width: updateProgressBar.patch + '%' }}>
</div>
</div>
</div>
</div>
);
);
} else {
return null;
}
}
toggleSeedInputVisibility() {
@ -251,6 +267,17 @@ class Settings extends React.Component {
activeTabHeight: _height,
tabElId: elemId,
}));
// body size hack
if (!this.state.disableWalletSpecificUI) {
document.documentElement.style.height = '100%';
document.body.style.height = '100%';
setTimeout(() => {
document.documentElement.style.height = _height <= 200 ? '100%' : 'inherit';
document.body.style.height = _height <= 200 ? '100%' : 'inherit';
}, 100);
}
}, 100);
}

12
react/src/components/dashboard/settings/settings.render.js

@ -24,7 +24,7 @@ export const AppUpdateTabRender = function() {
<div className="padding-top-15">
<button
type="button"
className="btn btn-primary waves-effect waves-light"
className="btn btn-info waves-effect waves-light"
onClick={ this._checkForUpdateUIPromise }>{ translate('INDEX.CHECK_FOR_UPDATE') }</button>
<button
type="button"
@ -38,7 +38,7 @@ export const AppUpdateTabRender = function() {
<div className="padding-top-15">
<button
type="button"
className="btn btn-primary waves-effect waves-light"
className="btn btn-info waves-effect waves-light"
onClick={ this._checkForUpdateUIPromise }>{ translate('INDEX.CHECK_FOR_UPDATE') }</button>
<button
type="button"
@ -77,7 +77,7 @@ export const AppInfoTabRender = function() {
{ translate('SETTINGS.NAME') }: { this.props.Settings.appInfo.releaseInfo.name }
</div>
<div>
{ translate('SETTINGS.VERSION') }: { this.props.Settings.appInfo.releaseInfo.version }
{ translate('SETTINGS.VERSION') }: { `${this.props.Settings.appInfo.releaseInfo.version.replace('version=', '')}-beta` }
</div>
<div>
{ translate('SETTINGS.APP_SESSION') }: { this.props.Settings.appInfo.appSession }
@ -144,9 +144,9 @@ export const AppInfoTabRender = function() {
export const SettingsRender = function() {
return (
<div className="margin-left-0">
<div className="margin-left-0 full-height">
<div
className="page-content"
className="page-content full-height"
id="section-iguana-wallet-settings">
<div className="row">
<div className="col-xlg-12 col-md-12">
@ -593,7 +593,7 @@ export const SettingsRender = function() {
<textarea
type="text"
className="form-control"
name="cliCmd"
name="cliCmdString"
id="cliCmd"
value={ this.state.cliCmdString }
onChange={ this.updateInput }></textarea>

31
react/src/components/dashboard/walletsBalance/walletsBalance.js

@ -70,14 +70,13 @@ class WalletsBalance extends React.Component {
if (_mode === 'full') {
_balance = this.props.ActiveCoin.balance || 0;
} else {
} else 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 (type === 'main' &&
_mode === 'basilisk' &&
if (type === 'transparent' &&
_address &&
_cache[_coin] &&
_cache[_coin][_address] &&
@ -88,7 +87,6 @@ class WalletsBalance extends React.Component {
}
if (type === 'interest' &&
_mode === 'basilisk' &&
_address &&
_cache[_coin] &&
_cache[_coin][_address] &&
@ -99,7 +97,6 @@ class WalletsBalance extends React.Component {
}
if (type === 'total' &&
_mode === 'basilisk' &&
_address &&
_cache[_coin] &&
_cache[_coin][_address] &&
@ -113,6 +110,30 @@ class WalletsBalance extends React.Component {
_balance = _regBalance + _regInterest;
}
}
} else if (_mode === 'native') {
if (type === 'total' &&
this.props.ActiveCoin.balance &&
this.props.ActiveCoin.balance.total) {
_balance = this.props.ActiveCoin.balance.total;
}
if (type === 'interest' &&
this.props.Dashboard.progress &&
this.props.Dashboard.progress.interest) {
_balance = this.props.Dashboard.progress.interest;
}
if (type === 'private' &&
this.props.ActiveCoin.balance &&
this.props.ActiveCoin.balance.private) {
_balance = this.props.ActiveCoin.balance.private;
}
if (type === 'transparent' &&
this.props.ActiveCoin.balance &&
this.props.ActiveCoin.balance.transparent) {
_balance = this.props.ActiveCoin.balance.transparent;
}
}
return _balance;

41
react/src/components/dashboard/walletsBalance/walletsBalance.render.js

@ -5,8 +5,8 @@ import Config from '../../../config';
const WalletsBalanceRender = function() {
return (
<div id="wallet-widgets">
<div className="col-xs-12">
<div id="wallet-widgets" className="wallet-widgets">
<div className="col-xs-12 flex">
<div className={ this.isFullMode() && !this.isFullySynced() ? 'col-xs-12' : 'col-xs-12 hide' }>
<div className="alert alert-info alert-dismissible">
<h4>{ translate('INDEX.ACTIVATING_WALLET_RT') }</h4>
@ -23,7 +23,7 @@ const WalletsBalanceRender = function() {
</div>
</div>
<div className={ this.isNativeMode() ? 'col-lg-3 col-xs-12' : this.isBasiliskMode() ? 'col-lg-4 col-xs-12' : 'col-lg-12 col-xs-12'}>
<div className={ this.isNativeMode() ? 'col-lg-3 col-xs-12' : this.isBasiliskMode() ? 'col-lg-4 col-xs-12' : 'col-lg-12 col-xs-12' }>
<div className="widget widget-shadow">
<div className="widget-content">
<i
@ -37,14 +37,8 @@ const WalletsBalanceRender = function() {
</div>
<span
className="pull-right padding-top-10 font-size-22"
title={ Config.roundValues ? this.renderBalance('main') : null }>
{ this.isNativeMode() ?
this.props.ActiveCoin.balance.transparent ? this.props.ActiveCoin.balance.transparent : '-'
:
<span>
{ Config.roundValues ? formatValue('round', this.renderBalance('main'), -6) : this.renderBalance('main') } { this.props.ActiveCoin.coin }
</span>
}
title={ this.renderBalance('transparent') }>
{ Config.roundValues ? formatValue('round', this.renderBalance('transparent'), -6) : this.renderBalance('transparent') }
</span>
</div>
</div>
@ -63,8 +57,8 @@ const WalletsBalanceRender = function() {
</div>
<span
className="pull-right padding-top-10 font-size-22"
title={ Config.roundValues ? this.props.ActiveCoin.balance.private : null }>
{ this.props.ActiveCoin.balance.private ? (Config.roundValues ? formatValue('round', this.props.ActiveCoin.balance.private, -6) : this.props.ActiveCoin.balance.private) : '-' }
title={ this.renderBalance('private') }>
{ Config.roundValues ? formatValue('round', this.renderBalance('private'), -6) : this.renderBalance('private') }
</span>
</div>
</div>
@ -84,15 +78,8 @@ const WalletsBalanceRender = function() {
</div>
<span
className="pull-right padding-top-10 font-size-22"
title={ Config.roundValues ? this.renderBalance('interest') : null }>
{ this.isNativeMode() ?
this.props.Dashboard.progress
&& this.props.Dashboard.progress.interest ? this.props.Dashboard.progress.interest : '-'
:
<span>
{ Config.roundValues ? formatValue('round', this.renderBalance('interest'), -6) : this.renderBalance('interest') } { this.props.ActiveCoin.coin }
</span>
}
title={ this.renderBalance('interest') }>
{ Config.roundValues ? formatValue('round', this.renderBalance('interest'), -6) : this.renderBalance('interest') }
</span>
</div>
</div>
@ -112,14 +99,8 @@ const WalletsBalanceRender = function() {
</div>
<span
className="pull-right padding-top-10 font-size-22"
title={ Config.roundValues ? this.renderBalance('total') : null }>
{ this.isNativeMode() ?
this.props.ActiveCoin.balance.total ? this.props.ActiveCoin.balance.total : '-'
:
<span>
{ Config.roundValues ? formatValue('round', this.renderBalance('total'), -6) : this.renderBalance('total') } { this.props.ActiveCoin.coin }
</span>
}
title={ this.renderBalance('total') }>
{ Config.roundValues ? formatValue('round', this.renderBalance('total'), -6) : this.renderBalance('total') }
</span>
</div>
</div>

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

@ -56,6 +56,8 @@ class WalletsData extends React.Component {
pageSize: 20,
showPagination: false,
searchTerm: null
coin: null,
txhistory: null,
};
this.toggleBasiliskActionsMenu = this.toggleBasiliskActionsMenu.bind(this);
@ -71,7 +73,6 @@ class WalletsData extends React.Component {
this.basiliskRefreshActionOne = this.basiliskRefreshActionOne.bind(this);
this.handleClickOutside = this.handleClickOutside.bind(this);
this.refreshTxHistory = this.refreshTxHistory.bind(this);
socket.on('messages', msg => this.updateSocketsData(msg));
}
componentWillMount() {
@ -80,6 +81,14 @@ class WalletsData extends React.Component {
this.handleClickOutside,
false
);
setTimeout(() => {
if (this.props.ActiveCoin.mode === 'basilisk' || (Object.keys(this.props.Main.coins.basilisk).length && (Object.keys(this.props.Main.coins.native).length || Object.keys(this.props.Main.coins.full).length)) || Object.keys(this.props.Main.coins.basilisk).length) {
socket.on('messages', msg => this.updateSocketsData(msg));
} else {
socket.removeAllListeners('messages');
}
}, 100);
}
componentWillUnmount() {
@ -88,7 +97,8 @@ class WalletsData extends React.Component {
this.handleClickOutside,
false
);
socket.off('messages');
socket.removeAllListeners('messages');
}
generateItemsListColumns() {
@ -103,32 +113,32 @@ class WalletsData extends React.Component {
}
columns.push(...[
{
id: 'direction',
Header: translate('INDEX.DIRECTION'),
Footer: translate('INDEX.DIRECTION'),
accessor: (tx) => TxTypeRender.call(this, tx.category || tx.type)
},
{
Header: translate('INDEX.CONFIRMATIONS'),
Footer: translate('INDEX.CONFIRMATIONS'),
headerClassName: 'hidden-xs hidden-sm',
footerClassName: 'hidden-xs hidden-sm',
className: 'hidden-xs hidden-sm',
accessor: 'confirmations'
},
{
id: 'amount',
Header: translate('INDEX.AMOUNT'),
Footer: translate('INDEX.AMOUNT'),
accessor: (tx) => TxAmountRender.call(this, tx)
},
{
id: 'timestamp',
Header: translate('INDEX.TIME'),
Footer: translate('INDEX.TIME'),
accessor: (tx) => secondsToString(tx.blocktime || tx.timestamp || tx.time)
}
{
id: 'direction',
Header: translate('INDEX.DIRECTION'),
Footer: translate('INDEX.DIRECTION'),
accessor: (tx) => TxTypeRender.call(this, tx.category || tx.type)
},
{
Header: translate('INDEX.CONFIRMATIONS'),
Footer: translate('INDEX.CONFIRMATIONS'),
headerClassName: 'hidden-xs hidden-sm',
footerClassName: 'hidden-xs hidden-sm',
className: 'hidden-xs hidden-sm',
accessor: 'confirmations'
},
{
id: 'amount',
Header: translate('INDEX.AMOUNT'),
Footer: translate('INDEX.AMOUNT'),
accessor: (tx) => TxAmountRender.call(this, tx)
},
{
id: 'timestamp',
Header: translate('INDEX.TIME'),
Footer: translate('INDEX.TIME'),
accessor: (tx) => secondsToString(tx.blocktime || tx.timestamp || tx.time)
}
]);
if (this.isFullMode()) {
@ -195,28 +205,36 @@ class WalletsData extends React.Component {
}
updateSocketsData(data) {
if (data &&
data.message &&
data.message.shepherd.iguanaAPI &&
data.message.shepherd.iguanaAPI.totalStackLength) {
this.setState(Object.assign({}, this.state, {
totalStackLength: data.message.shepherd.iguanaAPI.totalStackLength,
}));
}
if (data &&
data.message &&
data.message.shepherd.iguanaAPI &&
data.message.shepherd.iguanaAPI.currentStackLength) {
this.setState(Object.assign({}, this.state, {
currentStackLength: data.message.shepherd.iguanaAPI.currentStackLength,
}));
}
if (data &&
data.message &&
data.message.shepherd.method &&
data.message.shepherd.method === 'cache-one' &&
data.message.shepherd.status === 'done') {
Store.dispatch(basiliskRefresh(false));
let stateObj = {};
if (this.props.ActiveCoin.mode === 'basilisk') {
if (data &&
data.message &&
data.message.shepherd.iguanaAPI &&
data.message.shepherd.iguanaAPI.totalStackLength) {
stateObj = Object.assign(stateObj, {
totalStackLength: data.message.shepherd.iguanaAPI.totalStackLength,
});
}
if (data &&
data.message &&
data.message.shepherd.iguanaAPI &&
data.message.shepherd.iguanaAPI.currentStackLength) {
stateObj = Object.assign(stateObj, {
currentStackLength: data.message.shepherd.iguanaAPI.currentStackLength,
});
}
if (data &&
data.message &&
data.message.shepherd.method &&
data.message.shepherd.method === 'cache-one' &&
data.message.shepherd.status === 'done') {
Store.dispatch(basiliskRefresh(false));
}
if (Object.keys(stateObj).length) {
this.setState(Object.assign({}, this.state, stateObj));
}
}
}
@ -305,9 +323,19 @@ class WalletsData extends React.Component {
Store.dispatch(toggleDashboardTxInfoModal(display, txIndex));
}
indexTxHistory(txhistoryArr) {
if (txhistoryArr.length > 1) {
for (let i = 0; i < txhistoryArr.length; i++) {
this.props.ActiveCoin.txhistory[i]['index'] = i + 1;
}
}
return this.props.ActiveCoin.txhistory;
}
componentWillReceiveProps(props) {
if (!this.state.currentAddress &&
this.props.ActiveCoin.activeAddress) {
this.props.ActiveCoin.activeAddress) {
this.setState(Object.assign({}, this.state, {
currentAddress: this.props.ActiveCoin.activeAddress,
}));
@ -322,18 +350,18 @@ class WalletsData extends React.Component {
(props.ActiveCoin.txhistory !== this.props.ActiveCoin.txhistory)) {
const sortedItemsList = sortByDate(this.props.ActiveCoin.txhistory);
this.setState(Object.assign({}, this.state, {
itemsList: sortedItemsList,
filteredItemsList: this.filterTransactions(sortedItemsList, this.state.searchTerm),
showPagination: this.props.ActiveCoin.txhistory && this.props.ActiveCoin.txhistory.length >= this.state.pageSize
}));
itemsList: sortedItemsList,
filteredItemsList: this.filterTransactions(sortedItemsList, this.state.searchTerm),
showPagination: this.props.ActiveCoin.txhistory && this.props.ActiveCoin.txhistory.length >= this.state.pageSize
}));
}
}
if (this.props.ActiveCoin.txhistory &&
this.props.ActiveCoin.txhistory === 'no data') {
this.setState(Object.assign({}, this.state, {
itemsList: 'no data',
}));
this.setState(Object.assign({}, this.state, {
itemsList: 'no data',
}));
} else if (this.props.ActiveCoin.txhistory && this.props.ActiveCoin.txhistory === 'loading') {
this.setState(Object.assign({}, this.state, {
itemsList: 'loading',
@ -362,15 +390,15 @@ class WalletsData extends React.Component {
if (this.state.itemsList === 'loading') {
if (!this.isNativeMode() || this.isFullySynced()) {
return (
<tr>
<td colSpan="6">{ translate('INDEX.LOADING_HISTORY') }...</td>
<tr className="hover--none">
<td colSpan="7">{ translate('INDEX.LOADING_HISTORY') }...</td>
</tr>
);
}
} else if (this.state.itemsList === 'no data' || this.state.itemsList.length == 0) {
return (
<tr>
<td colSpan="6">{ translate('INDEX.NO_DATA') }</td>
<tr className="hover--none">
<td colSpan="7">{ translate('INDEX.NO_DATA') }</td>
</tr>
);
} else if (this.state.itemsList) {
@ -437,10 +465,12 @@ class WalletsData extends React.Component {
let _amount = address.amount;
if (this.props.ActiveCoin.mode === 'basilisk') {
_amount = _cache && _cache[_coin] && _cache[_coin][address] && _cache[_coin][address].getbalance.data && _cache[_coin][address].getbalance.data.balance ? _cache[_coin][address].getbalance.data.balance : 'N/A';
_amount = _cache && _cache[_coin] && _cache[_coin][address] && _cache[_coin][address].getbalance && _cache[_coin][address].getbalance.data && _cache[_coin][address].getbalance.data.balance ? _cache[_coin][address].getbalance.data.balance : 'N/A';
}
_amount = formatValue('round', _amount, -6);
if (_amount !== 'N/A') {
_amount = formatValue('round', _amount, -6);
}
items.push(
AddressItemRender.call(this, address, type, _amount, _coin)
@ -472,12 +502,20 @@ class WalletsData extends React.Component {
if (_addresses.public[i].address === this.state.currentAddress) {
if (_addresses.public[i].amount &&
_addresses.public[i].amount !== 'N/A') {
return _addresses.public[i].amount;
let _amount = _addresses.public[i].amount;
if (_amount !== 'N/A') {
_amount = formatValue('round', _amount, -6);
}
return _amount;
} else {
const address = _addresses.public[i].address;
let _amount = _cache && _cache[_coin] && _cache[_coin][address] && _cache[_coin][address].getbalance.data && _cache[_coin][address].getbalance.data.balance ? _cache[_coin][address].getbalance.data.balance : 'N/A';
_amount = formatValue('round', _amount, -6);
if (_amount !== 'N/A') {
_amount = formatValue('round', _amount, -6);
}
return _amount;
}
@ -567,8 +605,14 @@ class WalletsData extends React.Component {
if (this.props &&
this.props.ActiveCoin &&
this.props.ActiveCoin.coin &&
!this.props.ActiveCoin.send &&
!this.props.ActiveCoin.receive) {
(
this.props.ActiveCoin.mode !== 'native' &&
!this.props.ActiveCoin.send &&
!this.props.ActiveCoin.receive
) || (
this.props.ActiveCoin.mode === 'native' &&
this.props.ActiveCoin.nativeActiveSection === 'default'
)) {
return WalletsDataRender.call(this);
} else {
return null;

12
react/src/components/dashboard/walletsData/walletsData.render.js

@ -66,7 +66,7 @@ export const AddressListRender = function() {
if (isMultiPublicAddress ||
isMultiPrivateAddress) {
return (
<div className={ `btn-group bootstrap-select form-control form-material showkmdwalletaddrs show-tick ${(this.state.addressSelectorOpen ? 'open' : '')}` }>
<div className={ `btn-group bootstrap-select form-control form-material showkmdwalletaddrs show-tick ${(this.state.addressSelectorOpen ? 'open margin-bottom-10' : 'margin-bottom-10')}` }>
<button
type="button"
className="btn dropdown-toggle btn-info"
@ -80,7 +80,7 @@ export const AddressListRender = function() {
<div className="dropdown-menu open">
<ul className="dropdown-menu inner">
<li className="selected">
<a><span className="text"> - { translate('KMD_NATIVE.SELECT_ADDRESS') } - </span><span className="glyphicon glyphicon-ok check-mark"></span></a>
<a><span className="text"> - { translate('KMD_NATIVE.SELECT_ADDRESS') } - </span></a>
</li>
{ this.renderAddressByType('public') }
</ul>
@ -196,19 +196,19 @@ export const WalletsDataRender = function() {
<span className="caret"></span>
</a>
<ul className="dropdown-menu dropdown-menu-right">
<li>
<li className="hide">
<a onClick={ this.getDexNotariesAction }>
<i className="icon fa-sitemap"></i> { translate('INDEX.GET_NOTARY_NODES_LIST') }
</a>
</li>
<li>
<li className="hide">
<a onClick={ this.basiliskConnectionAction }>
<i className="icon wb-refresh"></i> { translate('INDEX.REFRESH_BASILISK_CONNECTIONS') }
</a>
</li>
<li className={ !this.state.useCache ? 'hide' : '' }>
<a onClick={ this.basiliskRefreshActionOne }>
<i className="icon fa-cloud-download"></i> { translate('INDEX.FETCH_WALLET_DATA') }
<i className="icon fa-cloud-download"></i> { translate('INDEX.FETCH_WALLET_DATA') }&nbsp;
({ translate('INDEX.ACTIVE_ADDRESS') })
</a>
</li>
@ -228,7 +228,7 @@ export const WalletsDataRender = function() {
<i className="icon fa-refresh"></i> Restart Basilisk Instance (unsafe!)
</a>
</li>
<li className={ !this.state.useCache ? 'hide' : '' }>
<li className="hide">
<a onClick={ this._toggleViewCacheModal }>
<i className="icon fa-list-alt"></i> { translate('INDEX.VIEW_CACHE_DATA') }
</a>

111
react/src/components/dashboard/walletsNativeSend/walletsNativeSend.js

@ -25,14 +25,18 @@ class WalletsNativeSend extends React.Component {
sendTo: '',
sendToOA: null,
amount: 0,
fee: 0.0001,
fee: 0,
addressSelectorOpen: false,
renderAddressDropdown: true,
};
this.updateInput = this.updateInput.bind(this);
this.handleSubmit = this.handleSubmit.bind(this);
this.openDropMenu = this.openDropMenu.bind(this);
this.getOAdress = this.getOAdress.bind(this);
this.handleClickOutside = this.handleClickOutside.bind(this);
this.checkZAddressCount = this.checkZAddressCount.bind(this);
this.setRecieverFromScan = this.setRecieverFromScan.bind(this);
this.renderOPIDListCheck = this.renderOPIDListCheck.bind(this);
}
componentWillMount() {
@ -51,6 +55,18 @@ class WalletsNativeSend extends React.Component {
);
}
componentWillReceiveProps() {
this.checkZAddressCount();
}
setRecieverFromScan(receiver) {
this.setState({
sendTo: receiver
});
document.getElementById('kmdWalletSendTo').focus();
}
handleClickOutside(e) {
if (e.srcElement.className !== 'btn dropdown-toggle btn-info' &&
(e.srcElement.offsetParent && e.srcElement.offsetParent.className !== 'btn dropdown-toggle btn-info') &&
@ -61,27 +77,61 @@ class WalletsNativeSend extends React.Component {
}
}
checkZAddressCount() {
if (this.props.ActiveCoin.addresses &&
(!this.props.ActiveCoin.addresses.private ||
this.props.ActiveCoin.addresses.private.length === 0)) {
this.setState({
renderAddressDropdown: false,
});
} else {
this.setState({
renderAddressDropdown: true,
});
}
}
renderAddressByType(type) {
let _items = [];
if (this.props.ActiveCoin.addresses &&
this.props.ActiveCoin.addresses[type] &&
this.props.ActiveCoin.addresses[type].length) {
return this.props.ActiveCoin.addresses[type].map((address) =>
<li key={ address.address } className={ address.amount <= 0 ? 'hide' : '' }>
<a onClick={ () => this.updateAddressSelection(address.address, type, address.amount) }>
<i className={ 'icon fa-eye' + (type === 'public' ? '' : '-slash') }></i>&nbsp;&nbsp;
<span className="text">
[ { address.amount } { this.props.ActiveCoin.coin } ]&nbsp;&nbsp;
{ type === 'public' ? address.address : address.address.substring(0, 34) + '...' }
</span>
<span className="glyphicon glyphicon-ok check-mark"></span>
</a>
</li>
);
this.props.ActiveCoin.addresses[type].map((address) => {
if (address.amount > 0) {
_items.push(
<li
className="selected"
key={ address.address }>
<a onClick={ () => this.updateAddressSelection(address.address, type, address.amount) }>
<i className={ 'icon fa-eye' + (type === 'public' ? '' : '-slash') }></i>&nbsp;&nbsp;
<span className="text">
[ { address.amount } { this.props.ActiveCoin.coin } ]&nbsp;&nbsp;
{ type === 'public' ? address.address : address.address.substring(0, 34) + '...' }
</span>
<span
className="glyphicon glyphicon-ok check-mark pull-right"
style={{ display: this.state.sendFrom === address.address ? 'inline-block' : 'none' }}></span>
</a>
</li>
);
}
});
return _items;
} else {
return null;
}
}
renderOPIDListCheck() {
if (this.state.renderAddressDropdown &&
this.props.ActiveCoin.opids &&
this.props.ActiveCoin.opids.length) {
return true;
}
}
renderSelectorCurrentLabel() {
if (this.state.sendFrom) {
return (
@ -89,13 +139,13 @@ class WalletsNativeSend extends React.Component {
<i className={ 'icon fa-eye' + this.state.addressType === 'public' ? '' : '-slash' }></i>
<span className="text">
[ { this.state.sendFromAmount } { this.props.ActiveCoin.coin } ]
{ this.state.sendFrom }
{ this.state.addressType === 'public' ? this.state.sendFrom : this.state.sendFrom.substring(0, 34) + '...' }
</span>
</span>
);
} else {
return (
<span>- { translate('SEND.SELECT_T_OR_Z_ADDR') } -</span>
<span>Transparent funds</span>
);
}
}
@ -218,14 +268,29 @@ class WalletsNativeSend extends React.Component {
this.state
)
);
setTimeout(() => {
Store.dispatch(
getKMDOPID(
null,
this.props.ActiveCoin.coin
)
);
}, 1000);
if (this.state.addressType === 'private') {
setTimeout(() => {
Store.dispatch(
getKMDOPID(
null,
this.props.ActiveCoin.coin
)
);
}, 1000);
}
this.setState({
addressType: null,
sendFrom: null,
sendFromAmount: 0,
sendTo: '',
sendToOA: null,
amount: 0,
fee: 0,
addressSelectorOpen: false,
renderAddressDropdown: true,
});
}
getOAdress() {

124
react/src/components/dashboard/walletsNativeSend/walletsNativeSend.render.js

@ -1,5 +1,6 @@
import React from 'react';
import { translate } from '../../../translate/translate';
import QRModal from '../qrModal/qrModal';
export const AddressListRender = function() {
return (
@ -7,7 +8,7 @@ export const AddressListRender = function() {
<button
type="button"
className="btn dropdown-toggle btn-info"
title="- { translate('SEND.SELECT_T_OR_Z_ADDR') } -"
title="Select private address"
onClick={ this.openDropMenu }>
<span className="filter-option pull-left">{ this.renderSelectorCurrentLabel() } </span>
<span className="bs-caret">
@ -16,11 +17,16 @@ export const AddressListRender = function() {
</button>
<div className="dropdown-menu open">
<ul className="dropdown-menu inner">
<li className="selected">
<a><span className="text"> - { translate('SEND.SELECT_T_OR_Z_ADDR') } - </span>
<span className="glyphicon glyphicon-ok check-mark"></span></a>
<li
className="selected"
onClick={ () => this.updateAddressSelection(null, 'public', null) }>
<a>
<span className="text">Transparent funds</span>
<span
className="glyphicon glyphicon-ok check-mark pull-right"
style={{ display: this.state.sendFrom === null ? 'inline-block' : 'none' }}></span>
</a>
</li>
{ this.renderAddressByType('public') }
{ this.renderAddressByType('private') }
</ul>
</div>
@ -28,6 +34,8 @@ export const AddressListRender = function() {
);
};
// { this.renderAddressByType('public') }
export const OASendUIRender = function() {
return (
<div className="row">
@ -69,17 +77,24 @@ export const WalletsNativeSendRender = function() {
{ translate('INDEX.SEND') } { this.props.ActiveCoin.coin }
</h3>
</div>
<div className="qr-modal-send-block">
<QRModal
mode="scan"
setRecieverFromScan={ this.setRecieverFromScan } />
</div>
<div className="panel-body container-fluid">
<form
className="extcoin-send-form"
method="post"
autoComplete="off">
<div className="row">
<div className="col-xlg-12 form-group form-material">
<label className="control-label">{ translate('INDEX.SEND_FROM') }</label>
{ this.renderAddressList() }
{ this.state.renderAddressDropdown &&
<div className="row">
<div className="col-xlg-12 form-group form-material">
<label className="control-label">{ translate('INDEX.SEND_FROM') }</label>
{ this.renderAddressList() }
</div>
</div>
</div>
}
{ this.renderOASendUI() }
<div className="row">
<div className="col-xlg-12 form-group form-material">
@ -97,22 +112,23 @@ export const WalletsNativeSendRender = function() {
autoComplete="off"
required />
</div>
<div className="col-lg-6 form-group form-material">
<div className="col-lg-12 form-group form-material">
<label
className="control-label"
htmlFor="kmdWalletAmount">
{ this.props.ActiveCoin.coin }
{ translate('INDEX.AMOUNT') }
</label>
<input
type="text"
className="form-control"
name="amount"
value={ this.state.amount !== 0 ? this.state.amount : '' }
onChange={ this.updateInput }
id="kmdWalletAmount"
placeholder="0.000"
autoComplete="off" />
</div>
<div className="col-lg-6 form-group form-material">
<div className="col-lg-6 form-group form-material hide">
<label
className="control-label"
htmlFor="kmdWalletFee">
@ -125,13 +141,13 @@ export const WalletsNativeSendRender = function() {
onChange={ this.updateInput }
id="kmdWalletFee"
placeholder="0.000"
value={ this.state.fee }
value={ this.state.fee !== 0 ? this.state.fee : '' }
autoComplete="off" />
</div>
<div className="col-lg-12">
<div className="col-lg-12 hide">
<span>
<strong>{ translate('INDEX.TOTAL') }:</strong>
{ this.state.amount } - { this.state.fee }/kb = { Number(this.state.amount) - Number(this.state.fee) }
<strong>{ translate('INDEX.TOTAL') }:</strong>&nbsp;
{ this.state.amount } - { this.state.fee }/kb = { Number(this.state.amount) - Number(this.state.fee) }&nbsp;
{ this.props.ActiveCoin.coin }
</span>
</div>
@ -140,7 +156,7 @@ export const WalletsNativeSendRender = function() {
type="button"
className="btn btn-primary waves-effect waves-light pull-right"
onClick={ this.handleSubmit }
disabled={ !this.state.sendFrom || !this.state.sendTo || !this.state.amount }>
disabled={ !this.state.sendTo || !this.state.amount }>
{ translate('INDEX.SEND') } { this.state.amount } { this.props.ActiveCoin.coin }
</button>
</div>
@ -150,48 +166,50 @@ export const WalletsNativeSendRender = function() {
</div>
</div>
<div className="col-xs-12">
<div className="row">
<div className="panel nav-tabs-horizontal">
<div>
<div className="col-xlg-12 col-lg-12 col-sm-12 col-xs-12">
<div className="panel">
<header className="panel-heading">
<h3 className="panel-title">
{ translate('INDEX.OPERATIONS_STATUSES') }
</h3>
</header>
<div className="panel-body">
<table
className="table table-hover dataTable table-striped"
width="100%">
<thead>
<tr>
<th>{ translate('INDEX.STATUS') }</th>
<th>ID</th>
<th>{ translate('INDEX.TIME') }</th>
<th>{ translate('INDEX.RESULT') }</th>
</tr>
{ this.renderOPIDListCheck() &&
<div className="col-xs-12">
<div className="row">
<div className="panel nav-tabs-horizontal">
<div>
<div className="col-xlg-12 col-lg-12 col-sm-12 col-xs-12">
<div className="panel">
<header className="panel-heading">
<h3 className="panel-title">
{ translate('INDEX.OPERATIONS_STATUSES') }
</h3>
</header>
<div className="panel-body">
<table
className="table table-hover dataTable table-striped"
width="100%">
<thead>
<tr>
<th>{ translate('INDEX.STATUS') }</th>
<th>ID</th>
<th>{ translate('INDEX.TIME') }</th>
<th>{ translate('INDEX.RESULT') }</th>
</tr>
</thead>
<tbody>
{ this.renderOPIDList() }
</tbody>
<tfoot>
<tr>
<th>{ translate('INDEX.STATUS') }</th>
<th>ID</th>
<th>{ translate('INDEX.TIME') }</th>
<th>{ translate('INDEX.RESULT') }</th>
</tr>
</tfoot>
</table>
<tbody>
{ this.renderOPIDList() }
</tbody>
<tfoot>
<tr>
<th>{ translate('INDEX.STATUS') }</th>
<th>ID</th>
<th>{ translate('INDEX.TIME') }</th>
<th>{ translate('INDEX.RESULT') }</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
}
</div>
);
};

46
react/src/components/dashboard/walletsNav/walletsNav.js

@ -21,6 +21,9 @@ class WalletsNav extends React.Component {
nativeOnly: Config.iguanaLessMode,
};
this.toggleSendReceiveCoinForms = this.toggleSendReceiveCoinForms.bind(this);
this.toggleNativeWalletInfo = this.toggleNativeWalletInfo.bind(this);
this.toggleNativeWalletTransactions = this.toggleNativeWalletTransactions.bind(this);
this.checkTotalBalance = this.checkTotalBalance.bind(this);
}
componentWillMount() {
@ -31,6 +34,41 @@ class WalletsNav extends React.Component {
Store.dispatch(copyCoinAddress(address));
}
checkTotalBalance() {
let _balance = '0';
const _mode = this.props.ActiveCoin.mode;
if (_mode === 'full') {
_balance = this.props.ActiveCoin.balance || 0;
} else 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.balance ||
_cache[_coin][_address].getbalance.data.interest)) {
const _regBalance = _cache[_coin][_address].getbalance.data.balance ? _cache[_coin][_address].getbalance.data.balance : 0;
const _regInterest = _cache[_coin][_address].getbalance.data.interest ? _cache[_coin][_address].getbalance.data.interest : 0;
_balance = _regBalance + _regInterest;
}
}
} else if (_mode === 'native') {
if (this.props.ActiveCoin.balance &&
this.props.ActiveCoin.balance.total) {
_balance = this.props.ActiveCoin.balance.total;
}
}
return _balance;
}
toggleSendReceiveCoinForms() {
if (this.props.ActiveCoin.mode === 'native') {
Store.dispatch(
@ -43,6 +81,14 @@ class WalletsNav extends React.Component {
}
}
toggleNativeWalletInfo() {
Store.dispatch(toggleDashboardActiveSection('settings'));
}
toggleNativeWalletTransactions() {
Store.dispatch(toggleDashboardActiveSection('default'));
}
toggleSendCoinForm(display) {
if (this.props.ActiveCoin.mode === 'native') {
Store.dispatch(

32
react/src/components/dashboard/walletsNav/walletsNav.render.js

@ -28,8 +28,8 @@ export const WalletsNavWithWalletRender = function() {
id="header-dashboard"
style={{ marginBottom: this.props.ActiveCoin.mode === 'basilisk' ? '30px' : '0' }}>
<ol className={ this.state.nativeOnly ? 'hide' : 'breadcrumb' }>
<strong>{ translate('INDEX.MY') } { this.props && this.props.ActiveCoin ? this.props.ActiveCoin.coin : '-' } { translate('INDEX.ADDRESS') }: </strong>
{ this.props && this.props.Dashboard && this.props.Dashboard.activeHandle ? this.props.Dashboard.activeHandle[this.props.ActiveCoin.coin] : '-' }
<strong>{ translate('INDEX.MY') } { this.props && this.props.ActiveCoin ? this.props.ActiveCoin.coin : '-' } { translate('INDEX.ADDRESS') }: </strong>
{ this.props && this.props.Dashboard && this.props.Dashboard.activeHandle ? this.props.Dashboard.activeHandle[this.props.ActiveCoin.coin] : '-' }
<button
className="btn btn-default btn-xs clipboard-edexaddr"
onClick={ () => this.copyMyAddress(this.props.Dashboard.activeHandle[this.props.ActiveCoin.coin]) }>
@ -38,21 +38,31 @@ export const WalletsNavWithWalletRender = function() {
</ol>
<div className="page-header-actions">
<div id="kmd_header_button">
{ this.props.ActiveCoin.mode === 'native' &&
<button
type="button"
className="btn btn-info waves-effect waves-light"
onClick={ this.toggleNativeWalletInfo }>
<i className="icon fa-info"></i>
</button>
}
<button
type="button"
className="btn btn-dark waves-effect waves-light"
onClick={ this.toggleSendReceiveCoinForms }>
<i className="icon md-view-dashboard"></i> { this.props.ActiveCoin.mode !== 'native' ? translate('INDEX.DASHBOARD') : translate('INDEX.WALLET_INFO') }
onClick={ this.props.ActiveCoin.mode !== 'native' ? this.toggleSendReceiveCoinForms : this.toggleNativeWalletTransactions }>
<i className="icon md-view-dashboard"></i> { translate('INDEX.TRANSACTIONS') }
</button>
{ this.checkTotalBalance() > 0 &&
<button
type="button"
className="btn btn-primary waves-effect waves-light"
onClick={ () => this.toggleSendCoinForm(!this.props.ActiveCoin.send) }>
<i className="icon fa-send"></i> { translate('INDEX.SEND') }
</button>
}
<button
type="button"
className="btn btn-primary waves-effect waves-light"
onClick={ () => this.toggleSendCoinForm(!this.props.ActiveCoin.send) }>
<i className="icon fa-send"></i> { translate('INDEX.SEND') }
</button>
<button
type="button"
className="btn btn-info waves-effect waves-light"
className="btn btn-success waves-effect waves-light"
onClick={ () => this.toggleReceiveCoinForm(!this.props.ActiveCoin.receive) }>
<i className="icon fa-inbox"></i> { translate('INDEX.RECEIVE') }
</button>

22
react/src/components/dashboard/walletsProgress/walletsProgress.js

@ -57,11 +57,11 @@ class WalletsProgress extends React.Component {
if (_debugLogMulti[i].indexOf('progress=') > -1) {
_debugLogLine = _debugLogMulti[i];
}
}
}
} else {
_debugLogLine = this.props.Settings.debugLog;
}
if (_debugLogLine) {
const temp = _debugLogLine.split(' ');
let currentBestChain;
@ -73,6 +73,7 @@ class WalletsProgress extends React.Component {
}
if (temp[i].indexOf('progress=') > -1) {
currentProgress = Number(temp[i].replace('progress=', '')) * 1000;
currentProgress = currentProgress >= 100 ? 100 : currentProgress;
}
}
@ -90,10 +91,10 @@ class WalletsProgress extends React.Component {
this.props.Dashboard.progress.code === -28 &&
this.props.Settings.debugLog) {
const _progress = this.parseActivatingBestChainProgress();
if (_progress &&
_progress[1]) {
return SyncPercentageRender.call(this, _progress[1].toFixed(2));
return SyncPercentageRender.call(this, _progress[1] === 1000 ? 100 : _progress[1].toFixed(2));
} else {
return LoadingBlocksRender.call(this);
}
@ -112,9 +113,8 @@ class WalletsProgress extends React.Component {
if (this.props.Dashboard.progress &&
this.props.Dashboard.progress.blocks) {
const syncPercentage = (parseFloat(parseInt(this.props.Dashboard.progress.blocks, 10) * 100
/ parseInt(this.props.Dashboard.progress.longestchain, 10)).toFixed(2) + '%').replace('NaN', 0);
return SyncPercentageRender.call(this, syncPercentage);
const syncPercentage = (parseFloat(parseInt(this.props.Dashboard.progress.blocks, 10) * 100 / parseInt(this.props.Dashboard.progress.longestchain, 10)).toFixed(2) + '%').replace('NaN', 0);
return SyncPercentageRender.call(this, syncPercentage === 1000 ? 100 : syncPercentage);
}
return LoadingBlocksRender.call(this);
@ -189,18 +189,22 @@ class WalletsProgress extends React.Component {
} else {
if (currentProgress) {
return (
`: ${currentProgress}% (${ translate('INDEX.RESCAN_SM') })`
`: ${currentProgress.toFixed(2)}% (${ translate('INDEX.RESCAN_SM') })`
);
} else {
return null;
}
}
} else if (this.props.Settings.debugLog.indexOf('Rescanning last') > -1) {
return (
`: (${ translate('INDEX.RESCANNING_LAST_BLOCKS') })`
);
} else if (
this.props.Settings.debugLog.indexOf('LoadExternalBlockFile:') > -1 ||
this.props.Settings.debugLog.indexOf('Reindexing block file') > -1
) {
return (
`: ({ translate('INDEX.REINDEX') })`
`: (${ translate('INDEX.REINDEX') })`
);
} else {
return (

4
react/src/components/dashboard/walletsProgress/walletsProgress.render.js

@ -39,7 +39,7 @@ export const LoadingBlocksRender = function() {
export const TranslationComponentsRender = function(translationID) {
const translationComponents = translate(translationID).split('<br>');
return translationComponents.map((translation, idx) =>
<span key={idx}>
{ translation }
@ -71,7 +71,7 @@ export const ChainActivationNotificationRender = function() {
);
};
export const WalletsProgressRender = function () {
export const WalletsProgressRender = function() {
return (
<div
id="edex-footer"

4
react/src/components/dashboard/walletsTxInfo/walletsTxInfo.js

@ -15,6 +15,10 @@ class WalletsTxInfo extends React.Component {
toggleTxInfoModal() {
Store.dispatch(toggleDashboardTxInfoModal(false));
this.setState(Object.assign({}, this.state, {
activeTab: 0,
}));
}
openTab(tab) {

220
react/src/components/dashboard/walletsTxInfo/walletsTxInfo.render.js

@ -20,23 +20,20 @@ const WalletsTxInfoRender = function(txInfo) {
<i className="icon md-balance-wallet"></i>TxID Info
</a>
</li>
{ this.isNativeMode() &&
<li className={ this.state.activeTab === 1 ? 'active' : '' }>
<li className={ this.state.activeTab === 1 ? 'hide active' : 'hide' }>
<a onClick={ () => this.openTab(1) }>
<i className="icon md-plus-square"></i>Vjointsplits, Details
</a>
</li>
}
{ this.isNativeMode() &&
<li className={ this.state.activeTab === 2 ? 'active' : '' }>
<li className={ this.state.activeTab === 2 ? 'hide active' : 'hide' }>
<a onClick={ () => this.openTab(2) }>
<i className="icon wb-briefcase"></i>Hex
</a>
</li>
}
<li className={ this.state.activeTab === 3 ? 'active' : '' }>
<a onClick={ () => this.openTab(3) }>
<i className="icon wb-file"></i>Raw info
@ -45,117 +42,124 @@ const WalletsTxInfoRender = function(txInfo) {
</ul>
<div className="panel-body">
<div className="tab-content">
<div className={ 'tab-pane' + (this.state.activeTab === 0 ? ' active' : '') }>
<table className="table table-striped">
<tbody>
<tr>
<td>{ translate('TX_INFO.ADDRESS') }</td>
<td>
{ txInfo.address }
</td>
</tr>
<tr>
<td>{ translate('TX_INFO.AMOUNT') }</td>
<td>
{ Config.roundValues ? formatValue('round', txInfo.amount, -10) : txInfo.amount }
</td>
</tr>
<tr>
<td>{ translate('TX_INFO.CATEGORY') }</td>
<td>
{ txInfo.category || txInfo.type }
</td>
</tr>
<tr>
<td>{ translate('TX_INFO.CONFIRMATIONS') }</td>
<td>
{ txInfo.confirmations }
</td>
</tr>
<tr>
<td>blockhash</td>
<td>
{ txInfo.blockhash }
</td>
</tr>
<tr>
<td>blocktime</td>
<td>
{ secondsToString(txInfo.blocktime || txInfo.timestamp) }
</td>
</tr>
<tr>
<td>txid</td>
<td>
{ txInfo.txid }
</td>
</tr>
{ this.isNativeMode() &&
<tr>
<td>walletconflicts</td>
<td>
{ txInfo.walletconflicts ? txInfo.walletconflicts.length : null }
</td>
</tr>
}
{ this.isNativeMode() &&
{ this.state.activeTab === 0 &&
<div className="tab-pane active">
<table className="table table-striped">
<tbody>
<tr>
<td>{ translate('TX_INFO.ADDRESS') }</td>
<td>
{ this.props.ActiveCoin.mode === 'basilisk' ? this.props.ActiveCoin.activeAddress : txInfo.address }
</td>
</tr>
<tr>
<td>{ translate('TX_INFO.AMOUNT') }</td>
<td>
{ Config.roundValues ? formatValue('round', txInfo.amount, -10) : txInfo.amount }
</td>
</tr>
<tr>
<td>{ translate('TX_INFO.CATEGORY') }</td>
<td>
{ txInfo.category || txInfo.type }
</td>
</tr>
<tr>
<td>{ translate('TX_INFO.CONFIRMATIONS') }</td>
<td>
{ txInfo.confirmations }
</td>
</tr>
{ txInfo.blockhash &&
<tr>
<td>blockhash</td>
<td>
{ txInfo.blockhash }
</td>
</tr>
}
{ (txInfo.blocktime || txInfo.timestamp) &&
<tr>
<td>blocktime</td>
<td>
{ secondsToString(txInfo.blocktime || txInfo.timestamp) }
</td>
</tr>
}
<tr>
<td>txid</td>
<td>
{ txInfo.txid }
</td>
</tr>
{ this.isNativeMode() &&
<tr>
<td>walletconflicts</td>
<td>
{ txInfo.walletconflicts.length }
</td>
</tr>
}
{ this.isNativeMode() &&
<tr>
<td>time</td>
<td>
{ secondsToString(txInfo.time) }
</td>
</tr>
}
{ this.isNativeMode() &&
<tr>
<td>timereceived</td>
<td>
{ secondsToString(txInfo.timereceived) }
</td>
</tr>
}
</tbody>
</table>
</div>
}
{ this.state.activeTab === 1 &&
<div className="tab-pane active">
<table className="table table-striped">
<tbody>
<tr>
<td>time</td>
<td>vjoinsplit</td>
<td>
{ secondsToString(txInfo.time) }
{ txInfo.vjoinsplit }
</td>
</tr>
}
{ this.isNativeMode() &&
<tr>
<td>timereceived</td>
<td>details</td>
<td>
{ secondsToString(txInfo.timereceived) }
{ txInfo.details }
</td>
</tr>
}
</tbody>
</table>
</div>
<div className={ 'tab-pane' + (this.state.activeTab === 1 ? ' active' : '') }>
<table className="table table-striped">
<tbody>
<tr>
<td>vjoinsplit</td>
<td>
{ txInfo.vjoinsplit }
</td>
</tr>
<tr>
<td>details</td>
<td>
{ txInfo.details }
</td>
</tr>
</tbody>
</table>
</div>
<div className={ 'tab-pane' + (this.state.activeTab === 2 ? ' active' : '') }>
<textarea
className="full-width height-170"
rows="10"
cols="80"
defaultValue={ txInfo.hex }
disabled></textarea>
</div>
<div className={ 'tab-pane' + (this.state.activeTab === 3 ? ' active' : '') }>
<textarea
className="full-width height-400"
rows="40"
cols="80"
defaultValue={ JSON.stringify(txInfo, null, '\t') }
disabled></textarea>
</div>
</tbody>
</table>
</div>
}
{ this.state.activeTab === 2 &&
<div className="tab-pane active">
<textarea
className="full-width height-170"
rows="10"
cols="80"
defaultValue={ txInfo.hex }
disabled></textarea>
</div>
}
{ this.state.activeTab === 3 &&
<div className="tab-pane active">
<textarea
className="full-width height-400"
rows="40"
cols="80"
defaultValue={ JSON.stringify(txInfo, null, '\t') }
disabled></textarea>
</div>
}
</div>
</div>
</div>

12
react/src/components/login/login.js

@ -21,6 +21,8 @@ import { translate } from '../../translate/translate';
const IGUNA_ACTIVE_HANDLE_TIMEOUT = 3000;
const IGUNA_ACTIVE_COINS_TIMEOUT = 10000;
// TODO: remove duplicate activehandle and activecoins calls
class Login extends React.Component {
constructor(props) {
super(props);
@ -62,7 +64,7 @@ class Login extends React.Component {
toggleLoginSettingsDropdownSection(sectionName) {
Store.dispatch(toggleLoginSettingsModal(true));
this.setState({
displayLoginSettingsDropdown: false,
displayLoginSettingsDropdownSection: sectionName,
@ -193,14 +195,14 @@ class Login extends React.Component {
if (this.state.seedInputVisibility) {
document.querySelector('#loginPassphrase').style.height = '1px';
document.querySelector('#loginPassphrase').style.height = `${(15 + document.querySelector('#loginPassphrase').scrollHeight)}px`;
}
}
}, 100);
}
updateLoginPassPhraseInput(e) {
// remove any empty chars from the start/end of the string
const newValue = e.target.value;
clearTimeout(this.state.trimPassphraseTimer);
const _trimPassphraseTimer = setTimeout(() => {
@ -211,7 +213,7 @@ class Login extends React.Component {
}, 2000);
this.resizeLoginTextarea();
this.setState({
trimPassphraseTimer: _trimPassphraseTimer,
[e.target.name]: newValue,
@ -350,7 +352,7 @@ class Login extends React.Component {
copyPassPhraseToClipboard() {
const passPhrase = this.state.randomSeed;
const textField = document.createElement('textarea');
textField.innerText = passPhrase;
document.body.appendChild(textField);
textField.select();

10
react/src/components/main/main.js

@ -23,6 +23,16 @@ class Main extends React.Component {
}
componentDidMount() {
let appVersion;
try {
appVersion = window.require('electron').remote.getCurrentWindow().appBasicInfo;
} catch (e) {}
if (appVersion) {
document.title = `${appVersion.name} (v${appVersion.version.replace('version=', '')}-beta)`;
}
Store.dispatch(iguanaActiveHandle());
const _iguanaActiveHandle = setInterval(function() {
Store.dispatch(iguanaActiveHandle());

1
react/src/components/main/walletMain.js

@ -10,6 +10,7 @@ class WalletMain extends React.Component {
render() {
return (
<div className="full-height">
<input type="text" id="js-copytextarea" />
<SyncOnly {...this.props} />
<Dashboard {...this.props} />
<AddCoin {...this.props} />

36
react/src/components/overrides.scss

@ -648,4 +648,40 @@ select{
position: absolute;
right: 4px;
top: 3px;
}
.table-striped {
> tbody {
> tr.hover--none {
background-color: inherit;
}
}
}
.qr-modal-send-block {
position: absolute;
top: 15px;
right: 30px;
}
@media only screen and (min-width : 1201px) {
.wallet-widgets {
.flex {
display: flex;
flex-wrap: wrap;
}
> div {
display: flex;
.widget,
.widget-content {
height: 100%;
> div,
.clearfix {
height: 100%;
}
}
}
}
}

4
react/src/translate/en.js

@ -17,6 +17,7 @@ export const _lang = {
'NO_ACTIVE_COIN': 'No active coin',
},
'INDEX': {
'RESCANNING_LAST_BLOCKS': 'Rescanning last blocks...',
'NO_DATA_AVAILABLE': 'No data available',
'LOADING': 'Loading',
'ACTIVATING_SM': 'activating',
@ -193,7 +194,8 @@ export const _lang = {
'- Your External Wallet/daemon is setup, but is not setup with config settings like<br>',
'ACTIVATING_CHAIN': 'Activating best chain',
'KMD_STARTED': 'Komodo daemon has been started and is processing.<br>' +
'Please wait while the best chain is being activated.',
'Please wait while the best chain is being activated.<br>' +
'Tip: in case sync is stuck restart the wallet.',
'CONNECTIONS': 'Connections',
'TRANSPARENT_BALANCE': 'Transparent Balance',
'Z_BALANCE': 'Private (Z) Balance',

8
react/src/translate/translate.js

@ -13,13 +13,13 @@ export function translate(langID) {
_lang[defaultLang][langIDComponents[0]][langIDComponents[1]]) {
return _lang[defaultLang][langIDComponents[0]][langIDComponents[1]];
} else {
console.warn('Missing translation in js/' + defaultLang.toLowerCase() + '.js ' + langID);
return '--> ' + langID + ' <--';
console.warn(`Missing translation ${langID} in js/${defaultLang.toLowerCase()}.js`);
return `--> ${langID} <--`;
}
} else {
if (langID.length) {
console.warn('Missing translation in js/' + defaultLang.toLowerCase() + '.js ' + langID);
return '--> ' + langID + ' <--';
console.warn(`Missing translation ${langID} in js/${defaultLang.toLowerCase()}.js`);
return `--> ${langID} <--`;
}
}
}

13
react/src/util/formatValue.js

@ -1,5 +1,6 @@
// ref: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Math/round#Decimal_rounding
export function formatValue(formatType, formatValue, formatExp) {
let _formatExp;
/**
* Decimal adjustment of a number.
*
@ -31,19 +32,21 @@ export function formatValue(formatType, formatValue, formatExp) {
return +(value[0] + 'e' + (value[1] ? (+value[1] + exp) : exp));
}
if (formatValue >= 1) {
formatExp = -3;
if (Math.abs(Number(formatValue)) >= 1) {
_formatExp = -3;
} else {
_formatExp = formatExp;
}
switch (formatType) {
case 'round':
return decimalAdjust('round', formatValue, formatExp);
return decimalAdjust('round', formatValue, _formatExp);
break;
case 'floor':
return decimalAdjust('floor', formatValue, formatExp);
return decimalAdjust('floor', formatValue, _formatExp);
break;
case 'ceil':
return decimalAdjust('ceil', formatValue, formatExp);
return decimalAdjust('ceil', formatValue, _formatExp);
break;
}
}

15
react/src/util/sort.js

@ -1,10 +1,13 @@
export function sortByDate(data) {
export function sortByDate(data, sortKey) {
return data.sort(function(a, b) {
if (a.timestamp &&
b.timestamp) {
return b.timestamp - a.timestamp;
} else {
return b.blocktime - a.blocktime;
if (a[sortKey] < b[sortKey]) {
return -1;
}
if (a[sortKey] > b[sortKey]) {
return 1;
}
return 0;
});
}

8
react/src/util/time.js

@ -18,7 +18,7 @@ export function secondsToString(seconds, skipMultiply, showSeconds) {
month = months[a.getMonth()],
date = a.getDate(),
hour = a.getHours() < 10 ? `0${a.getHours()}` : a.getHours(),
min = a.getMinutes() < 10 ? `0 ${a.getMinutes()}` : a.getMinutes(),
min = a.getMinutes() < 10 ? `0${a.getMinutes()}` : a.getMinutes(),
sec = a.getSeconds(),
time = `${date} ${month} ${year} ${hour}:${min}${(showSeconds ? ':' + sec : '')}`;
@ -37,9 +37,9 @@ export function secondsElapsedToString(timestamp) { // in seconds
const hours = Math.floor(timestamp / 3600);
const minutes = Math.floor((timestamp - (hours * 3600)) / 60);
const seconds = timestamp - (hours * 3600) - (minutes * 60);
const returnTimeVal = (hours > 0 ? hours + ' hour(s) ' : '') +
(minutes > 0 ? minutes + ' minute(s) ' : '') +
(seconds > 0 ? seconds + ' second(s) ' : '');
const returnTimeVal = (hours > 0 ? `${hours} hour(s) ` : '') +
(minutes > 0 ? `${minutes} minute(s) ` : '') +
(seconds > 0 ? `${seconds} second(s) ` : '');
return returnTimeVal;
}

25
react/www/index.html

@ -1,21 +1,20 @@
<!DOCTYPE html>
<html class="no-js css-menubar" lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
<meta name="description" content="bootstrap admin template">
<meta name="author" content="SuperNET Team">
<title>Agama (v0.2.0.21a-beta)</title>
<link rel="apple-touch-icon" href="assets/images/android-chrome-192x192.png">
<link rel="icon" type="image/png" href="assets/images/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="assets/images/favicon-194x194.png" sizes="194x194">
<link rel="icon" type="image/png" href="assets/images/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="assets/images/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="assets/images/favicon-16x16.png" sizes="16x16">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
<meta name="description" content="bootstrap admin template">
<meta name="author" content="SuperNET Team">
<title>Agama</title>
<link rel="apple-touch-icon" href="assets/images/android-chrome-192x192.png">
<link rel="icon" type="image/png" href="assets/images/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="assets/images/favicon-194x194.png" sizes="194x194">
<link rel="icon" type="image/png" href="assets/images/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="assets/images/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="assets/images/favicon-16x16.png" sizes="16x16">
</head>
<body id="body" class="page-login layout-full page-dark">
<input type="text" id="js-copytextarea" />
<div id="app" class="full-height"></div>
</body>
</html>

Loading…
Cancel
Save