diff --git a/app/components/CreateWallet.js b/app/components/CreateWallet.js index c65a997f9..83f5a92d6 100644 --- a/app/components/CreateWallet.js +++ b/app/components/CreateWallet.js @@ -51,7 +51,7 @@ class CreateWallet extends Component { {this.props.wif} clipboard.writeText(this.props.wif, 'selection')}> - + Copy Public Key diff --git a/app/components/Login.js b/app/components/Login.js index 119d3858f..64af1587b 100644 --- a/app/components/Login.js +++ b/app/components/Login.js @@ -21,8 +21,8 @@ let Login = ({ dispatch, loggedIn, wif }) =>
onWifChange(dispatch)} ref={node => {input_wif = node;}} />
- {loggedIn ? : } - + {loggedIn ? : } +
diff --git a/app/components/NetworkSwitch.js b/app/components/NetworkSwitch.js index d0075f3ee..ade98413c 100644 --- a/app/components/NetworkSwitch.js +++ b/app/components/NetworkSwitch.js @@ -40,15 +40,12 @@ const syncTransactionHistory = (dispatch, net, address) => { getTransactionHistory(net, address).then((transactions) => { let txs = []; for (let i = 0; i < transactions.length; i++){ - if (transactions[i].NEO !== 0){ + if (transactions[i].neo_sent === true){ txs = txs.concat([{type: "NEO", amount: transactions[i].NEO, txid: transactions[i].txid, block_index: transactions[i].block_index }]); } - if (transactions[i].GAS !== 0){ + if (transactions[i].gas_sent === true){ txs = txs.concat([{type: "GAS", amount: transactions[i].GAS, txid: transactions[i].txid, block_index: transactions[i].block_index }]); } - if (transactions[i].GAS === 0 && transactions[i].NEO === 0){ - txs = txs.concat([{type: "NEO", amount: 0, txid: transactions[i].txid, block_index: transactions[i].block_index }]); - } } dispatch(setTransactionHistory(txs)); }); diff --git a/app/components/Send.js b/app/components/Send.js index 39436a239..9212628a4 100644 --- a/app/components/Send.js +++ b/app/components/Send.js @@ -24,11 +24,15 @@ const sendTransaction = (dispatch, net, wif, asset, neo_balance, gas_balance) => } else { assetSwap = "AntCoins"; } - dispatch(sendEvent(true, "Processing...")) + dispatch(sendEvent(true, "Processing...")); if (verifyAddress(sendAddress.value) !== true){ dispatch(sendEvent(false, "The address you entered was not valid. No NEO was sent.")); setTimeout(() => dispatch(clearTransactionEvent()), 5000); } + else if (asset === "NEO" && parseFloat(sendAmount.value) !== parseInt(sendAmount.value)){ + dispatch(sendEvent(false, "You cannot send fractional amounts of Neo.")); + setTimeout(() => dispatch(clearTransactionEvent()), 5000); + } else if (asset === "NEO" && parseInt(sendAmount.value) > neo_balance){ dispatch(sendEvent(false, "You do not have enough NEO to send. No NEO was sent.")); setTimeout(() => dispatch(clearTransactionEvent()), 5000); diff --git a/app/components/TransactionHistory.js b/app/components/TransactionHistory.js index e2a011bb8..9f93677d3 100644 --- a/app/components/TransactionHistory.js +++ b/app/components/TransactionHistory.js @@ -28,7 +28,19 @@ class TransactionHistory extends Component {
Transaction History
; } diff --git a/app/components/WalletInfo.js b/app/components/WalletInfo.js index 1b312ecb2..74722bfed 100644 --- a/app/components/WalletInfo.js +++ b/app/components/WalletInfo.js @@ -5,6 +5,9 @@ import MdSync from 'react-icons/lib/md/sync'; import QRCode from 'qrcode'; import { initiateGetBalance, intervals } from "../components/NetworkSwitch"; import { resetPrice, sendEvent, clearTransactionEvent } from '../actions/index.js'; +import { clipboard } from 'electron'; +import Copy from 'react-icons/lib/md/content-copy'; +import ReactTooltip from 'react-tooltip' // need handlers on these as otherwise the interval is not cleared when switching between accounts @@ -34,7 +37,13 @@ class WalletInfo extends Component { if (this.props.address !== null){ return (
Your Public Neo Address:
-
{this.props.address}
+
+ {this.props.address} + clipboard.writeText(this.props.address, 'selection')}> +
+ + Copy Public Address +
diff --git a/app/containers/Dashboard.js b/app/containers/Dashboard.js index 476e850d6..b7968ae75 100644 --- a/app/containers/Dashboard.js +++ b/app/containers/Dashboard.js @@ -49,7 +49,7 @@ class Dashboard extends Component {