diff --git a/app/assets/images/console_zcash_light.png b/app/assets/images/console_zcash_light.png index 831e005..51c71fe 100644 Binary files a/app/assets/images/console_zcash_light.png and b/app/assets/images/console_zcash_light.png differ diff --git a/app/components/empty-transactions.js b/app/components/empty-transactions.js index c1174df..64e1692 100644 --- a/app/components/empty-transactions.js +++ b/app/components/empty-transactions.js @@ -13,8 +13,17 @@ const Wrapper = styled.div` padding: 30px 0; `; +const Text = styled(TextComponent)` + margin: 0 8.5px 0; + font-weight: 700; + text-transform: uppercase; + color: ${props => props.theme.colors.transactionLabelText}; + font-size: 12px; + font-weight: 700; +`; + export const EmptyTransactionsComponent = () => ( - + ); diff --git a/app/components/wallet-address.js b/app/components/wallet-address.js index 0af0793..2d316b1 100644 --- a/app/components/wallet-address.js +++ b/app/components/wallet-address.js @@ -7,6 +7,7 @@ import { ColumnComponent } from './column'; import { TextComponent } from './text'; import { QRCode } from './qrcode'; import { CopyToClipboard } from './copy-to-clipboard'; +import { Button } from './button'; import CopyIconDark from '../assets/images/copy_icon_dark.svg'; import CopyIconLight from '../assets/images/copy_icon_light.svg'; @@ -164,7 +165,38 @@ const AddressDetailsLabel = styled.div` const AddressDetailsWrapper = styled.div` display: flex; flex-direction: column; - padding: 10px 20px; + padding: 10px 20px 0 20px; +`; + +const FormButton = styled(Button)` + width: 100%; + margin: 5px 0; + + &:first-child { + margin-top: 0; + } +`; + +const Column = styled.div` + display: flex; + padding-bottom: 10px; + flex-direction: column; + justify-content: flex-start; + align-items: flex-start; +`; + +const SecondaryColumn = styled(Column)` + padding-bottom: 0; +`; + +const Row = styled(Column)` + flex-direction: row; + justify-content: space-between; + align-items: flex-end; +`; + +const ButtonWrapper = styled.div` + max-width: 200px; `; type Props = { @@ -175,6 +207,7 @@ type Props = { type State = { showCopiedTooltip: boolean, + isSecondaryCopied: boolean, showQRCode: boolean, }; @@ -182,6 +215,7 @@ class Component extends PureComponent { state = { showQRCode: false, showCopiedTooltip: false, + isSecondaryCopied: false, }; showMoreInfo = () => this.setState(() => ({ showQRCode: true })); @@ -192,14 +226,21 @@ class Component extends PureComponent { hideTooltip = () => this.setState(() => ({ showCopiedTooltip: false })); + unCopySecondary = () => this.setState(() => ({ isSecondaryCopied: false })); + copyAddress = () => this.setState( () => ({ showCopiedTooltip: true }), () => setTimeout(() => this.hideTooltip(), 1500), ); + copySecondaryAddress = () => this.setState( + () => ({ isSecondaryCopied: true }), + () => setTimeout(() => this.unCopySecondary(), 1500), + ); + render() { const { address, balance, theme } = this.props; - const { showQRCode, showCopiedTooltip } = this.state; + const { showQRCode, showCopiedTooltip, isSecondaryCopied } = this.state; const qrCodeIcon = theme.mode === DARK ? ScanIconDark : ScanIconLight; @@ -244,12 +285,29 @@ class Component extends PureComponent { - Address - - Funds - + + Address + + + + + Funds + + + + + + + + )} diff --git a/app/constants/explorer.js b/app/constants/explorer.js index ea93578..efc4921 100644 --- a/app/constants/explorer.js +++ b/app/constants/explorer.js @@ -4,4 +4,4 @@ import isDev from 'electron-is-dev'; export const ZCASH_EXPLORER_BASE_URL = isDev ? 'https://chain.so/tx/ZECTEST/' - : 'https://zcash.blockexplorer.com/tx/'; + : 'https://zcha.in/transactions/'; diff --git a/app/constants/zcash-network.js b/app/constants/zcash-network.js index c057c5b..a874c6e 100644 --- a/app/constants/zcash-network.js +++ b/app/constants/zcash-network.js @@ -1,6 +1,10 @@ // @flow + export const ZCASH_NETWORK = 'ZCASH_NETWORK'; export const EMBEDDED_DAEMON = 'EMBEDDED_DAEMON'; export const MAINNET = 'MAINNET'; export const TESTNET = 'TESTNET'; + +export const SPROUT = 'sprout'; +export const SAPLING = 'sapling'; diff --git a/app/containers/dashboard.js b/app/containers/dashboard.js index 8754818..76e3750 100644 --- a/app/containers/dashboard.js +++ b/app/containers/dashboard.js @@ -11,6 +11,7 @@ import { DashboardView } from '../views/dashboard'; import rpc from '../../services/api'; import store from '../../config/electron-store'; +import { SAPLING } from '../constants/zcash-network'; import { listShieldedTransactions } from '../../services/shielded-transactions'; import { sortByDescend } from '../utils/sort-by-descend'; @@ -70,7 +71,7 @@ const mapDispatchToProps = (dispatch: Dispatch) => ({ ])([...transactions, ...listShieldedTransactions()]); if (!zAddresses.length) { - const [, newZAddress] = await eres(rpc.z_getnewaddress()); + const [, newZAddress] = await eres(rpc.z_getnewaddress(SAPLING)); if (newZAddress) zAddresses.push(newZAddress); } diff --git a/app/containers/receive.js b/app/containers/receive.js index 8f75e89..de6a5a6 100644 --- a/app/containers/receive.js +++ b/app/containers/receive.js @@ -5,6 +5,7 @@ import { connect } from 'react-redux'; import { BigNumber } from 'bignumber.js'; import { ReceiveView } from '../views/receive'; +import { SAPLING } from '../constants/zcash-network'; import { loadAddressesSuccess, @@ -74,7 +75,7 @@ const mapDispatchToProps = (dispatch: Dispatch): MapDispatchToProps => ({ }, getNewAddress: async ({ type }) => { const [error, address] = await eres( - type === 'shielded' ? rpc.z_getnewaddress() : rpc.getnewaddress(''), + type === 'shielded' ? rpc.z_getnewaddress(SAPLING) : rpc.getnewaddress(''), ); if (error || !address) return dispatch(getNewAddressError({ error: 'Unable to generate a new address' })); diff --git a/config/daemon/wait-for-daemon-close.js b/config/daemon/wait-for-daemon-close.js index 2633841..c7cd723 100644 --- a/config/daemon/wait-for-daemon-close.js +++ b/config/daemon/wait-for-daemon-close.js @@ -1,4 +1,5 @@ // @flow + import eres from 'eres'; import processExists from 'process-exists'; diff --git a/config/daemon/zcashd-child-process.js b/config/daemon/zcashd-child-process.js index 6571ee1..3f70a19 100644 --- a/config/daemon/zcashd-child-process.js +++ b/config/daemon/zcashd-child-process.js @@ -10,6 +10,7 @@ import type { ChildProcess } from 'child_process'; import eres from 'eres'; import uuid from 'uuid/v4'; import findProcess from 'find-process'; + /* eslint-disable-next-line import/named */ import { mainWindow } from '../electron'; import waitForDaemonClose from './wait-for-daemon-close'; diff --git a/config/electron.js b/config/electron.js index 550debe..9f29c6e 100644 --- a/config/electron.js +++ b/config/electron.js @@ -54,6 +54,8 @@ const createWindow = () => { }); mainWindow = new BrowserWindow({ + minWidth: 700, + minHeight: 600, width: 1000, height: 660, transparent: false, @@ -61,7 +63,8 @@ const createWindow = () => { resizable: true, webPreferences: { devTools: true, - webSecurity: false, + // devTools: false, + webSecurity: true, }, }); diff --git a/config/handle-deeplink.js b/config/handle-deeplink.js index 06f0f3e..3bff6b2 100644 --- a/config/handle-deeplink.js +++ b/config/handle-deeplink.js @@ -1,4 +1,5 @@ // @flow + import { typeof app as ElectronApp, type electron$BrowserWindow, remote } from 'electron'; // eslint-disable-line import store from './electron-store'; diff --git a/config/is-testnet.js b/config/is-testnet.js index 84a1214..f874d4d 100644 --- a/config/is-testnet.js +++ b/config/is-testnet.js @@ -1,4 +1,5 @@ // @flow + import electronStore from './electron-store'; import { ZCASH_NETWORK, MAINNET } from '../app/constants/zcash-network';