1.8.0-beta1

This commit is contained in:
Aditya Kulkarni 2022-06-23 12:41:48 -05:00
parent 019c79e219
commit 16b9c39c89
27 changed files with 1112 additions and 32 deletions

1
.gitignore vendored
View File

@ -11,6 +11,7 @@
# production
/build
/dist
/release
# misc
.DS_Store

View File

@ -14,13 +14,13 @@ Head over to the releases page and grab the latest installers or binary. https:/
If you are on Debian/Ubuntu, please download the '.AppImage' package and just run it.
```
./Zecwallet.Fullnode-1.7.8.AppImage
./Zecwallet.Fullnode-1.8.0-beta1.AppImage
```
If you prefer to install a `.deb` package, that is also available.
```
sudo apt install -f ./zecwallet_1.7.8_amd64.deb
sudo apt install -f ./zecwallet_1.8.0-beta1_amd64.deb
```
### Windows

237
bin/linux/fetch-params.sh Executable file
View File

@ -0,0 +1,237 @@
#!/bin/sh
export LC_ALL=C
set -eu
uname_S=$(uname -s 2>/dev/null || echo not)
if [ "$uname_S" = "Darwin" ]; then
PARAMS_DIR="$HOME/Library/Application Support/ZcashParams"
else
PARAMS_DIR="$HOME/.zcash-params"
fi
# Commented out because these are unused; see below.
#SPROUT_PKEY_NAME='sprout-proving.key'
#SPROUT_VKEY_NAME='sprout-verifying.key'
SAPLING_SPEND_NAME='sapling-spend.params'
SAPLING_OUTPUT_NAME='sapling-output.params'
SAPLING_SPROUT_GROTH16_NAME='sprout-groth16.params'
DOWNLOAD_URL="https://download.z.cash/downloads"
IPFS_HASH="/ipfs/QmXRHVGLQBiKwvNq7c2vPxAKz1zRVmMYbmt7G5TQss7tY7"
SHA256CMD="$(command -v sha256sum || echo shasum)"
SHA256ARGS="$(command -v sha256sum >/dev/null || echo '-a 256')"
WGETCMD="$(command -v wget || echo '')"
IPFSCMD="$(command -v ipfs || echo '')"
CURLCMD="$(command -v curl || echo '')"
# fetch methods can be disabled with ZC_DISABLE_SOMETHING=1
ZC_DISABLE_WGET="${ZC_DISABLE_WGET:-}"
ZC_DISABLE_IPFS="${ZC_DISABLE_IPFS:-}"
ZC_DISABLE_CURL="${ZC_DISABLE_CURL:-}"
LOCKFILE=/tmp/fetch_params.lock
fetch_wget() {
if [ -z "$WGETCMD" ] || ! [ -z "$ZC_DISABLE_WGET" ]; then
return 1
fi
cat <<EOF
Retrieving (wget): $DOWNLOAD_URL/$1
EOF
wget \
--progress=dot:giga \
--output-document="$2" \
--continue \
--retry-connrefused --waitretry=3 --timeout=30 \
"$DOWNLOAD_URL/$1"
}
fetch_ipfs() {
if [ -z "$IPFSCMD" ] || ! [ -z "$ZC_DISABLE_IPFS" ]; then
return 1
fi
cat <<EOF
Retrieving (ipfs): $IPFS_HASH/$1
EOF
ipfs get --output "$2" "$IPFS_HASH/$1"
}
fetch_curl() {
if [ -z "$CURLCMD" ] || ! [ -z "$ZC_DISABLE_CURL" ]; then
return 1
fi
cat <<EOF
Retrieving (curl): $DOWNLOAD_URL/$1
EOF
curl \
--output "$2" \
-# -L -C - \
"$DOWNLOAD_URL/$1"
}
fetch_failure() {
cat >&2 <<EOF
Failed to fetch the Zcash zkSNARK parameters!
Try installing one of the following programs and make sure you're online:
* ipfs
* wget
* curl
EOF
exit 1
}
fetch_params() {
# We only set these variables inside this function,
# and unset them at the end of the function.
filename="$1"
output="$2"
dlname="${output}.dl"
expectedhash="$3"
if ! [ -f "$output" ]
then
for i in 1 2
do
for method in wget ipfs curl failure; do
if "fetch_$method" "${filename}.part.${i}" "${dlname}.part.${i}"; then
echo "Download of part ${i} successful!"
break
fi
done
done
for i in 1 2
do
if ! [ -f "${dlname}.part.${i}" ]
then
fetch_failure
fi
done
cat "${dlname}.part.1" "${dlname}.part.2" > "${dlname}"
rm "${dlname}.part.1" "${dlname}.part.2"
"$SHA256CMD" $SHA256ARGS -c <<EOF
$expectedhash $dlname
EOF
# Check the exit code of the shasum command:
CHECKSUM_RESULT=$?
if [ $CHECKSUM_RESULT -eq 0 ]; then
mv -v "$dlname" "$output"
else
echo "Failed to verify parameter checksums!" >&2
exit 1
fi
fi
unset -v filename
unset -v output
unset -v dlname
unset -v expectedhash
}
# Use flock to prevent parallel execution.
lock() {
if [ "$uname_S" = "Darwin" ]; then
if shlock -f ${LOCKFILE} -p $$; then
return 0
else
return 1
fi
else
# create lock file
eval "exec 9>$LOCKFILE"
# acquire the lock
flock -n 9 \
&& return 0 \
|| return 1
fi
}
exit_locked_error() {
echo "Only one instance of fetch-params.sh can be run at a time." >&2
exit 1
}
main() {
lock fetch-params.sh \
|| exit_locked_error
cat <<EOF
Zcash - fetch-params.sh
This script will fetch the Zcash zkSNARK parameters and verify their
integrity with sha256sum.
If they already exist locally, it will exit now and do nothing else.
EOF
# Now create PARAMS_DIR and insert a README if necessary:
if ! [ -d "$PARAMS_DIR" ]
then
mkdir -p "$PARAMS_DIR"
README_PATH="$PARAMS_DIR/README"
cat >> "$README_PATH" <<EOF
This directory stores common Zcash zkSNARK parameters. Note that it is
distinct from the daemon's -datadir argument because the parameters are
large and may be shared across multiple distinct -datadir's such as when
setting up test networks.
EOF
# This may be the first time the user's run this script, so give
# them some info, especially about bandwidth usage:
cat <<EOF
The complete parameters are currently just under 1.7GB in size, so plan
accordingly for your bandwidth constraints. If the Sprout parameters are
already present the additional Sapling parameters required are just under
800MB in size. If the files are already present and have the correct
sha256sum, no networking is used.
Creating params directory. For details about this directory, see:
$README_PATH
EOF
fi
cd "$PARAMS_DIR"
# Sprout parameters:
# Commented out because they are unneeded, but we will eventually update
# this to delete the parameters if possible.
#fetch_params "$SPROUT_PKEY_NAME" "$PARAMS_DIR/$SPROUT_PKEY_NAME" "8bc20a7f013b2b58970cddd2e7ea028975c88ae7ceb9259a5344a16bc2c0eef7"
#fetch_params "$SPROUT_VKEY_NAME" "$PARAMS_DIR/$SPROUT_VKEY_NAME" "4bd498dae0aacfd8e98dc306338d017d9c08dd0918ead18172bd0aec2fc5df82"
# Sapling parameters:
fetch_params "$SAPLING_SPEND_NAME" "$PARAMS_DIR/$SAPLING_SPEND_NAME" "8e48ffd23abb3a5fd9c5589204f32d9c31285a04b78096ba40a79b75677efc13"
fetch_params "$SAPLING_OUTPUT_NAME" "$PARAMS_DIR/$SAPLING_OUTPUT_NAME" "2f0ebbcbb9bb0bcffe95a397e7eba89c29eb4dde6191c339db88570e3f3fb0e4"
fetch_params "$SAPLING_SPROUT_GROTH16_NAME" "$PARAMS_DIR/$SAPLING_SPROUT_GROTH16_NAME" "b685d700c60328498fbde589c8c7c484c722b788b265b72af448a5bf0ee55b50"
}
if [ "x${1:-}" = 'x--testnet' ]
then
echo "NOTE: testnet now uses the mainnet parameters, so the --testnet argument"
echo "is no longer needed (ignored)"
echo ""
fi
main
rm -f $LOCKFILE
exit 0

BIN
bin/linux/zcash-cli Executable file

Binary file not shown.

BIN
bin/linux/zcashd Executable file

Binary file not shown.

BIN
bin/linux/zcashd-wallet-tool Executable file

Binary file not shown.

237
bin/mac/fetch-params.sh Executable file
View File

@ -0,0 +1,237 @@
#!/bin/sh
export LC_ALL=C
set -eu
uname_S=$(uname -s 2>/dev/null || echo not)
if [ "$uname_S" = "Darwin" ]; then
PARAMS_DIR="$HOME/Library/Application Support/ZcashParams"
else
PARAMS_DIR="$HOME/.zcash-params"
fi
# Commented out because these are unused; see below.
#SPROUT_PKEY_NAME='sprout-proving.key'
#SPROUT_VKEY_NAME='sprout-verifying.key'
SAPLING_SPEND_NAME='sapling-spend.params'
SAPLING_OUTPUT_NAME='sapling-output.params'
SAPLING_SPROUT_GROTH16_NAME='sprout-groth16.params'
DOWNLOAD_URL="https://download.z.cash/downloads"
IPFS_HASH="/ipfs/QmXRHVGLQBiKwvNq7c2vPxAKz1zRVmMYbmt7G5TQss7tY7"
SHA256CMD="$(command -v sha256sum || echo shasum)"
SHA256ARGS="$(command -v sha256sum >/dev/null || echo '-a 256')"
WGETCMD="$(command -v wget || echo '')"
IPFSCMD="$(command -v ipfs || echo '')"
CURLCMD="$(command -v curl || echo '')"
# fetch methods can be disabled with ZC_DISABLE_SOMETHING=1
ZC_DISABLE_WGET="${ZC_DISABLE_WGET:-}"
ZC_DISABLE_IPFS="${ZC_DISABLE_IPFS:-}"
ZC_DISABLE_CURL="${ZC_DISABLE_CURL:-}"
LOCKFILE=/tmp/fetch_params.lock
fetch_wget() {
if [ -z "$WGETCMD" ] || ! [ -z "$ZC_DISABLE_WGET" ]; then
return 1
fi
cat <<EOF
Retrieving (wget): $DOWNLOAD_URL/$1
EOF
wget \
--progress=dot:giga \
--output-document="$2" \
--continue \
--retry-connrefused --waitretry=3 --timeout=30 \
"$DOWNLOAD_URL/$1"
}
fetch_ipfs() {
if [ -z "$IPFSCMD" ] || ! [ -z "$ZC_DISABLE_IPFS" ]; then
return 1
fi
cat <<EOF
Retrieving (ipfs): $IPFS_HASH/$1
EOF
ipfs get --output "$2" "$IPFS_HASH/$1"
}
fetch_curl() {
if [ -z "$CURLCMD" ] || ! [ -z "$ZC_DISABLE_CURL" ]; then
return 1
fi
cat <<EOF
Retrieving (curl): $DOWNLOAD_URL/$1
EOF
curl \
--output "$2" \
-# -L -C - \
"$DOWNLOAD_URL/$1"
}
fetch_failure() {
cat >&2 <<EOF
Failed to fetch the Zcash zkSNARK parameters!
Try installing one of the following programs and make sure you're online:
* ipfs
* wget
* curl
EOF
exit 1
}
fetch_params() {
# We only set these variables inside this function,
# and unset them at the end of the function.
filename="$1"
output="$2"
dlname="${output}.dl"
expectedhash="$3"
if ! [ -f "$output" ]
then
for i in 1 2
do
for method in wget ipfs curl failure; do
if "fetch_$method" "${filename}.part.${i}" "${dlname}.part.${i}"; then
echo "Download of part ${i} successful!"
break
fi
done
done
for i in 1 2
do
if ! [ -f "${dlname}.part.${i}" ]
then
fetch_failure
fi
done
cat "${dlname}.part.1" "${dlname}.part.2" > "${dlname}"
rm "${dlname}.part.1" "${dlname}.part.2"
"$SHA256CMD" $SHA256ARGS -c <<EOF
$expectedhash $dlname
EOF
# Check the exit code of the shasum command:
CHECKSUM_RESULT=$?
if [ $CHECKSUM_RESULT -eq 0 ]; then
mv -v "$dlname" "$output"
else
echo "Failed to verify parameter checksums!" >&2
exit 1
fi
fi
unset -v filename
unset -v output
unset -v dlname
unset -v expectedhash
}
# Use flock to prevent parallel execution.
lock() {
if [ "$uname_S" = "Darwin" ]; then
if shlock -f ${LOCKFILE} -p $$; then
return 0
else
return 1
fi
else
# create lock file
eval "exec 9>$LOCKFILE"
# acquire the lock
flock -n 9 \
&& return 0 \
|| return 1
fi
}
exit_locked_error() {
echo "Only one instance of fetch-params.sh can be run at a time." >&2
exit 1
}
main() {
lock fetch-params.sh \
|| exit_locked_error
cat <<EOF
Zcash - fetch-params.sh
This script will fetch the Zcash zkSNARK parameters and verify their
integrity with sha256sum.
If they already exist locally, it will exit now and do nothing else.
EOF
# Now create PARAMS_DIR and insert a README if necessary:
if ! [ -d "$PARAMS_DIR" ]
then
mkdir -p "$PARAMS_DIR"
README_PATH="$PARAMS_DIR/README"
cat >> "$README_PATH" <<EOF
This directory stores common Zcash zkSNARK parameters. Note that it is
distinct from the daemon's -datadir argument because the parameters are
large and may be shared across multiple distinct -datadir's such as when
setting up test networks.
EOF
# This may be the first time the user's run this script, so give
# them some info, especially about bandwidth usage:
cat <<EOF
The complete parameters are currently just under 1.7GB in size, so plan
accordingly for your bandwidth constraints. If the Sprout parameters are
already present the additional Sapling parameters required are just under
800MB in size. If the files are already present and have the correct
sha256sum, no networking is used.
Creating params directory. For details about this directory, see:
$README_PATH
EOF
fi
cd "$PARAMS_DIR"
# Sprout parameters:
# Commented out because they are unneeded, but we will eventually update
# this to delete the parameters if possible.
#fetch_params "$SPROUT_PKEY_NAME" "$PARAMS_DIR/$SPROUT_PKEY_NAME" "8bc20a7f013b2b58970cddd2e7ea028975c88ae7ceb9259a5344a16bc2c0eef7"
#fetch_params "$SPROUT_VKEY_NAME" "$PARAMS_DIR/$SPROUT_VKEY_NAME" "4bd498dae0aacfd8e98dc306338d017d9c08dd0918ead18172bd0aec2fc5df82"
# Sapling parameters:
fetch_params "$SAPLING_SPEND_NAME" "$PARAMS_DIR/$SAPLING_SPEND_NAME" "8e48ffd23abb3a5fd9c5589204f32d9c31285a04b78096ba40a79b75677efc13"
fetch_params "$SAPLING_OUTPUT_NAME" "$PARAMS_DIR/$SAPLING_OUTPUT_NAME" "2f0ebbcbb9bb0bcffe95a397e7eba89c29eb4dde6191c339db88570e3f3fb0e4"
fetch_params "$SAPLING_SPROUT_GROTH16_NAME" "$PARAMS_DIR/$SAPLING_SPROUT_GROTH16_NAME" "b685d700c60328498fbde589c8c7c484c722b788b265b72af448a5bf0ee55b50"
}
if [ "x${1:-}" = 'x--testnet' ]
then
echo "NOTE: testnet now uses the mainnet parameters, so the --testnet argument"
echo "is no longer needed (ignored)"
echo ""
fi
main
rm -f $LOCKFILE
exit 0

BIN
bin/mac/zcash-cli Executable file

Binary file not shown.

BIN
bin/mac/zcashd Executable file

Binary file not shown.

BIN
bin/mac/zcashd-wallet-tool Executable file

Binary file not shown.

BIN
bin/win/zcash-cli.exe Executable file

Binary file not shown.

BIN
bin/win/zcashd-wallet-tool.exe Executable file

Binary file not shown.

BIN
bin/win/zcashd.exe Executable file

Binary file not shown.

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
</dict>
</plist>

View File

@ -1,7 +1,7 @@
{
"name": "zecwallet",
"productName": "Zecwallet Fullnode",
"version": "1.7.8",
"version": "1.8.0-beta1",
"description": "Zecwallet Fullnode (Electron version)",
"private": true,
"main": "./public/electron.js",
@ -74,13 +74,45 @@
"afterAllArtifactBuild": "./afterSignHook.js",
"files": [
"build/**/*",
"node_modules/**/*"
"node_modules/**/*",
"package.json"
],
"directories": {
"buildResources": "public"
"buildResources": "public",
"output": "release"
},
"dmg": {
"contents": [
{
"x": 130,
"y": 220
},
{
"x": 410,
"y": 220,
"type": "link",
"path": "/Applications"
}
]
},
"mac": {
"target": "dmg"
"category": "public.app-category.productivity",
"type": "distribution",
"hardenedRuntime": true,
"entitlements": "./configs/entitlements.mac.inherit.plist",
"target": [
"dmg"
],
"icon": "./resources/icon.icns",
"extraFiles": [
{
"from": "bin/mac",
"to": "resources/bin/mac",
"filter": [
"**/*"
]
}
]
},
"win": {
"target": [
@ -88,8 +120,44 @@
"msi"
]
},
"deb": {
"depends": [
"gconf2",
"gconf-service",
"libnotify4",
"libappindicator1",
"libxtst6",
"libnss3"
],
"artifactName": "Zecwallet_Fullnode_${version}_${arch}.deb"
},
"linux": {
"target": "deb"
"category": "Development",
"icon": "./resources/icon.icns",
"extraFiles": [
{
"from": "bin/linux",
"to": "resources/bin/linux",
"filter": [
"**/**"
]
}
],
"target": [
"deb",
"AppImage"
],
"desktop": {
"Name": "ZecWallet",
"Comment": "Full node and wallet for Zcash",
"GenericName": "Wallet",
"Type": "Application",
"StartupNotify": true,
"StartupWMClass": "zecwallet",
"Categories": "Utility;",
"MimeType": "x-scheme-handler/zcash;",
"Keywords": "zecwallet;"
}
}
},
"browserslist": {

View File

@ -1,9 +1,11 @@
// Module to control the application lifecycle and the native browser window.
const { app, BrowserWindow, protocol, ipcMain, dialog } = require("electron");
const path = require("path");
const url = require("url");
const axios = require("axios");
const fs = require("fs");
const MenuBuilder = require("./menu");
ipcMain.handle("getAppPath", (_, pathType) => {
return app.getPath(pathType);
@ -30,12 +32,14 @@ ipcMain.handle("doRPC_IPC", async (_, config, method, params) => {
})
.then((r) => resolve(r.data))
.catch((err) => {
const e = { ...err };
const e = { ...err };
console.log(
`Caught error: ${e.response.toString()} - ${
e.response ? e.response.data.toString() : ""
`Caught error: ${e.response} - ${
e.response ? e.response.data : ""
}`
);
if (e.response && e.response.data) {
reject(e.response.data.toString());
} else {
@ -45,7 +49,7 @@ ipcMain.handle("doRPC_IPC", async (_, config, method, params) => {
});
return response;
});
});
ipcMain.handle("getZecPrice_IPC", async () => {
const response = await new Promise((resolve, reject) => {
@ -101,9 +105,13 @@ function createWindow() {
mainWindow.loadURL(appURL);
// Automatically open Chrome's DevTools in development mode.
if (!app.isPackaged) {
// if (!app.isPackaged) {
mainWindow.webContents.openDevTools();
}
// }
const menuBuilder = new MenuBuilder(mainWindow);
menuBuilder.buildMenu();
}
// Setup a local proxy to adjust the paths of requested files when loading

302
public/menu.js Normal file
View File

@ -0,0 +1,302 @@
const { app, Menu, shell, BrowserWindow } = require('electron');
class MenuBuilder {
mainWindow;
constructor(mainWindow) {
this.mainWindow = mainWindow;
}
buildMenu() {
// if (process.env.NODE_ENV === 'development' || process.env.DEBUG_PROD === 'true') {
// // this.setupDevelopmentEnvironment();
// }
const template = process.platform === 'darwin' ? this.buildDarwinTemplate() : this.buildDefaultTemplate();
const menu = Menu.buildFromTemplate(template);
Menu.setApplicationMenu(menu);
const selectionMenu = Menu.buildFromTemplate([{ role: 'copy' }, { type: 'separator' }, { role: 'selectall' }]);
const inputMenu = Menu.buildFromTemplate([
{ role: 'undo' },
{ role: 'redo' },
{ type: 'separator' },
{ role: 'cut' },
{ role: 'copy' },
{ role: 'paste' },
{ type: 'separator' },
{ role: 'selectall' }
]);
this.mainWindow.webContents.on('context-menu', (e, props) => {
const { selectionText, isEditable } = props;
if (isEditable) {
inputMenu.popup(this.mainWindow);
} else if (selectionText && selectionText.trim() !== '') {
selectionMenu.popup(this.mainWindow);
} else if (process.env.NODE_ENV === 'development' || process.env.DEBUG_PROD === 'true') {
const { x, y } = props;
Menu.buildFromTemplate([
{
label: 'Inspect element',
click: () => {
this.mainWindow.inspectElement(x, y);
}
}
]).popup(this.mainWindow);
}
});
return menu;
}
buildDarwinTemplate() {
const { mainWindow } = this;
const subMenuAbout = {
label: 'Zecwallet Fullnode',
submenu: [
{
label: 'About Zecwallet Fullnode',
selector: 'orderFrontStandardAboutPanel:',
click: () => {
mainWindow.webContents.send('about');
}
},
{ type: 'separator' },
{ label: 'Services', submenu: [] },
{ type: 'separator' },
{
label: 'Hide Zecwallet Fullnode',
accelerator: 'Command+H',
selector: 'hide:'
},
{
label: 'Hide Others',
accelerator: 'Command+Shift+H',
selector: 'hideOtherApplications:'
},
{ label: 'Show All', selector: 'unhideAllApplications:' },
{ type: 'separator' },
{
label: 'Quit',
accelerator: 'Command+Q',
click: () => {
app.quit();
}
}
]
};
const subMenuFile = {
label: 'File',
submenu: [
{
label: '&Pay URI',
accelerator: 'Ctrl+P',
click: () => {
mainWindow.webContents.send('payuri');
}
},
{
label: '&Import Private Keys',
click: () => {
mainWindow.webContents.send('import');
}
},
{
label: '&Export All Private Keys',
click: () => {
mainWindow.webContents.send('exportall');
}
},
{ type: 'separator' },
{
label: 'Export All &Transactions',
click: () => {
mainWindow.webContents.send('exportalltx');
}
}
]
};
const subMenuEdit = {
label: 'Edit',
submenu: [
{ label: 'Undo', accelerator: 'Command+Z', selector: 'undo:' },
{ label: 'Redo', accelerator: 'Shift+Command+Z', selector: 'redo:' },
{ type: 'separator' },
{ label: 'Cut', accelerator: 'Command+X', selector: 'cut:' },
{ label: 'Copy', accelerator: 'Command+C', selector: 'copy:' },
{ label: 'Paste', accelerator: 'Command+V', selector: 'paste:' },
{
label: 'Select All',
accelerator: 'Command+A',
selector: 'selectAll:'
}
]
};
const subMenuViewDev = {
label: 'View',
submenu: [
{
label: 'zcashd info',
click: () => {
this.mainWindow.webContents.send('zcashd');
}
},
{ type: 'separator' },
{
label: 'Toggle Developer Tools',
accelerator: 'Alt+Command+I',
click: () => {
this.mainWindow.toggleDevTools();
}
}
]
};
const subMenuViewProd = {
label: 'View',
submenu: [
{
label: 'zcashd info',
click: () => {
this.mainWindow.webContents.send('zcashd');
}
}
]
};
const subMenuWindow = {
label: 'Window',
submenu: [
{
label: 'Minimize',
accelerator: 'Command+M',
selector: 'performMiniaturize:'
},
{ label: 'Close', accelerator: 'Command+W', selector: 'performClose:' },
{ type: 'separator' },
{ label: 'Bring All to Front', selector: 'arrangeInFront:' }
]
};
const subMenuHelp = {
label: 'Help',
submenu: [
{
label: 'Donate',
click() {
mainWindow.webContents.send('donate');
}
},
{
label: 'Check github.com for updates',
click() {
shell.openExternal('https://github.com/zcashfoundation/zecwallet/releases');
}
},
{
label: 'File a bug...',
click() {
shell.openExternal('https://github.com/zcashfoundation/zecwallet/issues');
}
}
]
};
const subMenuView = process.env.NODE_ENV === 'development' ? subMenuViewDev : subMenuViewProd;
return [subMenuAbout, subMenuFile, subMenuEdit, subMenuView, subMenuWindow, subMenuHelp];
}
buildDefaultTemplate() {
const { mainWindow } = this;
const templateDefault = [
{
label: '&File',
submenu: [
{
label: '&Pay URI',
accelerator: 'Ctrl+P',
click: () => {
mainWindow.webContents.send('payuri');
}
},
{
label: '&Import Private Keys...',
click: () => {
mainWindow.webContents.send('import');
}
},
{
label: '&Export All Private Keys',
click: () => {
mainWindow.webContents.send('exportall');
}
},
{ type: 'separator' },
{
label: 'Export All &Transactions',
click: () => {
mainWindow.webContents.send('exportalltx');
}
},
{
label: '&Close',
accelerator: 'Ctrl+W',
click: () => {
this.mainWindow.close();
}
}
]
},
{
label: '&View',
submenu: [
{
label: 'zcashd info',
click: () => {
this.mainWindow.webContents.send('zcashd');
}
}
]
},
{
label: 'Help',
submenu: [
{
label: 'About Zecwallet Fullnode',
click: () => {
mainWindow.webContents.send('about');
}
},
{
label: 'Donate',
click() {
mainWindow.webContents.send('donate');
}
},
{
label: 'Check github.com for updates',
click() {
shell.openExternal('https://github.com/zcashfoundation/zecwallet/releases');
}
},
{
label: 'File a bug...',
click() {
shell.openExternal('https://github.com/zcashfoundation/zecwallet/issues');
}
}
]
}
];
return templateDefault;
}
}
module.exports = MenuBuilder;

BIN
resources/icon.icns Normal file

Binary file not shown.

BIN
resources/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
resources/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

200
resources/logo.svg Normal file
View File

@ -0,0 +1,200 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="210mm"
height="297mm"
viewBox="0 0 210 297"
version="1.1"
id="svg2470"
inkscape:version="0.92.4 (f8dce91, 2019-08-02)"
sodipodi:docname="logo.svg">
<defs
id="defs2464" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.98994949"
inkscape:cx="426.41002"
inkscape:cy="482.96311"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="3440"
inkscape:window-height="1385"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1" />
<metadata
id="metadata2467">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<path
inkscape:connector-curvature="0"
d="M 155.55312,99.149184 H 78.748285 A 7.9192098,7.9192098 0 0 1 73.31741,95.941023 7.0626506,7.0626506 0 0 1 71.453674,92.076628 c -0.13718,-1.177756 0.0525,-2.355512 1.346281,-2.355512 h 69.397205 a 8.5636122,8.5636122 0 0 0 -8.31583,-6.672089 H 71.168142 a 8.5973195,8.5973195 0 0 0 -8.57159,8.57159 v 62.733053 a 8.5953366,8.5953366 0 0 0 8.57159,8.57153 h 82.546938 a 8.5953366,8.5953366 0 0 0 8.57151,-8.57153 v -46.84512 a 8.5953366,8.5953366 0 0 0 -6.73347,-8.359366 z"
id="path1583"
style="stroke-width:1.98277652"
inkscape:export-xdpi="162.81201"
inkscape:export-ydpi="162.81201" />
<path
inkscape:connector-curvature="0"
style="fill:#ffb100;stroke-width:1.98277652"
d="m 131.32552,114.36502 v 20.14504 a 17.448435,17.448435 0 0 1 -9.44193,15.45179 l -9.44201,4.95695 -9.44195,-4.95695 a 17.448435,17.448435 0 0 1 -9.442003,-15.45179 v -20.14504 l 18.883953,-7.41559 z"
id="path1585"
inkscape:export-xdpi="162.81201"
inkscape:export-ydpi="162.81201" />
<polygon
transform="matrix(1.9827766,0,0,1.9827766,-583.04511,-838.02597)"
points="349.786,495.773 350.021,495.773 350.021,495.781 351.507,495.781 351.507,495.773 351.742,495.773 351.742,493.825 354.927,493.825 354.927,491.467 349.99,491.467 354.027,485.91 354.927,484.766 354.927,482.986 351.742,482.986 351.742,481.032 349.786,481.032 349.786,482.986 346.601,482.986 346.601,485.344 351.538,485.344 347.501,490.901 346.601,492.044 346.601,493.825 349.786,493.825 "
id="polygon1587"
inkscape:export-xdpi="162.81201"
inkscape:export-ydpi="162.81201" />
<path
inkscape:connector-curvature="0"
style="fill:#ffb100;stroke-width:1.98277652"
d="m 103.30697,92.031052 h 42.99255 c 0.47959,0 0.95967,0 1.4395,0 a 9.2000839,9.2000839 0 0 1 5.40899,2.775837 c 1.41374,1.189677 2.7362,2.040313 0.47586,2.040313 -29.50177,0 -43.14129,0 -72.642982,0 a 7.2529973,7.2529973 0 0 1 -4.292694,-2.077934 c 0,0 -1.903469,-2.736262 0.396441,-2.738216 z"
id="path1589"
inkscape:export-xdpi="162.81201"
inkscape:export-ydpi="162.81201" />
<path
inkscape:connector-curvature="0"
d="m 34.441137,194.77258 10.034839,-11.63296 h -9.54707 v -4.42952 h 15.889966 v 4.36208 l -9.844484,11.48824 h 10.55036 l -0.67611,4.42954 H 34.441176 Z"
id="path1591"
style="stroke-width:1.98277652" />
<path
inkscape:connector-curvature="0"
d="m 58.983936,190.04366 c 0,2.53595 1.274947,5.01647 4.070659,5.01647 a 3.1942531,3.1942531 0 0 0 3.537295,-2.16719 h 5.621131 a 8.8868054,8.8868054 0 0 1 -9.305159,6.56096 c -6.679965,0 -9.578789,-4.9966 -9.578789,-10.3104 0,-6.36074 3.265638,-10.9053 9.779013,-10.9053 6.963542,0 9.33299,5.03827 9.33299,10.1003 a 12.491493,12.491493 0 0 1 -0.075,1.70914 z m 7.832022,-3.44804 c -0.0375,-2.3615 -0.98148,-4.34822 -3.717761,-4.34822 -2.690627,0 -3.767284,1.85588 -3.997273,4.34822 z"
id="path1593"
style="stroke-width:1.98277652" />
<path
inkscape:connector-curvature="0"
d="m 94.168306,192.43687 a 8.436715,8.436715 0 0 1 -9.120746,7.02303 c -6.311197,0 -9.558992,-4.36217 -9.558992,-10.46314 0,-5.98798 3.654283,-10.7566 9.826681,-10.7566 6.840554,0 8.740056,4.90538 8.849089,7.19951 H 88.684 a 3.1724427,3.1724427 0 0 0 -3.47585,-2.80566 c -2.565704,0 -4.021038,2.24849 -4.021038,6.18033 0,4.31847 1.538589,6.28542 3.997293,6.28542 a 3.4500314,3.4500314 0 0 0 3.465882,-2.66289 z"
id="path1595"
style="stroke-width:1.98277652" />
<path
inkscape:connector-curvature="0"
d="m 98.457111,179.40015 c 2.898809,10.11211 4.584129,15.90578 4.897429,17.62886 h 0.0375 c 0.31325,-1.56638 2.27226,-7.71699 5.32769,-17.62886 h 2.11561 c 3.64439,12.10484 4.74083,15.59251 5.09381,17.12121 h 0.0375 c 0.54931,-2.15527 1.45134,-5.0937 5.05607,-17.12121 h 2.07591 l -6.19014,19.58981 h -2.15534 c -2.11562,-6.93972 -4.66147,-15.43591 -5.05408,-17.24024 h -0.0375 c -0.39644,1.91928 -2.62296,8.92246 -5.17082,17.24024 h -2.35154 l -5.750046,-19.58981 z"
id="path1597"
style="stroke-width:1.98277652" />
<path
inkscape:connector-curvature="0"
d="m 140.2976,195.26831 a 22.496584,22.496584 0 0 0 0.27353,3.72165 h -1.87965 a 12.947532,12.947532 0 0 1 -0.35295,-3.01783 6.4420413,6.4420413 0 0 1 -6.42621,3.48777 5.8333288,5.8333288 0 0 1 -6.50351,-5.877 c 0,-4.31051 3.33107,-6.26951 9.20807,-6.26951 h 3.72165 v -1.99864 c 0,-1.95899 -0.59503,-4.58218 -5.05408,-4.58218 -3.96559,0 -4.54457,2.07591 -4.9748,3.682 h -1.96101 c 0.23605,-2.15525 1.56842,-5.48437 6.97545,-5.48437 4.4652,0 6.97343,1.87963 6.97343,6.19023 z m -1.91928,-6.26961 h -3.84065 c -4.34824,0 -7.05077,1.13617 -7.05077,4.50492 a 4.092451,4.092451 0 0 0 4.50484,4.1638 c 5.60339,0 6.38658,-3.72165 6.38658,-7.95491 z"
id="path1599"
style="stroke-width:1.98277652" />
<path
inkscape:connector-curvature="0"
d="m 146.75948,198.98996 v -28.87717 h 1.95901 v 28.87717 z"
id="path1601"
style="stroke-width:1.98277652" />
<path
inkscape:connector-curvature="0"
d="m 155.14267,198.98996 v -28.87717 h 1.96096 v 28.87717 z"
id="path1603"
style="stroke-width:1.98277652" />
<path
inkscape:connector-curvature="0"
d="m 163.95812,189.42901 c 0.0375,5.05407 2.57761,8.18887 6.34483,8.18887 a 5.514102,5.514102 0 0 0 5.64101,-3.682 h 1.99862 a 7.5107584,7.5107584 0 0 1 -7.71688,5.52402 c -5.94833,0 -8.26824,-5.13344 -8.26824,-10.11219 0,-5.60138 2.7759,-10.41946 8.50219,-10.41946 6.03354,0 7.95483,5.20874 7.95483,8.89271 0,0.54704 0,1.09845 -0.0375,1.60602 z m 12.42012,-1.72302 c -0.0375,-3.88029 -2.15527,-6.93978 -5.99592,-6.93978 -4.03497,0 -5.877,2.82155 -6.30721,6.93978 z"
id="path1605"
style="stroke-width:1.98277652" />
<path
inkscape:connector-curvature="0"
d="m 180.56782,179.40015 h 3.64437 v -6.11291 h 1.95892 v 6.11291 h 4.66156 v 1.84193 h -4.66156 v 12.73142 c 0,2.19498 0.46986,3.45005 2.34965,3.45005 a 7.46912,7.46912 0 0 0 2.03828,-0.23604 v 1.72503 a 6.9397188,6.9397188 0 0 1 -2.42894,0.35071 c -2.50823,0 -3.91791,-1.25314 -3.91791,-4.38793 V 181.2417 h -3.64437 z"
id="path1607"
style="stroke-width:1.98277652" />
<path
inkscape:connector-curvature="0"
d="M 155.55312,99.149184 H 78.748285 A 7.9192098,7.9192098 0 0 1 73.31741,95.941023 7.0626506,7.0626506 0 0 1 71.453674,92.076628 c -0.13718,-1.177756 0.0525,-2.355512 1.346281,-2.355512 h 69.397205 a 8.5636122,8.5636122 0 0 0 -8.31583,-6.672089 H 71.168142 a 8.5973195,8.5973195 0 0 0 -8.57159,8.57159 v 62.733053 a 8.5953366,8.5953366 0 0 0 8.57159,8.57153 h 82.546938 a 8.5953366,8.5953366 0 0 0 8.57151,-8.57153 v -46.84512 a 8.5953366,8.5953366 0 0 0 -6.73347,-8.359366 z"
id="path1583-5"
style="stroke-width:1.98277652"
inkscape:export-xdpi="162.81201"
inkscape:export-ydpi="162.81201" />
<path
inkscape:connector-curvature="0"
style="fill:#ffb100;stroke-width:1.98277652"
d="m 131.32552,114.36502 v 20.14504 a 17.448435,17.448435 0 0 1 -9.44193,15.45179 l -9.44201,4.95695 -9.44195,-4.95695 a 17.448435,17.448435 0 0 1 -9.442003,-15.45179 v -20.14504 l 18.883953,-7.41559 z"
id="path1585-6"
inkscape:export-xdpi="162.81201"
inkscape:export-ydpi="162.81201" />
<polygon
transform="matrix(1.9827766,0,0,1.9827766,-583.04511,-838.02597)"
points="349.786,495.773 350.021,495.773 350.021,495.781 351.507,495.781 351.507,495.773 351.742,495.773 351.742,493.825 354.927,493.825 354.927,491.467 349.99,491.467 354.027,485.91 354.927,484.766 354.927,482.986 351.742,482.986 351.742,481.032 349.786,481.032 349.786,482.986 346.601,482.986 346.601,485.344 351.538,485.344 347.501,490.901 346.601,492.044 346.601,493.825 349.786,493.825 "
id="polygon1587-2"
inkscape:export-xdpi="162.81201"
inkscape:export-ydpi="162.81201" />
<path
inkscape:connector-curvature="0"
style="fill:#ffb100;stroke-width:1.98277652"
d="m 103.30697,92.031052 h 42.99255 c 0.47959,0 0.95967,0 1.4395,0 a 9.2000839,9.2000839 0 0 1 5.40899,2.775837 c 1.41374,1.189677 2.7362,2.040313 0.47586,2.040313 -29.50177,0 -43.14129,0 -72.642982,0 a 7.2529973,7.2529973 0 0 1 -4.292694,-2.077934 c 0,0 -1.903469,-2.736262 0.396441,-2.738216 z"
id="path1589-9"
inkscape:export-xdpi="162.81201"
inkscape:export-ydpi="162.81201" />
<path
inkscape:connector-curvature="0"
d="m 34.441137,194.77258 10.034839,-11.63296 h -9.54707 v -4.42952 h 15.889966 v 4.36208 l -9.844484,11.48824 h 10.55036 l -0.67611,4.42954 H 34.441176 Z"
id="path1591-1"
style="stroke-width:1.98277652" />
<path
inkscape:connector-curvature="0"
d="m 58.983936,190.04366 c 0,2.53595 1.274947,5.01647 4.070659,5.01647 a 3.1942531,3.1942531 0 0 0 3.537295,-2.16719 h 5.621131 a 8.8868054,8.8868054 0 0 1 -9.305159,6.56096 c -6.679965,0 -9.578789,-4.9966 -9.578789,-10.3104 0,-6.36074 3.265638,-10.9053 9.779013,-10.9053 6.963542,0 9.33299,5.03827 9.33299,10.1003 a 12.491493,12.491493 0 0 1 -0.075,1.70914 z m 7.832022,-3.44804 c -0.0375,-2.3615 -0.98148,-4.34822 -3.717761,-4.34822 -2.690627,0 -3.767284,1.85588 -3.997273,4.34822 z"
id="path1593-2"
style="stroke-width:1.98277652" />
<path
inkscape:connector-curvature="0"
d="m 94.168306,192.43687 a 8.436715,8.436715 0 0 1 -9.120746,7.02303 c -6.311197,0 -9.558992,-4.36217 -9.558992,-10.46314 0,-5.98798 3.654283,-10.7566 9.826681,-10.7566 6.840554,0 8.740056,4.90538 8.849089,7.19951 H 88.684 a 3.1724427,3.1724427 0 0 0 -3.47585,-2.80566 c -2.565704,0 -4.021038,2.24849 -4.021038,6.18033 0,4.31847 1.538589,6.28542 3.997293,6.28542 a 3.4500314,3.4500314 0 0 0 3.465882,-2.66289 z"
id="path1595-7"
style="stroke-width:1.98277652" />
<path
inkscape:connector-curvature="0"
d="m 98.457111,179.40015 c 2.898809,10.11211 4.584129,15.90578 4.897429,17.62886 h 0.0375 c 0.31325,-1.56638 2.27226,-7.71699 5.32769,-17.62886 h 2.11561 c 3.64439,12.10484 4.74083,15.59251 5.09381,17.12121 h 0.0375 c 0.54931,-2.15527 1.45134,-5.0937 5.05607,-17.12121 h 2.07591 l -6.19014,19.58981 h -2.15534 c -2.11562,-6.93972 -4.66147,-15.43591 -5.05408,-17.24024 h -0.0375 c -0.39644,1.91928 -2.62296,8.92246 -5.17082,17.24024 h -2.35154 l -5.750046,-19.58981 z"
id="path1597-0"
style="stroke-width:1.98277652" />
<path
inkscape:connector-curvature="0"
d="m 140.2976,195.26831 a 22.496584,22.496584 0 0 0 0.27353,3.72165 h -1.87965 a 12.947532,12.947532 0 0 1 -0.35295,-3.01783 6.4420413,6.4420413 0 0 1 -6.42621,3.48777 5.8333288,5.8333288 0 0 1 -6.50351,-5.877 c 0,-4.31051 3.33107,-6.26951 9.20807,-6.26951 h 3.72165 v -1.99864 c 0,-1.95899 -0.59503,-4.58218 -5.05408,-4.58218 -3.96559,0 -4.54457,2.07591 -4.9748,3.682 h -1.96101 c 0.23605,-2.15525 1.56842,-5.48437 6.97545,-5.48437 4.4652,0 6.97343,1.87963 6.97343,6.19023 z m -1.91928,-6.26961 h -3.84065 c -4.34824,0 -7.05077,1.13617 -7.05077,4.50492 a 4.092451,4.092451 0 0 0 4.50484,4.1638 c 5.60339,0 6.38658,-3.72165 6.38658,-7.95491 z"
id="path1599-9"
style="stroke-width:1.98277652" />
<path
inkscape:connector-curvature="0"
d="m 146.75948,198.98996 v -28.87717 h 1.95901 v 28.87717 z"
id="path1601-3"
style="stroke-width:1.98277652" />
<path
inkscape:connector-curvature="0"
d="m 155.14267,198.98996 v -28.87717 h 1.96096 v 28.87717 z"
id="path1603-6"
style="stroke-width:1.98277652" />
<path
inkscape:connector-curvature="0"
d="m 163.95812,189.42901 c 0.0375,5.05407 2.57761,8.18887 6.34483,8.18887 a 5.514102,5.514102 0 0 0 5.64101,-3.682 h 1.99862 a 7.5107584,7.5107584 0 0 1 -7.71688,5.52402 c -5.94833,0 -8.26824,-5.13344 -8.26824,-10.11219 0,-5.60138 2.7759,-10.41946 8.50219,-10.41946 6.03354,0 7.95483,5.20874 7.95483,8.89271 0,0.54704 0,1.09845 -0.0375,1.60602 z m 12.42012,-1.72302 c -0.0375,-3.88029 -2.15527,-6.93978 -5.99592,-6.93978 -4.03497,0 -5.877,2.82155 -6.30721,6.93978 z"
id="path1605-0"
style="stroke-width:1.98277652" />
<path
inkscape:connector-curvature="0"
d="m 180.56782,179.40015 h 3.64437 v -6.11291 h 1.95892 v 6.11291 h 4.66156 v 1.84193 h -4.66156 v 12.73142 c 0,2.19498 0.46986,3.45005 2.34965,3.45005 a 7.46912,7.46912 0 0 0 2.03828,-0.23604 v 1.72503 a 6.9397188,6.9397188 0 0 1 -2.42894,0.35071 c -2.50823,0 -3.91791,-1.25314 -3.91791,-4.38793 V 181.2417 h -3.64437 z"
id="path1607-6"
style="stroke-width:1.98277652" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 14 KiB

BIN
resources/screenshot1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
resources/screenshot2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

View File

@ -340,24 +340,31 @@ export default class RouteApp extends React.Component<Props, AppState> {
createNewAddress = async (type: AddressType) => {
if (!this.rpc) {
return;
return;
}
// Create a new address
const newaddress = await this.rpc.createNewAddress(type);
console.log(`Created new Address ${newaddress}`);
try {
const newaddress = await this.rpc.createNewAddress(type);
console.log(`Created new Address ${newaddress}`);
// And then fetch the list of addresses again to refresh
this.rpc.fetchAllAddresses();
// And then fetch the list of addresses again to refresh
this.rpc.fetchAllAddresses();
const { receivePageState } = this.state;
const newRerenderKey = receivePageState.rerenderKey + 1;
const { receivePageState } = this.state;
const newRerenderKey = receivePageState.rerenderKey + 1;
const newReceivePageState = new ReceivePageState();
newReceivePageState.newAddress = newaddress;
newReceivePageState.rerenderKey = newRerenderKey;
const newReceivePageState = new ReceivePageState();
newReceivePageState.newAddress = newaddress;
newReceivePageState.rerenderKey = newRerenderKey;
this.setState({ receivePageState: newReceivePageState });
this.setState({ receivePageState: newReceivePageState });
} catch (e) {
this.openErrorModal("Failed to Create Address", <div>
Couldn't create a new address. Please make sure your wallet has been initialized by running<br/>
"zcashd-wallet-tool"
</div>)
}
};
doRefresh = () => {
@ -398,7 +405,7 @@ export default class RouteApp extends React.Component<Props, AppState> {
/>
<div style={{ overflow: "hidden" }}>
{info && info.version && (
{(info && info.version > 0) && (
<div className={cstyles.sidebarcontainer}>
<Sidebar
getPrivKeyAsString={this.getPrivKeyAsString}
@ -482,7 +489,7 @@ export default class RouteApp extends React.Component<Props, AppState> {
/>
<Route
path={routes.LOADING}
path="*"
element={
<LoadingScreen
setRPCConfig={this.setRPCConfig}

View File

@ -1,5 +1,3 @@
/* eslint-disable jsx-a11y/interactive-supports-focus */
/* eslint-disable jsx-a11y/click-events-have-key-events */
/* eslint-disable max-classes-per-file */
import React, { Component } from "react";
import { ChildProcessWithoutNullStreams } from "child_process";
@ -8,7 +6,6 @@ import { RPCConfig, Info } from "./AppState";
import RPC from "../rpc";
import cstyles from "./Common.module.css";
import styles from "./LoadingScreen.module.css";
import { NO_CONNECTION } from "../utils/utils";
import Logo from "../assets/img/logobig.png";
import zcashdlogo from "../assets/img/zcashdlogo.gif";
import { Navigate } from "react-router-dom";
@ -116,6 +113,7 @@ class LoadingScreen extends Component<Props, LoadingScreenState> {
// this.startZcashd();
// this.setupNextGetInfo();
console.log("Cannot start zcashd because it is not supported yet");
this.setState({currentStatus: <div>{errString}<br/>Please make sure zcashd is running.</div>});
}
if (noConnection && zcashdSpawned && getinfoRetryCount < 10) {
@ -178,6 +176,7 @@ class LoadingScreen extends Component<Props, LoadingScreenState> {
<img src={Logo} width="200px;" alt="Logo" />
</div>
<div>{currentStatus}</div>
<div></div>
</div>
)}

View File

@ -276,7 +276,7 @@ class Sidebar extends PureComponent<Props, State> {
"Zecwallet Fullnode",
<div className={cstyles.verticalflex}>
<div className={cstyles.margintoplarge}>
Zecwallet Fullnode v1.7.8
Zecwallet Fullnode v1.8.0-beta1
</div>
<div className={cstyles.margintoplarge}>
Built with Electron. Copyright (c) 2018-2021, Aditya Kulkarni.

View File

@ -267,8 +267,17 @@ export default class RPC {
this.fnSetTotalBalance(balance);
}
async createNewAddress(type: AddressType) {
if (type === AddressType.unified) {
async createNewAddress(type: AddressType): Promise<string> {
if (type === AddressType.unified) {
// First make sure that at least one account has been created.
const accounts = await RPC.doRPC("z_listaccounts", [], this.rpcConfig);
if (accounts.result.length === 0) {
// Create a new account
const newAcct = await RPC.doRPC("z_getnewaccount", [], this.rpcConfig);
console.log(`New account : ${newAcct.result}`);
}
const newaddress = await RPC.doRPC(
"z_getaddressforaccount",
[0],