diff --git a/.gitignore b/.gitignore index 8e0d7001..334a71bb 100644 --- a/.gitignore +++ b/.gitignore @@ -26,5 +26,5 @@ bin/ electrum_data/ gui/kivy/theming/light-0.png gui/kivy/theming/light.atlas -Electrum_Zcash.egg-info/ +Electrum_Zclassic.egg-info/ .pytest_cache diff --git a/.travis.yml b/.travis.yml index 832b78a4..f3f28baa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,9 +22,9 @@ matrix: os: linux python: "3.6" before_install: -- source contrib/zcash/travis/electrum_zcash_version_env.sh -- echo electrum-zcash version is $ELECTRUM_ZCASH_VERSION -- mkdir -p build && cp contrib/zcash/travis/* ./build/ +- source contrib/zclassic/travis/electrum_zclassic_version_env.sh +- echo electrum-zclassic version is $ELECTRUM_ZCL_VERSION +- mkdir -p build && cp contrib/zclassic/travis/* ./build/ - if [[ -n $TRAVIS_TAG ]] && [[ $TRAVIS_OS_NAME == 'osx' ]]; then ./build/before_install-osx.sh; fi @@ -56,20 +56,20 @@ deploy: api_key: secure: G+TcxPJSQQ2bTNhkTX4aofnsiNFrzbuFTGty/+jIKDb/IQ69etXS9Ulu8KGD71VjEdXugFWdus+2a8fFSCSg79+AvrSxKa1ztXQ2q6tmovRkUcnF5Bkbc+ORLm3+FMZhonvMg+MLnHS3hnvJL/CZU0Pn2dkfODn7/t+MsGs99MN0G44qimq+FCu+YHaKVcGgiTs1I6nextIH+lnPw5qE6VxTQKdFp4PTHqY1qZJWamReVvtyMnfGpa+QwcKf43dXzZrHMLfFprfzEi1DExrhRi0a8RZlFWmAtkwH9zzJXzqOEmivniLfeALJzWkBJG4I2Fu7QSQhvPllhnt5uGdV3pgmHZUxL1DZckrqVG5b6P/Cnmbu0hWXbkPpZ7sXQ4X7wGhAVgH2sRPF1SfE9XvqDsmKvpspdKGmI+9yKoaWekbt8igfJ8jRBK4yRJAt+F/waeXkj7HJhSPIYg9wNvYCnCmoih4brRcTE4nyJBo/ySY3DVocflS3QGoClOrBpwXGgzwaUzBamRhJeCUe9ockPJyUs9DkuBIdsPfhq0nZfZFMhNBtpzm1hPGE92NojUi+DcI12WqweUqDWZzY/02MmfHLeN6mGgjTWvgOwnq1fvc6s7sVy7nANtA6UseWF2KUBYfuMKAxTU4WadpZ102znz4XiL4B7TILKJMU+Ht+a+c= file: - - build/electrum-zcash/dist/electrum-zcash-$ELECTRUM_ZCASH_VERSION-macosx.dmg + - build/electrum-zclassic/dist/electrum-zclassic-$ELECTRUM_ZCL_VERSION-macosx.dmg on: - repo: zebra-lucky/electrum-zcash + repo: zebra-lucky/electrum-zclassic tags: true condition: "$TRAVIS_OS_NAME = osx" - provider: releases api_key: secure: G+TcxPJSQQ2bTNhkTX4aofnsiNFrzbuFTGty/+jIKDb/IQ69etXS9Ulu8KGD71VjEdXugFWdus+2a8fFSCSg79+AvrSxKa1ztXQ2q6tmovRkUcnF5Bkbc+ORLm3+FMZhonvMg+MLnHS3hnvJL/CZU0Pn2dkfODn7/t+MsGs99MN0G44qimq+FCu+YHaKVcGgiTs1I6nextIH+lnPw5qE6VxTQKdFp4PTHqY1qZJWamReVvtyMnfGpa+QwcKf43dXzZrHMLfFprfzEi1DExrhRi0a8RZlFWmAtkwH9zzJXzqOEmivniLfeALJzWkBJG4I2Fu7QSQhvPllhnt5uGdV3pgmHZUxL1DZckrqVG5b6P/Cnmbu0hWXbkPpZ7sXQ4X7wGhAVgH2sRPF1SfE9XvqDsmKvpspdKGmI+9yKoaWekbt8igfJ8jRBK4yRJAt+F/waeXkj7HJhSPIYg9wNvYCnCmoih4brRcTE4nyJBo/ySY3DVocflS3QGoClOrBpwXGgzwaUzBamRhJeCUe9ockPJyUs9DkuBIdsPfhq0nZfZFMhNBtpzm1hPGE92NojUi+DcI12WqweUqDWZzY/02MmfHLeN6mGgjTWvgOwnq1fvc6s7sVy7nANtA6UseWF2KUBYfuMKAxTU4WadpZ102znz4XiL4B7TILKJMU+Ht+a+c= file: - - build/electrum-zcash/dist/Electrum-Zcash-$ELECTRUM_ZCASH_VERSION.tar.gz - - build/electrum-zcash/dist/electrum-zcash-$ELECTRUM_ZCASH_VERSION-setup-win32.exe - - build/electrum-zcash/dist/electrum-zcash-$ELECTRUM_ZCASH_VERSION-setup-win64.exe - - build/electrum-zcash/bin/Electrum_Zcash-$ELECTRUM_ZCASH_APK_VERSION-release-unsigned.apk + - build/electrum-zclassic/dist/Electrum-Zclassic-$ELECTRUM_ZCL_VERSION.tar.gz + - build/electrum-zclassic/dist/electrum-zclassic-$ELECTRUM_ZCL_VERSION-setup-win32.exe + - build/electrum-zclassic/dist/electrum-zclassic-$ELECTRUM_ZCL_VERSION-setup-win64.exe + - build/electrum-zclassic/bin/Electrum_Zclassic-$ELECTRUM_ZCL_APK_VERSION-release-unsigned.apk on: - repo: zebra-lucky/electrum-zcash + repo: zebra-lucky/electrum-zclassic tags: true condition: "$TRAVIS_OS_NAME = linux" diff --git a/MANIFEST.in b/MANIFEST.in index 0588184b..84698f05 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,9 +1,9 @@ include LICENCE RELEASE-NOTES AUTHORS include README.rst -include electrum-zcash.conf.sample -include electrum-zcash.desktop +include electrum-zclassic.conf.sample +include electrum-zclassic.desktop include *.py -include electrum-zcash +include electrum-zclassic include contrib/requirements/requirements.txt include contrib/requirements/requirements-hw.txt recursive-include lib *.py diff --git a/README.rst b/README.rst index f4f96183..86ee018d 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,4 @@ -Electrum-Zcash - Lightweight Zcash client +Electrum-Zclassic - Lightweight Zclassic client ===================================== :: @@ -6,11 +6,11 @@ Electrum-Zcash - Lightweight Zcash client Licence: MIT Licence Author: Thomas Voegtlin Language: Python - Homepage: https://github.com/zebra-lucky/electrum-zcash + Homepage: https://github.com/zebra-lucky/electrum-zclassic -.. image:: https://travis-ci.org/zebra-lucky/electrum-zcash.svg?branch=master - :target: https://travis-ci.org/zebra-lucky/electrum-zcash +.. image:: https://travis-ci.org/zebra-lucky/electrum-zclassic.svg?branch=master + :target: https://travis-ci.org/zebra-lucky/electrum-zclassic :alt: Build Status @@ -20,30 +20,30 @@ Electrum-Zcash - Lightweight Zcash client Getting started =============== -Electrum-Zcash is a pure python application. If you want to use the +Electrum-Zclassic is a pure python application. If you want to use the Qt interface, install the Qt dependencies:: sudo apt-get install python3-pyqt5 If you downloaded the official package (tar.gz), you can run -Electrum-Zcash from its root directory, without installing it on your +Electrum-Zclassic from its root directory, without installing it on your system; all the python dependencies are included in the 'packages' -directory. To run Electrum-Zcash from its root directory, just do:: +directory. To run Electrum-Zclassic from its root directory, just do:: - ./electrum-zcash + ./electrum-zclassic -You can also install Electrum-Zcash on your system, by running this command:: +You can also install Electrum-Zclassic on your system, by running this command:: sudo apt-get install python3-setuptools pip3 install .[full] This will download and install the Python dependencies used by -Electrum-Zcash, instead of using the 'packages' directory. +Electrum-Zclassic, instead of using the 'packages' directory. The 'full' extra contains some optional dependencies that we think are often useful but they are not strictly needed. If you cloned the git repository, you need to compile extra files -before you can run Electrum-Zcash. Read the next section, "Development +before you can run Electrum-Zclassic. Read the next section, "Development Version". @@ -53,8 +53,8 @@ Development version Check out the code from GitHub:: - git clone git://github.com/zebra-lucky/electrum-zcash.git - cd electrum-zcash + git clone git://github.com/zebra-lucky/electrum-zclassic.git + cd electrum-zclassic Run install (this should install dependencies):: @@ -86,7 +86,7 @@ To create binaries, create the 'packages' directory:: ./contrib/make_packages -This directory contains the python dependencies used by Electrum-Zcash. +This directory contains the python dependencies used by Electrum-Zclassic. Android ------- diff --git a/contrib/sign-releases.py b/contrib/sign-releases.py index 4978795a..8a35310d 100755 --- a/contrib/sign-releases.py +++ b/contrib/sign-releases.py @@ -27,9 +27,9 @@ Manual signing: jarsigner -verbose \ -tsa http://sha256timestamp.ws.symantec.com/sha256/timestamp \ -sigalg SHA1withRSA -digestalg SHA1 \ - -sigfile zcash-electrum \ + -sigfile zclassic-electrum \ -keystore ~/.jks/keystore \ - Electrum_Zcash-3.0.6.1-release-unsigned.apk \ + Electrum_Zclassic-3.0.6.1-release-unsigned.apk \ electrum.z.cash Zipalign from Android SDK build tools is also required (set path to bin in @@ -48,8 +48,8 @@ settings file or with key -z). To install: Manual zip aligning: android-sdk-linux/build-tools/27.0.3/zipalign -v 4 \ - Electrum_Zcash-3.0.6.1-release-unsigned.apk \ - Electrum_Zcash-3.0.6.1-release.apk + Electrum_Zclassic-3.0.6.1-release-unsigned.apk \ + Electrum_Zclassic-3.0.6.1-release.apk @@ -143,9 +143,9 @@ PEP440_PUBVER_PATTERN = re.compile('^((\d+)!)?' '([a-zA-Z]+\d+)?' '((\.[a-zA-Z]+\d+)*)$') REL_NOTES_PATTERN = re.compile('^#.+?(^[^#].+?)^#.+?', re.M | re.S) -SDIST_NAME_PATTERN = re.compile('^Electrum-Zcash-(.*).tar.gz$') -SDIST_DIR_TEMPLATE = 'Electrum-Zcash-{version}' -PPA_SOURCE_NAME = 'electrum-zcash' +SDIST_NAME_PATTERN = re.compile('^Electrum-Zclassic-(.*).tar.gz$') +SDIST_DIR_TEMPLATE = 'Electrum-Zclassic-{version}' +PPA_SOURCE_NAME = 'electrum-zclassic' PPA_ORIG_NAME_TEMPLATE = '%s_{version}.orig.tar.gz' % PPA_SOURCE_NAME CHANGELOG_TEMPLATE = """%s ({ppa_version}) {series}; urgency=medium {changes} -- {uid} {time}""" % PPA_SOURCE_NAME @@ -164,12 +164,12 @@ JARSIGNER_ARGS = [ 'jarsigner', '-verbose', '-tsa', 'http://sha256timestamp.ws.symantec.com/sha256/timestamp', '-sigalg', 'SHA1withRSA', '-digestalg', 'SHA1', - '-sigfile', 'zcash-electrum', + '-sigfile', 'zclassic-electrum', '-storepass:env', JKS_STOREPASS, '-keypass:env', JKS_KEYPASS, ] -UNSIGNED_APK_PATTERN = re.compile('^Electrum_Zcash-(.*)-release-unsigned.apk$') -SIGNED_APK_TEMPLATE = 'Electrum_Zcash-{version}-release.apk' +UNSIGNED_APK_PATTERN = re.compile('^Electrum_Zclassic-(.*)-release-unsigned.apk$') +SIGNED_APK_TEMPLATE = 'Electrum_Zclassic-{version}-release.apk' os.environ['QUILT_PATCHES'] = 'debian/patches' diff --git a/contrib/zcash/travis/electrum_zcash_version_env.sh b/contrib/zcash/travis/electrum_zcash_version_env.sh deleted file mode 100755 index 79cc4f57..00000000 --- a/contrib/zcash/travis/electrum_zcash_version_env.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -VERSION_STRING=(`grep ELECTRUM_VERSION lib/version.py`) -ELECTRUM_ZCASH_VERSION=${VERSION_STRING[2]} -ELECTRUM_ZCASH_VERSION=${ELECTRUM_ZCASH_VERSION#\'} -ELECTRUM_ZCASH_VERSION=${ELECTRUM_ZCASH_VERSION%\'} -DOTS=`echo $ELECTRUM_ZCASH_VERSION | grep -o "\." | wc -l` -if [[ $DOTS -lt 3 ]]; then - ELECTRUM_ZCASH_APK_VERSION=$ELECTRUM_ZCASH_VERSION.0 -else - ELECTRUM_ZCASH_APK_VERSION=$ELECTRUM_ZCASH_VERSION -fi -export ELECTRUM_ZCASH_VERSION -export ELECTRUM_ZCASH_APK_VERSION diff --git a/contrib/zcash/btc2zcash.py b/contrib/zclassic/btc2zclassic.py similarity index 99% rename from contrib/zcash/btc2zcash.py rename to contrib/zclassic/btc2zclassic.py index c23f3f22..0090cb2b 100755 --- a/contrib/zcash/btc2zcash.py +++ b/contrib/zclassic/btc2zclassic.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -"""Search and replaces BTC addresses and private keys in WIF to Zcash variant""" +"""Search and replaces BTC addresses and private keys in WIF to Zclassic variant""" import click import imp diff --git a/contrib/zcash/deterministic.spec b/contrib/zclassic/deterministic.spec similarity index 82% rename from contrib/zcash/deterministic.spec rename to contrib/zclassic/deterministic.spec index b25f0bb5..4116f230 100644 --- a/contrib/zcash/deterministic.spec +++ b/contrib/zclassic/deterministic.spec @@ -38,12 +38,12 @@ hiddenimports += [ ] datas = [ - ('lib/servers.json', 'electrum_zcash'), - ('lib/servers_testnet.json', 'electrum_zcash'), - ('lib/servers_regtest.json', 'electrum_zcash'), - ('lib/currencies.json', 'electrum_zcash'), - ('lib/locale', 'electrum_zcash/locale'), - ('lib/wordlist', 'electrum_zcash/wordlist'), + ('lib/servers.json', 'electrum_zclassic'), + ('lib/servers_testnet.json', 'electrum_zclassic'), + ('lib/servers_regtest.json', 'electrum_zclassic'), + ('lib/currencies.json', 'electrum_zclassic'), + ('lib/locale', 'electrum_zclassic/locale'), + ('lib/wordlist', 'electrum_zclassic/wordlist'), ('C:\\zbarw', '.'), ] datas += collect_data_files('trezorlib') @@ -88,7 +88,7 @@ excludes += [ 'PyQt5.QtWinExtras', ] -a = Analysis(['electrum-zcash'], +a = Analysis(['electrum-zclassic'], pathex=['plugins'], hiddenimports=hiddenimports, datas=datas, @@ -102,14 +102,14 @@ for d in a.datas: a.datas.remove(d) break -# Add TOC to electrum_zcash, electrum_zcash_gui, electrum_zcash_plugins +# Add TOC to electrum_zclassic, electrum_zclassic_gui, electrum_zclassic_plugins for p in sorted(a.pure): if p[0].startswith('lib') and p[2] == 'PYMODULE': - a.pure += [('electrum_zcash%s' % p[0][3:] , p[1], p[2])] + a.pure += [('electrum_zclassic%s' % p[0][3:] , p[1], p[2])] if p[0].startswith('gui') and p[2] == 'PYMODULE': - a.pure += [('electrum_zcash_gui%s' % p[0][3:] , p[1], p[2])] + a.pure += [('electrum_zclassic_gui%s' % p[0][3:] , p[1], p[2])] if p[0].startswith('plugins') and p[2] == 'PYMODULE': - a.pure += [('electrum_zcash_plugins%s' % p[0][7:] , p[1], p[2])] + a.pure += [('electrum_zclassic_plugins%s' % p[0][7:] , p[1], p[2])] pyz = PYZ(a.pure) @@ -120,7 +120,7 @@ exe = EXE(pyz, strip=False, upx=False, console=False, - icon='icons/electrum-zcash.ico', + icon='icons/electrum-zclassic.ico', name=os.path.join('build\\pyi.win32\\electrum', cmdline_name)) # exe with console output @@ -131,7 +131,7 @@ conexe = EXE(pyz, strip=False, upx=False, console=True, - icon='icons/electrum-zcash.ico', + icon='icons/electrum-zclassic.ico', name=os.path.join('build\\pyi.win32\\electrum', 'console-%s' % cmdline_name)) @@ -157,4 +157,4 @@ coll = COLLECT(exe, conexe, tctl_exe, a.datas, strip=False, upx=False, - name=os.path.join('dist', 'electrum-zcash')) + name=os.path.join('dist', 'electrum-zclassic')) diff --git a/contrib/zcash/electrum-zcash.nsi b/contrib/zclassic/electrum-zclassic.nsi similarity index 85% rename from contrib/zcash/electrum-zcash.nsi rename to contrib/zclassic/electrum-zclassic.nsi index 7e742048..ed9ca1c3 100644 --- a/contrib/zcash/electrum-zcash.nsi +++ b/contrib/zclassic/electrum-zclassic.nsi @@ -3,12 +3,12 @@ !include "TextFunc.nsh" ;Needed for the $GetSize function. I know, doesn't sound logical, it isn't. !include "MUI2.nsh" !include "x64.nsh" - + ;-------------------------------- ;Variables - !define PRODUCT_NAME "Electrum-Zcash" - !define PRODUCT_WEB_SITE "https://github.com/zebra-lucky/electrum-zcash" + !define PRODUCT_NAME "Electrum-Zclassic" + !define PRODUCT_WEB_SITE "https://github.com/zebra-lucky/electrum-zclassic" !define PRODUCT_PUBLISHER "Electrum Technologies GmbH" !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" !define BUILD_ARCH "${WINEARCH}" @@ -18,7 +18,7 @@ ;Name and file Name "${PRODUCT_NAME}" - OutFile "dist/electrum-zcash-${PRODUCT_VERSION}-setup-${BUILD_ARCH}.exe" + OutFile "dist/electrum-zclassic-${PRODUCT_VERSION}-setup-${BUILD_ARCH}.exe" ;Default installation folder InstallDir "$PROGRAMFILES\${PRODUCT_NAME}" @@ -31,31 +31,31 @@ ;Specifies whether or not the installer will perform a CRC on itself before allowing an install CRCCheck on - + ;Sets whether or not the details of the install are shown. Can be 'hide' (the default) to hide the details by default, allowing the user to view them, or 'show' to show them by default, or 'nevershow', to prevent the user from ever seeing them. ShowInstDetails show - + ;Sets whether or not the details of the uninstall are shown. Can be 'hide' (the default) to hide the details by default, allowing the user to view them, or 'show' to show them by default, or 'nevershow', to prevent the user from ever seeing them. ShowUninstDetails show - + ;Sets the colors to use for the install info screen (the default is 00FF00 000000. Use the form RRGGBB (in hexadecimal, as in HTML, only minus the leading '#', since # can be used for comments). Note that if "/windows" is specified as the only parameter, the default windows colors will be used. InstallColors /windows - + ;This command sets the compression algorithm used to compress files/data in the installer. (http://nsis.sourceforge.net/Reference/SetCompressor) SetCompressor /SOLID lzma - + ;Sets the dictionary size in megabytes (MB) used by the LZMA compressor (default is 8 MB). SetCompressorDictSize 64 - + ;Sets the text that is shown (by default it is 'Nullsoft Install System vX.XX') in the bottom of the install window. Setting this to an empty string ("") uses the default; to set the string to blank, use " " (a space). - BrandingText "${PRODUCT_NAME} Installer v${PRODUCT_VERSION}" - + BrandingText "${PRODUCT_NAME} Installer v${PRODUCT_VERSION}" + ;Sets what the titlebars of the installer will display. By default, it is 'Name Setup', where Name is specified with the Name command. You can, however, override it with 'MyApp Installer' or whatever. If you specify an empty string (""), the default will be used (you can however specify " " to achieve a blank string) Caption "${PRODUCT_NAME}" ;Adds the Product Version on top of the Version Tab in the Properties of the file. VIProductVersion 1.0.0.0 - + ;VIAddVersionKey - Adds a field in the Version Tab of the File Properties. This can either be a field provided by the system or a user defined field. VIAddVersionKey ProductName "${PRODUCT_NAME} Installer" VIAddVersionKey Comments "The installer for ${PRODUCT_NAME}" @@ -65,7 +65,7 @@ VIAddVersionKey FileVersion ${PRODUCT_VERSION} VIAddVersionKey ProductVersion ${PRODUCT_VERSION} VIAddVersionKey InternalName "${PRODUCT_NAME} Installer" - VIAddVersionKey LegalTrademarks "${PRODUCT_NAME} is a trademark of ${PRODUCT_PUBLISHER}" + VIAddVersionKey LegalTrademarks "${PRODUCT_NAME} is a trademark of ${PRODUCT_PUBLISHER}" VIAddVersionKey OriginalFilename "${PRODUCT_NAME}.exe" ;-------------------------------- @@ -73,9 +73,9 @@ !define MUI_ABORTWARNING !define MUI_ABORTWARNING_TEXT "Are you sure you wish to abort the installation of ${PRODUCT_NAME}?" - - !define MUI_ICON "icons\electrum-zcash.ico" - + + !define MUI_ICON "icons\electrum-zclassic.ico" + ;-------------------------------- ;Pages @@ -122,8 +122,8 @@ Section Delete "$SMPROGRAMS\${PRODUCT_NAME}\*.*" ;Files to pack into the installer - File /r "dist\electrum-zcash\*.*" - File "icons\electrum-zcash.ico" + File /r "dist\electrum-zclassic\*.*" + File "icons\electrum-zclassic.ico" ;Store installation folder WriteRegStr HKCU "Software\${PRODUCT_NAME}" "" $INSTDIR @@ -134,21 +134,21 @@ Section ;Create desktop shortcut DetailPrint "Creating desktop shortcut..." - CreateShortCut "$DESKTOP\${PRODUCT_NAME}.lnk" "$INSTDIR\electrum-zcash-${PRODUCT_VERSION}.exe" "" + CreateShortCut "$DESKTOP\${PRODUCT_NAME}.lnk" "$INSTDIR\electrum-zclassic-${PRODUCT_VERSION}.exe" "" ;Create start-menu items DetailPrint "Creating start-menu items..." CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}" CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall.lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0 - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME}.lnk" "$INSTDIR\electrum-zcash-${PRODUCT_VERSION}.exe" "" "$INSTDIR\electrum-zcash-${PRODUCT_VERSION}.exe" 0 - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME} Testnet.lnk" "$INSTDIR\electrum-zcash-${PRODUCT_VERSION}.exe" "--testnet" "$INSTDIR\electrum-zcash-${PRODUCT_VERSION}.exe" 0 + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME}.lnk" "$INSTDIR\electrum-zclassic-${PRODUCT_VERSION}.exe" "" "$INSTDIR\electrum-zclassic-${PRODUCT_VERSION}.exe" 0 + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME} Testnet.lnk" "$INSTDIR\electrum-zclassic-${PRODUCT_VERSION}.exe" "--testnet" "$INSTDIR\electrum-zclassic-${PRODUCT_VERSION}.exe" 0 - ;Links zcash: URI's to Electrum - WriteRegStr HKCU "Software\Classes\zcash" "" "URL:zcash Protocol" - WriteRegStr HKCU "Software\Classes\zcash" "URL Protocol" "" - WriteRegStr HKCU "Software\Classes\zcash" "DefaultIcon" "$\"$INSTDIR\electrum-zcash.ico, 0$\"" - WriteRegStr HKCU "Software\Classes\zcash\shell\open\command" "" "$\"$INSTDIR\electrum-zcash-${PRODUCT_VERSION}.exe$\" $\"%1$\"" + ;Links zclassic: URI's to Electrum + WriteRegStr HKCU "Software\Classes\zclassic" "" "URL:zclassic Protocol" + WriteRegStr HKCU "Software\Classes\zclassic" "URL Protocol" "" + WriteRegStr HKCU "Software\Classes\zclassic" "DefaultIcon" "$\"$INSTDIR\electrum-zclassic.ico, 0$\"" + WriteRegStr HKCU "Software\Classes\zclassic\shell\open\command" "" "$\"$INSTDIR\electrum-zclassic-${PRODUCT_VERSION}.exe$\" $\"%1$\"" ;Adds an uninstaller possibility to Windows Uninstall or change a program section WriteRegStr HKCU "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" @@ -156,7 +156,7 @@ Section WriteRegStr HKCU "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" WriteRegStr HKCU "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" WriteRegStr HKCU "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}" - WriteRegStr HKCU "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\electrum-zcash.ico" + WriteRegStr HKCU "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\electrum-zclassic.ico" ;Fixes Windows broken size estimates ${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2 @@ -178,8 +178,8 @@ Section "Uninstall" Delete "$DESKTOP\${PRODUCT_NAME}.lnk" Delete "$SMPROGRAMS\${PRODUCT_NAME}\*.*" RMDir "$SMPROGRAMS\${PRODUCT_NAME}" - - DeleteRegKey HKCU "Software\Classes\zcash" + + DeleteRegKey HKCU "Software\Classes\zclassic" DeleteRegKey HKCU "Software\${PRODUCT_NAME}" DeleteRegKey HKCU "${PRODUCT_UNINST_KEY}" SectionEnd diff --git a/contrib/zcash/osx.spec b/contrib/zclassic/osx.spec similarity index 76% rename from contrib/zcash/osx.spec rename to contrib/zclassic/osx.spec index 9d43e2f9..766a4fbb 100644 --- a/contrib/zcash/osx.spec +++ b/contrib/zclassic/osx.spec @@ -42,12 +42,12 @@ hiddenimports += [ ] datas = [ - ('lib/servers.json', 'electrum_zcash'), - ('lib/servers_testnet.json', 'electrum_zcash'), - ('lib/servers_regtest.json', 'electrum_zcash'), - ('lib/currencies.json', 'electrum_zcash'), - ('lib/locale', 'electrum_zcash/locale'), - ('lib/wordlist', 'electrum_zcash/wordlist'), + ('lib/servers.json', 'electrum_zclassic'), + ('lib/servers_testnet.json', 'electrum_zclassic'), + ('lib/servers_regtest.json', 'electrum_zclassic'), + ('lib/currencies.json', 'electrum_zclassic'), + ('lib/locale', 'electrum_zclassic/locale'), + ('lib/wordlist', 'electrum_zclassic/wordlist'), ] datas += collect_data_files('trezorlib') datas += collect_data_files('btchip') @@ -91,7 +91,7 @@ excludes += [ 'PyQt5.QtWinExtras', ] -a = Analysis(['electrum-zcash'], +a = Analysis(['electrum-zclassic'], pathex=['plugins'], hiddenimports=hiddenimports, datas=datas, @@ -105,14 +105,14 @@ for d in a.datas: a.datas.remove(d) break -# Add TOC to electrum_zcash, electrum_zcash_gui, electrum_zcash_plugins +# Add TOC to electrum_zclassic, electrum_zclassic_gui, electrum_zclassic_plugins for p in sorted(a.pure): if p[0].startswith('lib') and p[2] == 'PYMODULE': - a.pure += [('electrum_zcash%s' % p[0][3:] , p[1], p[2])] + a.pure += [('electrum_zclassic%s' % p[0][3:] , p[1], p[2])] if p[0].startswith('gui') and p[2] == 'PYMODULE': - a.pure += [('electrum_zcash_gui%s' % p[0][3:] , p[1], p[2])] + a.pure += [('electrum_zclassic_gui%s' % p[0][3:] , p[1], p[2])] if p[0].startswith('plugins') and p[2] == 'PYMODULE': - a.pure += [('electrum_zcash_plugins%s' % p[0][7:] , p[1], p[2])] + a.pure += [('electrum_zclassic_plugins%s' % p[0][7:] , p[1], p[2])] pyz = PYZ(a.pure) @@ -123,8 +123,8 @@ exe = EXE(pyz, strip=False, upx=False, console=False, - icon='icons/electrum-zcash.ico', - name=os.path.join('build/electrum-zcash/electrum-zcash', cmdline_name)) + icon='icons/electrum-zclassic.ico', + name=os.path.join('build/electrum-zclassic/electrum-zclassic', cmdline_name)) # trezorctl separate bin tctl_a = Analysis([os.path.join(PY36BINDIR, 'trezorctl')], @@ -141,17 +141,17 @@ tctl_exe = EXE(tctl_pyz, strip=False, upx=False, console=True, - name=os.path.join('build/electrum-zcash/electrum-zcash', 'trezorctl.bin')) + name=os.path.join('build/electrum-zclassic/electrum-zclassic', 'trezorctl.bin')) coll = COLLECT(exe, tctl_exe, a.binaries, a.datas, strip=False, upx=False, - name=os.path.join('dist', 'electrum-zcash')) + name=os.path.join('dist', 'electrum-zclassic')) app = BUNDLE(coll, - name=os.path.join('dist', 'Electrum-Zcash.app'), - appname="Electrum-Zcash", - icon='electrum-zcash.icns', + name=os.path.join('dist', 'Electrum-Zclassic.app'), + appname="Electrum-Zclassic", + icon='electrum-zclassic.icns', version = 'ELECTRUM_VERSION') diff --git a/contrib/zcash/pyi_runtimehook.py b/contrib/zclassic/pyi_runtimehook.py similarity index 98% rename from contrib/zcash/pyi_runtimehook.py rename to contrib/zclassic/pyi_runtimehook.py index 23ee14ad..f5e98ec4 100644 --- a/contrib/zcash/pyi_runtimehook.py +++ b/contrib/zclassic/pyi_runtimehook.py @@ -23,7 +23,7 @@ def _new_load_module(name, file, pathname, description): imp.load_module = _new_load_module -PLUGINS_PREFIX = 'electrum_zcash_plugins' +PLUGINS_PREFIX = 'electrum_zclassic_plugins' KEYSTORE_PLUGINS = [ 'hw_wallet', diff --git a/contrib/zcash/pyi_tctl_runtimehook.py b/contrib/zclassic/pyi_tctl_runtimehook.py similarity index 100% rename from contrib/zcash/pyi_tctl_runtimehook.py rename to contrib/zclassic/pyi_tctl_runtimehook.py diff --git a/contrib/zcash/requirements.txt b/contrib/zclassic/requirements.txt similarity index 100% rename from contrib/zcash/requirements.txt rename to contrib/zclassic/requirements.txt diff --git a/contrib/zcash/travis/Dockerfile-kivy b/contrib/zclassic/travis/Dockerfile-kivy similarity index 100% rename from contrib/zcash/travis/Dockerfile-kivy rename to contrib/zclassic/travis/Dockerfile-kivy diff --git a/contrib/zcash/travis/Dockerfile-linux b/contrib/zclassic/travis/Dockerfile-linux similarity index 100% rename from contrib/zcash/travis/Dockerfile-linux rename to contrib/zclassic/travis/Dockerfile-linux diff --git a/contrib/zcash/travis/Dockerfile-wine b/contrib/zclassic/travis/Dockerfile-wine similarity index 100% rename from contrib/zcash/travis/Dockerfile-wine rename to contrib/zclassic/travis/Dockerfile-wine diff --git a/contrib/zcash/travis/before_install-linux-apk.sh b/contrib/zclassic/travis/before_install-linux-apk.sh similarity index 100% rename from contrib/zcash/travis/before_install-linux-apk.sh rename to contrib/zclassic/travis/before_install-linux-apk.sh diff --git a/contrib/zcash/travis/before_install-linux.sh b/contrib/zclassic/travis/before_install-linux.sh similarity index 100% rename from contrib/zcash/travis/before_install-linux.sh rename to contrib/zclassic/travis/before_install-linux.sh diff --git a/contrib/zcash/travis/before_install-osx.sh b/contrib/zclassic/travis/before_install-osx.sh similarity index 100% rename from contrib/zcash/travis/before_install-osx.sh rename to contrib/zclassic/travis/before_install-osx.sh diff --git a/contrib/zcash/travis/build_linux.sh b/contrib/zclassic/travis/build_linux.sh similarity index 100% rename from contrib/zcash/travis/build_linux.sh rename to contrib/zclassic/travis/build_linux.sh diff --git a/contrib/zcash/travis/build_wine.sh b/contrib/zclassic/travis/build_wine.sh similarity index 63% rename from contrib/zcash/travis/build_wine.sh rename to contrib/zclassic/travis/build_wine.sh index cd0e5763..7f9c495f 100755 --- a/contrib/zcash/travis/build_wine.sh +++ b/contrib/zclassic/travis/build_wine.sh @@ -1,17 +1,17 @@ #!/bin/bash -source ./contrib/zcash/travis/electrum_zcash_version_env.sh; -echo wine build version is $ELECTRUM_ZCASH_VERSION +source ./contrib/zclassic/travis/electrum_zclassic_version_env.sh; +echo wine build version is $ELECTRUM_ZCL_VERSION mv /opt/zbarw $WINEPREFIX/drive_c/ -cd $WINEPREFIX/drive_c/electrum-zcash +cd $WINEPREFIX/drive_c/electrum-zclassic rm -rf build -rm -rf dist/electrum-zcash +rm -rf dist/electrum-zclassic -cp contrib/zcash/deterministic.spec . -cp contrib/zcash/pyi_runtimehook.py . -cp contrib/zcash/pyi_tctl_runtimehook.py . +cp contrib/zclassic/deterministic.spec . +cp contrib/zclassic/pyi_runtimehook.py . +cp contrib/zclassic/pyi_tctl_runtimehook.py . wine pip install --upgrade pip export PYINSTALLER_TAG=dev180610 @@ -20,7 +20,7 @@ wine pip install $PYINSTALLER_TAG.tar.gz rm $PYINSTALLER_TAG.tar.gz wine pip install eth-hash==0.1.2 -wine pip install -r contrib/zcash/requirements.txt +wine pip install -r contrib/zclassic/requirements.txt wine pip install x11_hash wine pip install cython @@ -34,7 +34,7 @@ mkdir $WINEPREFIX/drive_c/Qt ln -s $PYHOME/Lib/site-packages/PyQt5/ $WINEPREFIX/drive_c/Qt/5.5.1 wine pyinstaller -y \ - --name electrum-zcash-$ELECTRUM_ZCASH_VERSION.exe \ + --name electrum-zclassic-$ELECTRUM_ZCL_VERSION.exe \ deterministic.spec if [[ $WINEARCH == win32 ]]; then @@ -44,6 +44,6 @@ else fi wine "$NSIS_EXE" /NOCD -V3 \ - /DPRODUCT_VERSION=$ELECTRUM_ZCASH_VERSION \ + /DPRODUCT_VERSION=$ELECTRUM_ZCL_VERSION \ /DWINEARCH=$WINEARCH \ - contrib/zcash/electrum-zcash.nsi + contrib/zclassic/electrum-zclassic.nsi diff --git a/contrib/zclassic/travis/electrum_zclassic_version_env.sh b/contrib/zclassic/travis/electrum_zclassic_version_env.sh new file mode 100755 index 00000000..387c70d6 --- /dev/null +++ b/contrib/zclassic/travis/electrum_zclassic_version_env.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +VERSION_STRING=(`grep ELECTRUM_VERSION lib/version.py`) +ELECTRUM_ZCL_VERSION=${VERSION_STRING[2]} +ELECTRUM_ZCL_VERSION=${ELECTRUM_ZCL_VERSION#\'} +ELECTRUM_ZCL_VERSION=${ELECTRUM_ZCL_VERSION%\'} +DOTS=`echo $ELECTRUM_ZCL_VERSION | grep -o "\." | wc -l` +if [[ $DOTS -lt 3 ]]; then + ELECTRUM_ZCL_APK_VERSION=$ELECTRUM_ZCL_VERSION.0 +else + ELECTRUM_ZCL_APK_VERSION=$ELECTRUM_ZCL_VERSION +fi +export ELECTRUM_ZCL_VERSION +export ELECTRUM_ZCL_APK_VERSION diff --git a/contrib/zcash/travis/travis-build-linux-apk.sh b/contrib/zclassic/travis/travis-build-linux-apk.sh similarity index 62% rename from contrib/zcash/travis/travis-build-linux-apk.sh rename to contrib/zclassic/travis/travis-build-linux-apk.sh index 33daa83b..3d18c876 100755 --- a/contrib/zcash/travis/travis-build-linux-apk.sh +++ b/contrib/zclassic/travis/travis-build-linux-apk.sh @@ -6,23 +6,23 @@ if [[ -z $TRAVIS_TAG ]]; then exit 1 fi -BUILD_REPO_URL=https://github.com/zebra-lucky/electrum-zcash +BUILD_REPO_URL=https://github.com/zebra-lucky/electrum-zclassic cd build -git clone --branch $TRAVIS_TAG $BUILD_REPO_URL electrum-zcash +git clone --branch $TRAVIS_TAG $BUILD_REPO_URL electrum-zclassic docker run --rm \ -v $(pwd):/opt \ - -w /opt/electrum-zcash \ + -w /opt/electrum-zclassic \ -t zebralucky/electrum-dash-winebuild:Linux /opt/build_linux.sh sudo find . -name '*.po' -delete sudo find . -name '*.pot' -delete -sudo chown -R 1000 electrum-zcash +sudo chown -R 1000 electrum-zclassic docker run --rm \ - -v $(pwd)/electrum-zcash:/home/buildozer/build \ + -v $(pwd)/electrum-zclassic:/home/buildozer/build \ -t zebralucky/electrum-dash-winebuild:Kivy bash -c \ 'rm -rf packages && ./contrib/make_packages && ./contrib/make_apk' diff --git a/contrib/zcash/travis/travis-build-linux.sh b/contrib/zclassic/travis/travis-build-linux.sh similarity index 76% rename from contrib/zcash/travis/travis-build-linux.sh rename to contrib/zclassic/travis/travis-build-linux.sh index 32bb0c68..f03600be 100755 --- a/contrib/zcash/travis/travis-build-linux.sh +++ b/contrib/zclassic/travis/travis-build-linux.sh @@ -6,15 +6,15 @@ if [[ -z $TRAVIS_TAG ]]; then exit 1 fi -BUILD_REPO_URL=https://github.com/zebra-lucky/electrum-zcash +BUILD_REPO_URL=https://github.com/zebra-lucky/electrum-zclassic cd build -git clone --branch $TRAVIS_TAG $BUILD_REPO_URL electrum-zcash +git clone --branch $TRAVIS_TAG $BUILD_REPO_URL electrum-zclassic docker run --rm \ -v $(pwd):/opt \ - -w /opt/electrum-zcash \ + -w /opt/electrum-zclassic \ -t zebralucky/electrum-dash-winebuild:Linux /opt/build_linux.sh sudo find . -name '*.po' -delete @@ -34,8 +34,8 @@ docker run --rm \ -e WINEPREFIX=$WINEPREFIX \ -e PYHOME=$PYHOME \ -v $(pwd):/opt \ - -v $(pwd)/electrum-zcash/:$WINEPREFIX/drive_c/electrum-zcash \ - -w /opt/electrum-zcash \ + -v $(pwd)/electrum-zclassic/:$WINEPREFIX/drive_c/electrum-zclassic \ + -w /opt/electrum-zclassic \ -t zebralucky/electrum-dash-winebuild:Wine /opt/build_wine.sh export WINEARCH=win64 @@ -50,6 +50,6 @@ docker run --rm \ -e WINEPREFIX=$WINEPREFIX \ -e PYHOME=$PYHOME \ -v $(pwd):/opt \ - -v $(pwd)/electrum-zcash/:$WINEPREFIX/drive_c/electrum-zcash \ - -w /opt/electrum-zcash \ + -v $(pwd)/electrum-zclassic/:$WINEPREFIX/drive_c/electrum-zclassic \ + -w /opt/electrum-zclassic \ -t zebralucky/electrum-dash-winebuild:Wine /opt/build_wine.sh diff --git a/contrib/zcash/travis/travis-build-osx.sh b/contrib/zclassic/travis/travis-build-osx.sh similarity index 51% rename from contrib/zcash/travis/travis-build-osx.sh rename to contrib/zclassic/travis/travis-build-osx.sh index 00e3242a..92198c5e 100755 --- a/contrib/zcash/travis/travis-build-osx.sh +++ b/contrib/zclassic/travis/travis-build-osx.sh @@ -6,18 +6,18 @@ if [[ -z $TRAVIS_TAG ]]; then exit 1 fi -BUILD_REPO_URL=https://github.com/zebra-lucky/electrum-zcash +BUILD_REPO_URL=https://github.com/zebra-lucky/electrum-zclassic cd build -git clone --branch $TRAVIS_TAG $BUILD_REPO_URL electrum-zcash +git clone --branch $TRAVIS_TAG $BUILD_REPO_URL electrum-zclassic -cd electrum-zcash +cd electrum-zclassic export PY36BINDIR=/Library/Frameworks/Python.framework/Versions/3.6/bin/ export PATH=$PATH:$PY36BINDIR -source ./contrib/zcash/travis/electrum_zcash_version_env.sh; -echo wine build version is $ELECTRUM_ZCASH_VERSION +source ./contrib/zclassic/travis/electrum_zclassic_version_env.sh; +echo wine build version is $ELECTRUM_ZCL_VERSION sudo pip3 install --upgrade pip sudo pip3 install -r contrib/deterministic-build/requirements.txt @@ -35,15 +35,15 @@ export PATH="/usr/local/opt/gettext/bin:$PATH" find . -name '*.po' -delete find . -name '*.pot' -delete -cp contrib/zcash/osx.spec . -cp contrib/zcash/pyi_runtimehook.py . -cp contrib/zcash/pyi_tctl_runtimehook.py . +cp contrib/zclassic/osx.spec . +cp contrib/zclassic/pyi_runtimehook.py . +cp contrib/zclassic/pyi_tctl_runtimehook.py . pyinstaller \ -y \ - --name electrum-zcash-$ELECTRUM_ZCASH_VERSION.bin \ + --name electrum-zclassic-$ELECTRUM_ZCL_VERSION.bin \ osx.spec -sudo hdiutil create -fs HFS+ -volname "Electrum-Zcash" \ - -srcfolder dist/Electrum-Zcash.app \ - dist/electrum-zcash-$ELECTRUM_ZCASH_VERSION-macosx.dmg +sudo hdiutil create -fs HFS+ -volname "Electrum-Zclassic" \ + -srcfolder dist/Electrum-Zclassic.app \ + dist/electrum-zclassic-$ELECTRUM_ZCL_VERSION-macosx.dmg diff --git a/debian/changelog b/debian/changelog index 78b8fce6..d9b3c86f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -electrum-zcash (3.1.3~rc2-0ppa1~ubuntu18.04.1) bionic; urgency=medium +electrum-zclassic (3.1.3~rc2-0ppa1~ubuntu18.04.1) bionic; urgency=medium * Port to ppa diff --git a/debian/control b/debian/control index f993f002..18d34780 100644 --- a/debian/control +++ b/debian/control @@ -1,4 +1,4 @@ -Source: electrum-zcash +Source: electrum-zclassic Section: utils Priority: optional Maintainer: Maksym Yuzhakov @@ -19,10 +19,10 @@ Build-Depends: python3-socks (>= 1.6.5), python3-pyblake2 (>=0.9.3), Standards-Version: 4.1.3 -Homepage: https://github.com/zebra-lucky/electrum-zcash +Homepage: https://github.com/zebra-lucky/electrum-zclassic X-Python3-Version: >= 3.4 -Package: python3-electrum-zcash +Package: python3-electrum-zclassic Architecture: all Section: python Depends: @@ -33,29 +33,29 @@ Depends: python3-btchip (>= 0.1.26), ${misc:Depends}, ${python3:Depends}, -Description: Easy to use Zcash client - Python module - This package provides a lightweight Zcash client which protects - you from losing your Zcash coins in a backup mistake or computer - failure. Also, Electrum-Zcash does not require waiting time because it does - not download the Zcash blockchain. +Description: Easy to use Zclassic client - Python module + This package provides a lightweight Zclassic client which protects + you from losing your Zclassic coins in a backup mistake or computer + failure. Also, Electrum-Zclassic does not require waiting time because it does + not download the Zclassic blockchain. . - This package provides the "electrum_zcash" Python 3 module which can be used - to access a Zcash wallet from Python programs. + This package provides the "electrum_zclassic" Python 3 module which can be used + to access a Zclassic wallet from Python programs. -Package: electrum-zcash +Package: electrum-zclassic Architecture: all Depends: ${misc:Depends}, ${python3:Depends}, - python3-electrum-zcash (= ${binary:Version}), + python3-electrum-zclassic (= ${binary:Version}), Recommends: python3-pyqt5 -Description: Easy to use Zcash client - This package provides a lightweight Zcash client which protects - you from losing your Zcash coins in a backup mistake or computer - failure. Also, Electrum-Zcash does not require waiting time because it does - not download the Zcash blockchain. +Description: Easy to use Zclassic client + This package provides a lightweight Zclassic client which protects + you from losing your Zclassic coins in a backup mistake or computer + failure. Also, Electrum-Zclassic does not require waiting time because it does + not download the Zclassic blockchain. . - Features of Electrum-Zcash: + Features of Electrum-Zclassic: . * Instant on: Your client does not download the blockchain. It uses a network of specialized servers that index the blockchain. @@ -70,7 +70,7 @@ Description: Easy to use Zcash client will synchronize automatically. * Cold Storage: Sign transactions from a computer that is always offline. Broadcast them using a machine that does not have your keys. - * Reachable: You can export your private keys into other Zcash + * Reachable: You can export your private keys into other Zclassic clients. - * Established: Electrum-Zcash is open source and was first released in + * Established: Electrum-Zclassic is open source and was first released in November 2011. diff --git a/debian/copyright b/debian/copyright index f8152d0c..d4abdf5e 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,6 +1,6 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: electrum-zcash -Source: https://github.com/zebra-lucky/electrum-zcash/ +Upstream-Name: electrum-zclassic +Source: https://github.com/zebra-lucky/electrum-zclassic/ Files: * Copyright: Electrum Team diff --git a/debian/electrum-zcash.manpages b/debian/electrum-zcash.manpages deleted file mode 100644 index d74282cd..00000000 --- a/debian/electrum-zcash.manpages +++ /dev/null @@ -1 +0,0 @@ -debian/electrum-zcash.1 diff --git a/debian/electrum-zcash.1 b/debian/electrum-zclassic.1 similarity index 80% rename from debian/electrum-zcash.1 rename to debian/electrum-zclassic.1 index c1f448a2..c02c1623 100644 --- a/debian/electrum-zcash.1 +++ b/debian/electrum-zclassic.1 @@ -1,17 +1,17 @@ -.TH electrum-zcash 1 "23 June 2013" "electrum-zcash" +.TH electrum-zclassic 1 "23 June 2013" "electrum-zclassic" .SH NAME -electrum-zcash \- Lightweight Zcash client +electrum-zclassic \- Lightweight Zclassic client .SH SYNOPSIS -.B electrum-zcash [options] command [options] +.B electrum-zclassic [options] command [options] .SH DESCRIPTION .PP -Electrum-Zcash is a lightweight Zcash client. +Electrum-Zclassic is a lightweight Zclassic client. .br -Electrum-Zcash protects from losing zcash coins in a backup mistake or computer +Electrum-Zclassic protects from losing zclassic coins in a backup mistake or computer failure. It allows recovery of wallet from a passphrase which you can learn by heart or write it down on a paper. .br -Since electrum-zcash does not download the entire blockchain there +Since electrum-zclassic does not download the entire blockchain there is no waiting time when the client is started. .TP @@ -66,7 +66,7 @@ default language used in GUI \fB\-u, \-\-usb\fR Turn on support for hardware wallets (EXPERIMENTAL). .SH AUTHORS -Electrum-Zcash client was initially written by ThomasV +Electrum-Zclassic client was initially written by ThomasV <\fIthomasv@gitorious\fR> .br This manual page was written by Vasudev Kamath diff --git a/debian/electrum-zclassic.manpages b/debian/electrum-zclassic.manpages new file mode 100644 index 00000000..79d1df8e --- /dev/null +++ b/debian/electrum-zclassic.manpages @@ -0,0 +1 @@ +debian/electrum-zclassic.1 diff --git a/debian/patches/fix-keepkey-with-trezor.diff b/debian/patches/fix-keepkey-with-trezor.diff index 711a1675..586348cd 100644 --- a/debian/patches/fix-keepkey-with-trezor.diff +++ b/debian/patches/fix-keepkey-with-trezor.diff @@ -1,13 +1,13 @@ -Index: electrum-zcash/electrum-zcash +Index: electrum-zclassic/electrum-zclassic =================================================================== ---- electrum-zcash.orig/electrum-zcash 2018-06-12 22:15:35.699293303 +0300 -+++ electrum-zcash/electrum-zcash 2018-06-12 22:20:02.122480853 +0300 +--- electrum-zclassic.orig/electrum-zclassic 2018-06-12 22:15:35.699293303 +0300 ++++ electrum-zclassic/electrum-zclassic 2018-06-12 22:20:02.122480853 +0300 @@ -26,6 +26,8 @@ import os import sys - + +os.environ['PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION']='python' + script_dir = os.path.dirname(os.path.realpath(__file__)) is_bundle = getattr(sys, 'frozen', False) - is_local = not is_bundle and os.path.exists(os.path.join(script_dir, "electrum-zcash.desktop")) + is_local = not is_bundle and os.path.exists(os.path.join(script_dir, "electrum-zclassic.desktop")) diff --git a/debian/rules b/debian/rules index 49e185e9..1d9d5b47 100755 --- a/debian/rules +++ b/debian/rules @@ -1,6 +1,6 @@ #!/usr/bin/make -f -export PYBUILD_NAME=electrum-zcash +export PYBUILD_NAME=electrum-zclassic %: dh $@ --with python3 --buildsystem=pybuild @@ -14,11 +14,11 @@ override_dh_auto_build:: override_dh_auto_install:: dh_auto_install - mkdir -p debian/electrum-zcash/usr/bin \ - debian/electrum-zcash/usr/share - mv debian/python3-electrum-zcash/usr/bin \ - debian/electrum-zcash/usr - mv debian/python3-electrum-zcash/usr/share/applications \ - debian/electrum-zcash/usr/share - mv debian/python3-electrum-zcash/usr/share/pixmaps \ - debian/electrum-zcash/usr/share + mkdir -p debian/electrum-zclassic/usr/bin \ + debian/electrum-zclassic/usr/share + mv debian/python3-electrum-zclassic/usr/bin \ + debian/electrum-zclassic/usr + mv debian/python3-electrum-zclassic/usr/share/applications \ + debian/electrum-zclassic/usr/share + mv debian/python3-electrum-zclassic/usr/share/pixmaps \ + debian/electrum-zclassic/usr/share diff --git a/electrum-zcash.desktop b/electrum-zcash.desktop deleted file mode 100644 index b13847de..00000000 --- a/electrum-zcash.desktop +++ /dev/null @@ -1,21 +0,0 @@ -# If you want Electrum-Zcash to appear in a Linux app launcher ("start menu"), install this by doing: -# sudo desktop-file-install electrum-zcash.desktop - -[Desktop Entry] -Comment=Lightweight Zcash Client -Exec=sh -c "PATH=\"\\$HOME/.local/bin:\\$PATH\" electrum-zcash %u" -GenericName[en_US]=Zcash Wallet -GenericName=Zcash Wallet -Icon=electrum-zcash.png -Name[en_US]=Electrum-Zcash Bitcoin Wallet -Name=Electrum-Zcash Bitcoin Wallet -Categories=Finance;Network; -StartupNotify=false -Terminal=false -Type=Application -MimeType=x-scheme-handler/zcash; -Actions=Testnet; - -[Desktop Action Testnet] -Exec=sh -c "PATH=\"\\$HOME/.local/bin:\\$PATH\" electrum-zcash --testnet %u" -Name=Testnet mode diff --git a/electrum-zcash b/electrum-zclassic similarity index 92% rename from electrum-zcash rename to electrum-zclassic index 9010ff8d..e30cfe48 100755 --- a/electrum-zcash +++ b/electrum-zclassic @@ -28,7 +28,7 @@ import sys script_dir = os.path.dirname(os.path.realpath(__file__)) is_bundle = getattr(sys, 'frozen', False) -is_local = not is_bundle and os.path.exists(os.path.join(script_dir, "electrum-zcash.desktop")) +is_local = not is_bundle and os.path.exists(os.path.join(script_dir, "electrum-zclassic.desktop")) is_android = 'ANDROID_DATA' in os.environ # move this back to gui/kivy/__init.py once plugins are moved @@ -67,24 +67,24 @@ if not is_android: # load local module as electrum if is_local or is_android: import imp - imp.load_module('electrum_zcash', *imp.find_module('lib')) - imp.load_module('electrum_zcash_gui', *imp.find_module('gui')) - imp.load_module('electrum_zcash_plugins', *imp.find_module('plugins')) + imp.load_module('electrum_zclassic', *imp.find_module('lib')) + imp.load_module('electrum_zclassic_gui', *imp.find_module('gui')) + imp.load_module('electrum_zclassic_plugins', *imp.find_module('plugins')) -from electrum_zcash import bitcoin, util -from electrum_zcash import constants -from electrum_zcash import SimpleConfig, Network -from electrum_zcash.wallet import Wallet, Imported_Wallet -from electrum_zcash.storage import WalletStorage, get_derivation_used_for_hw_device_encryption -from electrum_zcash.util import print_msg, print_stderr, json_encode, json_decode, UserCancelled -from electrum_zcash.util import set_verbosity, InvalidPassword -from electrum_zcash.commands import get_parser, known_commands, Commands, config_variables -from electrum_zcash import daemon -from electrum_zcash import keystore -from electrum_zcash.mnemonic import Mnemonic -import electrum_zcash_plugins +from electrum_zclassic import bitcoin, util +from electrum_zclassic import constants +from electrum_zclassic import SimpleConfig, Network +from electrum_zclassic.wallet import Wallet, Imported_Wallet +from electrum_zclassic.storage import WalletStorage, get_derivation_used_for_hw_device_encryption +from electrum_zclassic.util import print_msg, print_stderr, json_encode, json_decode, UserCancelled +from electrum_zclassic.util import set_verbosity, InvalidPassword +from electrum_zclassic.commands import get_parser, known_commands, Commands, config_variables +from electrum_zclassic import daemon +from electrum_zclassic import keystore +from electrum_zclassic.mnemonic import Mnemonic +import electrum_zclassic_plugins # get password routine def prompt_password(prompt, confirm=True): @@ -178,7 +178,7 @@ def init_daemon(config_options): storage = WalletStorage(config.get_wallet_path()) if not storage.file_exists(): print_msg("Error: Wallet file not found.") - print_msg("Type 'electrum-zcash create' to create a new wallet, or provide a path to a wallet with the -w option") + print_msg("Type 'electrum-zclassic create' to create a new wallet, or provide a path to a wallet with the -w option") sys.exit(0) if storage.is_encrypted(): if storage.is_encrypted_with_hw_device(): @@ -216,7 +216,7 @@ def init_cmdline(config_options, server): if cmd.requires_wallet and not storage.file_exists(): print_msg("Error: Wallet file not found.") - print_msg("Type 'electrum-zcash create' to create a new wallet, or provide a path to a wallet with the -w option") + print_msg("Type 'electrum-zclassic create' to create a new wallet, or provide a path to a wallet with the -w option") sys.exit(0) # important warning @@ -329,7 +329,7 @@ def run_offline_command(config, config_options, plugins): return result def init_plugins(config, gui_name): - from electrum_zcash.plugins import Plugins + from electrum_zclassic.plugins import Plugins return Plugins(config, is_local or is_android, gui_name) @@ -390,7 +390,7 @@ if __name__ == '__main__': # check uri uri = config_options.get('url') if uri: - if not uri.startswith('zcash:'): + if not uri.startswith('zclassic:'): print_stderr('unknown command:', uri) sys.exit(1) config_options['url'] = uri @@ -437,7 +437,7 @@ if __name__ == '__main__': d = daemon.Daemon(config, fd, False) d.start() if config.get('websocket_server'): - from electrum_zcash import websockets + from electrum_zclassic import websockets websockets.WebSocketServer(config, d.network).start() if config.get('requests_dir'): path = os.path.join(config.get('requests_dir'), 'index.html') @@ -465,7 +465,7 @@ if __name__ == '__main__': else: cmd = known_commands[cmdname] if cmd.requires_network: - print_msg("Daemon not running; try 'electrum-zcash daemon start'") + print_msg("Daemon not running; try 'electrum-zclassic daemon start'") sys.exit(1) else: plugins = init_plugins(config, 'cmdline') diff --git a/electrum-zcash-env b/electrum-zclassic-env similarity index 96% rename from electrum-zcash-env rename to electrum-zclassic-env index 849e2d92..f0d9c343 100755 --- a/electrum-zcash-env +++ b/electrum-zclassic-env @@ -22,6 +22,6 @@ fi export PYTHONPATH="/usr/local/lib/python${PYTHON_VER}/site-packages:$PYTHONPATH" -./electrum-zcash "$@" +./electrum-zclassic "$@" deactivate diff --git a/electrum-zcash.conf.sample b/electrum-zclassic.conf.sample similarity index 67% rename from electrum-zcash.conf.sample rename to electrum-zclassic.conf.sample index 59147ece..c3c71cef 100644 --- a/electrum-zcash.conf.sample +++ b/electrum-zclassic.conf.sample @@ -1,7 +1,7 @@ -# Configuration file for the Electrum-Zcash client +# Configuration file for the Electrum-Zclassic client # Settings defined here are shared across wallets # -# copy this file to /etc/electrum-zcash.conf if you want read-only settings +# copy this file to /etc/electrum-zclassic.conf if you want read-only settings [client] server = electrum.novit.ro:50001:t diff --git a/electrum-zclassic.desktop b/electrum-zclassic.desktop new file mode 100644 index 00000000..c1a934f6 --- /dev/null +++ b/electrum-zclassic.desktop @@ -0,0 +1,21 @@ +# If you want Electrum-Zclassic to appear in a Linux app launcher ("start menu"), install this by doing: +# sudo desktop-file-install electrum-zclassic.desktop + +[Desktop Entry] +Comment=Lightweight Zclassic Client +Exec=sh -c "PATH=\"\\$HOME/.local/bin:\\$PATH\" electrum-zclassic %u" +GenericName[en_US]=Zclassic Wallet +GenericName=Zclassic Wallet +Icon=electrum-zclassic.png +Name[en_US]=Electrum-Zclassic Bitcoin Wallet +Name=Electrum-Zclassic Bitcoin Wallet +Categories=Finance;Network; +StartupNotify=false +Terminal=false +Type=Application +MimeType=x-scheme-handler/zclassic; +Actions=Testnet; + +[Desktop Action Testnet] +Exec=sh -c "PATH=\"\\$HOME/.local/bin:\\$PATH\" electrum-zclassic --testnet %u" +Name=Testnet mode diff --git a/electrum-zcash.icns b/electrum-zclassic.icns similarity index 100% rename from electrum-zcash.icns rename to electrum-zclassic.icns diff --git a/gui/kivy/Readme.md b/gui/kivy/Readme.md index 72a8fcb8..af3dcb04 100644 --- a/gui/kivy/Readme.md +++ b/gui/kivy/Readme.md @@ -1,10 +1,10 @@ # Kivy GUI -The Kivy GUI is used with Electrum-Zcash on Android devices. To generate an APK file, follow these instructions. +The Kivy GUI is used with Electrum-Zclassic on Android devices. To generate an APK file, follow these instructions. ## 1. Install python-for-android (p4a) -p4a is used to package Electrum-Zcash, Python, SDL and a bootstrap Java app into an APK file. -We patched p4a to add some functionality we need for Electrum-Zcash. Until those changes are +p4a is used to package Electrum-Zclassic, Python, SDL and a bootstrap Java app into an APK file. +We patched p4a to add some functionality we need for Electrum-Zclassic. Until those changes are merged into p4a, you need to merge them locally (into the master branch): 1.1 [kivy/python-for-android#1217](https://github.com/kivy/python-for-android/pull/1217) @@ -60,9 +60,9 @@ Extract into `/opt/crystax-ndk-10.3.2` ## 5. Create the UI Atlas -In the `gui/kivy` directory of Electrum-Zcash, run `make theming`. +In the `gui/kivy` directory of Electrum-Zclassic, run `make theming`. -## 6. Download Electrum-Zcash dependencies +## 6. Download Electrum-Zclassic dependencies Run `contrib/make_packages`. ## 7. Build the APK diff --git a/gui/kivy/i18n.py b/gui/kivy/i18n.py index a1ea53ed..007f62b6 100644 --- a/gui/kivy/i18n.py +++ b/gui/kivy/i18n.py @@ -36,7 +36,7 @@ class _(str): @staticmethod def switch_lang(lang): # get the right locales directory, and instanciate a gettext - from electrum_zcash.i18n import LOCALE_DIR + from electrum_zclassic.i18n import LOCALE_DIR locales = gettext.translation('electrum', LOCALE_DIR, languages=[lang], fallback=True) _.lang = locales.gettext for label in _.observers: diff --git a/gui/kivy/main.kv b/gui/kivy/main.kv index 6df7be0e..1bc092cd 100644 --- a/gui/kivy/main.kv +++ b/gui/kivy/main.kv @@ -1,7 +1,7 @@ #:import Clock kivy.clock.Clock #:import Window kivy.core.window.Window #:import Factory kivy.factory.Factory -#:import _ electrum_zcash_gui.kivy.i18n._ +#:import _ electrum_zclassic_gui.kivy.i18n._ ########################### diff --git a/gui/kivy/main_window.py b/gui/kivy/main_window.py index c4214fb0..d5874146 100644 --- a/gui/kivy/main_window.py +++ b/gui/kivy/main_window.py @@ -7,15 +7,15 @@ import traceback from decimal import Decimal import threading -import electrum_zcash -from electrum_zcash.bitcoin import TYPE_ADDRESS -from electrum_zcash import WalletStorage, Wallet -from electrum_zcash_gui.kivy.i18n import _ -from electrum_zcash.paymentrequest import InvoiceStore -from electrum_zcash.util import profiler, InvalidPassword -from electrum_zcash.plugins import run_hook -from electrum_zcash.util import format_satoshis, format_satoshis_plain -from electrum_zcash.paymentrequest import PR_UNPAID, PR_PAID, PR_UNKNOWN, PR_EXPIRED +import electrum_zclassic +from electrum_zclassic.bitcoin import TYPE_ADDRESS +from electrum_zclassic import WalletStorage, Wallet +from electrum_zclassic_gui.kivy.i18n import _ +from electrum_zclassic.paymentrequest import InvoiceStore +from electrum_zclassic.util import profiler, InvalidPassword +from electrum_zclassic.plugins import run_hook +from electrum_zclassic.util import format_satoshis, format_satoshis_plain +from electrum_zclassic.paymentrequest import PR_UNPAID, PR_PAID, PR_UNKNOWN, PR_EXPIRED from kivy.app import App from kivy.core.window import Window @@ -30,10 +30,10 @@ from kivy.metrics import inch from kivy.lang import Builder ## lazy imports for factory so that widgets can be used in kv -#Factory.register('InstallWizard', module='electrum_zcash_gui.kivy.uix.dialogs.installwizard') -#Factory.register('InfoBubble', module='electrum_zcash_gui.kivy.uix.dialogs') -#Factory.register('OutputList', module='electrum_zcash_gui.kivy.uix.dialogs') -#Factory.register('OutputItem', module='electrum_zcash_gui.kivy.uix.dialogs') +#Factory.register('InstallWizard', module='electrum_zclassic_gui.kivy.uix.dialogs.installwizard') +#Factory.register('InfoBubble', module='electrum_zclassic_gui.kivy.uix.dialogs') +#Factory.register('OutputList', module='electrum_zclassic_gui.kivy.uix.dialogs') +#Factory.register('OutputItem', module='electrum_zclassic_gui.kivy.uix.dialogs') from .uix.dialogs.installwizard import InstallWizard from .uix.dialogs import InfoBubble @@ -48,14 +48,14 @@ util = False # register widget cache for keeping memory down timeout to forever to cache # the data -Cache.register('electrum_zcash_widgets', timeout=0) +Cache.register('electrum_zclassic_widgets', timeout=0) from kivy.uix.screenmanager import Screen from kivy.uix.tabbedpanel import TabbedPanel from kivy.uix.label import Label from kivy.core.clipboard import Clipboard -Factory.register('TabbedCarousel', module='electrum_zcash_gui.kivy.uix.screens') +Factory.register('TabbedCarousel', module='electrum_zclassic_gui.kivy.uix.screens') # Register fonts without this you won't be able to use bold/italic... # inside markup. @@ -67,7 +67,7 @@ Label.register('Roboto', 'gui/kivy/data/fonts/Roboto-Bold.ttf') -from electrum_zcash.util import base_units +from electrum_zclassic.util import base_units class ElectrumWindow(App): @@ -99,7 +99,7 @@ class ElectrumWindow(App): from .uix.dialogs.choice_dialog import ChoiceDialog protocol = 's' def cb2(host): - from electrum_zcash import constants + from electrum_zclassic import constants pp = servers.get(host, constants.net.DEFAULT_PORTS) port = pp.get(protocol, '') popup.ids.host.text = host @@ -132,7 +132,7 @@ class ElectrumWindow(App): self.send_screen.set_URI(uri) def on_new_intent(self, intent): - if intent.getScheme() != 'zcash': + if intent.getScheme() != 'zclassic': return uri = intent.getDataString() self.set_URI(uri) @@ -154,7 +154,7 @@ class ElectrumWindow(App): self._trigger_update_history() def _get_bu(self): - return self.electrum_config.get('base_unit', 'ZEC') + return self.electrum_config.get('base_unit', 'ZCL') def _set_bu(self, value): assert value in base_units.keys() @@ -244,7 +244,7 @@ class ElectrumWindow(App): App.__init__(self)#, **kwargs) - title = _('Electrum-Zcash App') + title = _('Electrum-Zclassic App') self.electrum_config = config = kwargs.get('config', None) self.language = config.get('language', 'en') self.network = network = kwargs.get('network', None) @@ -298,17 +298,17 @@ class ElectrumWindow(App): self.send_screen.do_clear() def on_qr(self, data): - from electrum_zcash.bitcoin import base_decode, is_address + from electrum_zclassic.bitcoin import base_decode, is_address data = data.strip() if is_address(data): self.set_URI(data) return - if data.startswith('zcash:'): + if data.startswith('zclassic:'): self.set_URI(data) return # try to decode transaction - from electrum_zcash.transaction import Transaction - from electrum_zcash.util import bh2u + from electrum_zclassic.transaction import Transaction + from electrum_zclassic.util import bh2u try: text = bh2u(base_decode(data, None, base=43)) tx = Transaction(text) @@ -345,7 +345,7 @@ class ElectrumWindow(App): self.receive_screen.screen.address = addr def show_pr_details(self, req, status, is_invoice): - from electrum_zcash.util import format_time + from electrum_zclassic.util import format_time requestor = req.get('requestor') exp = req.get('exp') memo = req.get('memo') @@ -367,7 +367,7 @@ class ElectrumWindow(App): popup.open() def show_addr_details(self, req, status): - from electrum_zcash.util import format_time + from electrum_zclassic.util import format_time fund = req.get('fund') isaddr = 'y' popup = Builder.load_file('gui/kivy/uix/ui_screens/invoice.kv') @@ -450,7 +450,7 @@ class ElectrumWindow(App): self.fiat_unit = self.fx.ccy if self.fx.is_enabled() else '' # default tab self.switch_to('history') - # bind intent for zcash: URI scheme + # bind intent for zclassic: URI scheme if platform == 'android': from android import activity from jnius import autoclass @@ -497,7 +497,7 @@ class ElectrumWindow(App): else: self.load_wallet(wallet) else: - Logger.debug('Electrum-Zcash: Wallet not found. Launching install wizard') + Logger.debug('Electrum-Zclassic: Wallet not found. Launching install wizard') storage = WalletStorage(path) wizard = Factory.InstallWizard(self.electrum_config, storage) wizard.bind(on_wizard_complete=self.on_wizard_complete) @@ -573,13 +573,13 @@ class ElectrumWindow(App): #setup lazy imports for mainscreen Factory.register('AnimatedPopup', - module='electrum_zcash_gui.kivy.uix.dialogs') + module='electrum_zclassic_gui.kivy.uix.dialogs') Factory.register('QRCodeWidget', - module='electrum_zcash_gui.kivy.uix.qrcodewidget') + module='electrum_zclassic_gui.kivy.uix.qrcodewidget') # preload widgets. Remove this if you want to load the widgets on demand - #Cache.append('electrum_zcash_widgets', 'AnimatedPopup', Factory.AnimatedPopup()) - #Cache.append('electrum_zcash_widgets', 'QRCodeWidget', Factory.QRCodeWidget()) + #Cache.append('electrum_zclassic_widgets', 'AnimatedPopup', Factory.AnimatedPopup()) + #Cache.append('electrum_zclassic_widgets', 'QRCodeWidget', Factory.QRCodeWidget()) # load and focus the ui self.root.manager = self.root.ids['manager'] @@ -591,7 +591,7 @@ class ElectrumWindow(App): self.receive_screen = None self.requests_screen = None self.address_screen = None - self.icon = "icons/electrum-zcash.png" + self.icon = "icons/electrum-zclassic.png" self.tabs = self.root.ids['tabs'] def update_interfaces(self, dt): @@ -684,7 +684,7 @@ class ElectrumWindow(App): from plyer import notification icon = (os.path.dirname(os.path.realpath(__file__)) + '/../../' + self.icon) - notification.notify('Electrum-Zcash', message, + notification.notify('Electrum-Zclassic', message, app_icon=icon, app_name='Electrum') except ImportError: Logger.Error('Notification: needs plyer; `sudo pip install plyer`') diff --git a/gui/kivy/nfc_scanner/__init__.py b/gui/kivy/nfc_scanner/__init__.py index a2c6e0d6..4d8abf3f 100644 --- a/gui/kivy/nfc_scanner/__init__.py +++ b/gui/kivy/nfc_scanner/__init__.py @@ -8,7 +8,7 @@ class NFCBase(Widget): ''' payload = ObjectProperty(None) - '''This is the data gotten from the tag. + '''This is the data gotten from the tag. ''' def nfc_init(self): @@ -41,4 +41,4 @@ class NFCBase(Widget): NFCScanner = core_select_lib('nfc_manager', ( # keep the dummy implementation as the last one to make it the fallback provider.NFCScanner = core_select_lib('nfc_scanner', ( ('android', 'scanner_android', 'ScannerAndroid'), - ('dummy', 'scanner_dummy', 'ScannerDummy')), True, 'electrum_zcash_gui.kivy') + ('dummy', 'scanner_dummy', 'ScannerDummy')), True, 'electrum_zclassic_gui.kivy') diff --git a/gui/kivy/nfc_scanner/scanner_android.py b/gui/kivy/nfc_scanner/scanner_android.py index 0d7e467d..5ede5fe5 100644 --- a/gui/kivy/nfc_scanner/scanner_android.py +++ b/gui/kivy/nfc_scanner/scanner_android.py @@ -10,7 +10,7 @@ if platform != 'android': raise ImportError import threading -from electrum_zcash_gui.kivy.nfc_scanner import NFCBase +from electrum_zclassic_gui.kivy.nfc_scanner import NFCBase from jnius import autoclass, cast from android.runnable import run_on_ui_thread from android import activity @@ -46,7 +46,7 @@ class ScannerAndroid(NFCBase): global app app = App.get_running_app() - # Make sure we are listening to new intent + # Make sure we are listening to new intent activity.bind(on_new_intent=self.on_new_intent) # Configure nfc @@ -55,7 +55,7 @@ class ScannerAndroid(NFCBase): # Check if adapter exists if not self.nfc_adapter: return False - + # specify that we want our activity to remain on top when a new intent # is fired self.nfc_pending_intent = PendingIntent.getActivity(context, 0, @@ -131,7 +131,7 @@ class ScannerAndroid(NFCBase): ''' This function is called when the application receives a new intent, for the ones the application has registered previously, either in the manifest or in the foreground dispatch setup in the - nfc_init function above. + nfc_init function above. ''' action_list = (NfcAdapter.ACTION_NDEF_DISCOVERED,) @@ -214,7 +214,7 @@ class ScannerAndroid(NFCBase): ndef_record = NdefRecord( NdefRecord.TNF_MIME_MEDIA, 'cash.z.electrum.kivy', '', data) - + # Create message ndef_message = NdefMessage([ndef_record]) diff --git a/gui/kivy/nfc_scanner/scanner_dummy.py b/gui/kivy/nfc_scanner/scanner_dummy.py index 27b6a4a4..a4104f26 100644 --- a/gui/kivy/nfc_scanner/scanner_dummy.py +++ b/gui/kivy/nfc_scanner/scanner_dummy.py @@ -1,6 +1,6 @@ ''' Dummy NFC Provider to be used on desktops in case no other provider is found ''' -from electrum_zcash_gui.kivy.nfc_scanner import NFCBase +from electrum_zclassic_gui.kivy.nfc_scanner import NFCBase from kivy.clock import Clock from kivy.logger import Logger diff --git a/gui/kivy/tools/bitcoin_intent.xml b/gui/kivy/tools/bitcoin_intent.xml index 066f2aeb..2470fb36 100644 --- a/gui/kivy/tools/bitcoin_intent.xml +++ b/gui/kivy/tools/bitcoin_intent.xml @@ -3,5 +3,5 @@ - + diff --git a/gui/kivy/tools/buildozer.spec b/gui/kivy/tools/buildozer.spec index 7d61e427..863bcee9 100644 --- a/gui/kivy/tools/buildozer.spec +++ b/gui/kivy/tools/buildozer.spec @@ -1,10 +1,10 @@ [app] # (str) Title of your application -title = Electrum-Zcash +title = Electrum-Zclassic # (str) Package name -package.name = Electrum-Zcash +package.name = Electrum-Zclassic # (str) Package domain (needed for android/ios packaging) package.domain = cash.z.electrum diff --git a/gui/kivy/uix/context_menu.py b/gui/kivy/uix/context_menu.py index 9dd0c166..ceaee942 100644 --- a/gui/kivy/uix/context_menu.py +++ b/gui/kivy/uix/context_menu.py @@ -8,7 +8,7 @@ from kivy.lang import Builder from kivy.factory import Factory from kivy.clock import Clock -from electrum_zcash_gui.kivy.i18n import _ +from electrum_zclassic_gui.kivy.i18n import _ Builder.load_string(''' diff --git a/gui/kivy/uix/dialogs/__init__.py b/gui/kivy/uix/dialogs/__init__.py index 31e9d5b9..3079bc77 100644 --- a/gui/kivy/uix/dialogs/__init__.py +++ b/gui/kivy/uix/dialogs/__init__.py @@ -4,7 +4,7 @@ from kivy.factory import Factory from kivy.properties import NumericProperty, StringProperty, BooleanProperty from kivy.core.window import Window -from electrum_zcash_gui.kivy.i18n import _ +from electrum_zclassic_gui.kivy.i18n import _ diff --git a/gui/kivy/uix/dialogs/addresses.py b/gui/kivy/uix/dialogs/addresses.py index 5c50408f..5e8f1ea5 100644 --- a/gui/kivy/uix/dialogs/addresses.py +++ b/gui/kivy/uix/dialogs/addresses.py @@ -93,8 +93,8 @@ Builder.load_string(''' ''') -from electrum_zcash_gui.kivy.i18n import _ -from electrum_zcash_gui.kivy.uix.context_menu import ContextMenu +from electrum_zclassic_gui.kivy.i18n import _ +from electrum_zclassic_gui.kivy.uix.context_menu import ContextMenu class EmptyLabel(Factory.Label): @@ -171,7 +171,7 @@ class AddressesDialog(Factory.Popup): def ext_search(self, card, search): return card.memo.find(search) >= 0 or card.amount.find(search) >= 0 - + def show_menu(self, obj): self.hide_menu() self.context_menu = ContextMenu(obj, self.menu_actions) diff --git a/gui/kivy/uix/dialogs/fee_dialog.py b/gui/kivy/uix/dialogs/fee_dialog.py index eb55dc58..166f9647 100644 --- a/gui/kivy/uix/dialogs/fee_dialog.py +++ b/gui/kivy/uix/dialogs/fee_dialog.py @@ -3,7 +3,7 @@ from kivy.factory import Factory from kivy.properties import ObjectProperty from kivy.lang import Builder -from electrum_zcash_gui.kivy.i18n import _ +from electrum_zclassic_gui.kivy.i18n import _ Builder.load_string(''' diff --git a/gui/kivy/uix/dialogs/fx_dialog.py b/gui/kivy/uix/dialogs/fx_dialog.py index d582c54d..374dc46d 100644 --- a/gui/kivy/uix/dialogs/fx_dialog.py +++ b/gui/kivy/uix/dialogs/fx_dialog.py @@ -66,7 +66,7 @@ from kivy.uix.checkbox import CheckBox from kivy.uix.widget import Widget from kivy.clock import Clock -from electrum_zcash_gui.kivy.i18n import _ +from electrum_zclassic_gui.kivy.i18n import _ from functools import partial class FxDialog(Factory.Popup): diff --git a/gui/kivy/uix/dialogs/installwizard.py b/gui/kivy/uix/dialogs/installwizard.py index 527195a0..8eea57e8 100644 --- a/gui/kivy/uix/dialogs/installwizard.py +++ b/gui/kivy/uix/dialogs/installwizard.py @@ -14,7 +14,7 @@ from kivy.core.window import Window from kivy.clock import Clock from kivy.utils import platform -from electrum_zcash.base_wizard import BaseWizard +from electrum_zclassic.base_wizard import BaseWizard from . import EventsDialog @@ -28,7 +28,7 @@ test_xpub = "xpub661MyMwAqRbcEbvVtRRSjqxVnaWVUMewVzMiURAKyYratih4TtBpMypzzefmv8z Builder.load_string(''' #:import Window kivy.core.window.Window -#:import _ electrum_zcash_gui.kivy.i18n._ +#:import _ electrum_zclassic_gui.kivy.i18n._ @@ -559,8 +559,8 @@ class RestoreSeedDialog(WizardDialog): def __init__(self, wizard, **kwargs): super(RestoreSeedDialog, self).__init__(wizard, **kwargs) self._test = kwargs['test'] - from electrum_zcash.mnemonic import Mnemonic - from electrum_zcash.old_mnemonic import words as old_wordlist + from electrum_zclassic.mnemonic import Mnemonic + from electrum_zclassic.old_mnemonic import words as old_wordlist self.words = set(Mnemonic('en').wordlist).union(set(old_wordlist)) self.ids.text_input_seed.text = test_seed if is_test else '' self.message = _('Please type your seed phrase using the virtual keyboard.') diff --git a/gui/kivy/uix/dialogs/invoices.py b/gui/kivy/uix/dialogs/invoices.py index 515f7acc..6f531f99 100644 --- a/gui/kivy/uix/dialogs/invoices.py +++ b/gui/kivy/uix/dialogs/invoices.py @@ -76,10 +76,10 @@ Builder.load_string(''' ''') from kivy.properties import BooleanProperty -from electrum_zcash_gui.kivy.i18n import _ -from electrum_zcash.util import format_time -from electrum_zcash.paymentrequest import PR_UNPAID, PR_PAID, PR_UNKNOWN, PR_EXPIRED -from electrum_zcash_gui.kivy.uix.context_menu import ContextMenu +from electrum_zclassic_gui.kivy.i18n import _ +from electrum_zclassic.util import format_time +from electrum_zclassic.paymentrequest import PR_UNPAID, PR_PAID, PR_UNKNOWN, PR_EXPIRED +from electrum_zclassic_gui.kivy.uix.context_menu import ContextMenu invoice_text = { PR_UNPAID:_('Pending'), diff --git a/gui/kivy/uix/dialogs/nfc_transaction.py b/gui/kivy/uix/dialogs/nfc_transaction.py index b0acb1fc..84c784ed 100644 --- a/gui/kivy/uix/dialogs/nfc_transaction.py +++ b/gui/kivy/uix/dialogs/nfc_transaction.py @@ -8,7 +8,7 @@ class NFCTransactionDialog(AnimatedPopup): # Delayed Init global NFCSCanner if NFCSCanner is None: - from electrum_zcash_gui.kivy.nfc_scanner import NFCScanner + from electrum_zclassic_gui.kivy.nfc_scanner import NFCScanner self.scanner = NFCSCanner super(NFCTransactionDialog, self).__init__(**kwargs) diff --git a/gui/kivy/uix/dialogs/password_dialog.py b/gui/kivy/uix/dialogs/password_dialog.py index 430d0389..ad06d9f9 100644 --- a/gui/kivy/uix/dialogs/password_dialog.py +++ b/gui/kivy/uix/dialogs/password_dialog.py @@ -5,14 +5,14 @@ from kivy.lang import Builder from decimal import Decimal from kivy.clock import Clock -from electrum_zcash.util import InvalidPassword -from electrum_zcash_gui.kivy.i18n import _ +from electrum_zclassic.util import InvalidPassword +from electrum_zclassic_gui.kivy.i18n import _ Builder.load_string(''' id: popup - title: 'Electrum-Zcash' + title: 'Electrum-Zclassic' message: '' BoxLayout: size_hint: 1, 1 @@ -82,7 +82,7 @@ class PasswordDialog(Factory.Popup): self.is_change = is_change self.pw = None self.new_password = None - self.title = 'Electrum-Zcash' + (' - ' + self.wallet.basename() if self.wallet else '') + self.title = 'Electrum-Zclassic' + (' - ' + self.wallet.basename() if self.wallet else '') def check_password(self, password): if self.is_change > 1: diff --git a/gui/kivy/uix/dialogs/qr_scanner.py b/gui/kivy/uix/dialogs/qr_scanner.py index a588a885..5e31d00a 100644 --- a/gui/kivy/uix/dialogs/qr_scanner.py +++ b/gui/kivy/uix/dialogs/qr_scanner.py @@ -2,7 +2,7 @@ from kivy.app import App from kivy.factory import Factory from kivy.lang import Builder -Factory.register('QRScanner', module='electrum_zcash_gui.kivy.qr_scanner') +Factory.register('QRScanner', module='electrum_zclassic_gui.kivy.qr_scanner') class QrScannerDialog(Factory.AnimatedPopup): diff --git a/gui/kivy/uix/dialogs/question.py b/gui/kivy/uix/dialogs/question.py index ee66fe0c..4637e186 100644 --- a/gui/kivy/uix/dialogs/question.py +++ b/gui/kivy/uix/dialogs/question.py @@ -6,7 +6,7 @@ from kivy.uix.checkbox import CheckBox from kivy.uix.label import Label from kivy.uix.widget import Widget -from electrum_zcash_gui.kivy.i18n import _ +from electrum_zclassic_gui.kivy.i18n import _ Builder.load_string(''' diff --git a/gui/kivy/uix/dialogs/requests.py b/gui/kivy/uix/dialogs/requests.py index 1da1491f..eacf63f1 100644 --- a/gui/kivy/uix/dialogs/requests.py +++ b/gui/kivy/uix/dialogs/requests.py @@ -74,10 +74,10 @@ Builder.load_string(''' ''') from kivy.properties import BooleanProperty -from electrum_zcash_gui.kivy.i18n import _ -from electrum_zcash.util import format_time -from electrum_zcash.paymentrequest import PR_UNPAID, PR_PAID, PR_UNKNOWN, PR_EXPIRED -from electrum_zcash_gui.kivy.uix.context_menu import ContextMenu +from electrum_zclassic_gui.kivy.i18n import _ +from electrum_zclassic.util import format_time +from electrum_zclassic.paymentrequest import PR_UNPAID, PR_PAID, PR_UNKNOWN, PR_EXPIRED +from electrum_zclassic_gui.kivy.uix.context_menu import ContextMenu pr_icon = { PR_UNPAID: 'atlas://gui/kivy/theming/light/important', diff --git a/gui/kivy/uix/dialogs/settings.py b/gui/kivy/uix/dialogs/settings.py index 9aebd633..d44337ec 100644 --- a/gui/kivy/uix/dialogs/settings.py +++ b/gui/kivy/uix/dialogs/settings.py @@ -3,21 +3,21 @@ from kivy.factory import Factory from kivy.properties import ObjectProperty from kivy.lang import Builder -from electrum_zcash.util import base_units -from electrum_zcash.i18n import languages -from electrum_zcash_gui.kivy.i18n import _ -from electrum_zcash.plugins import run_hook -from electrum_zcash import coinchooser +from electrum_zclassic.util import base_units +from electrum_zclassic.i18n import languages +from electrum_zclassic_gui.kivy.i18n import _ +from electrum_zclassic.plugins import run_hook +from electrum_zclassic import coinchooser from .choice_dialog import ChoiceDialog Builder.load_string(''' #:import partial functools.partial -#:import _ electrum_zcash_gui.kivy.i18n._ +#:import _ electrum_zclassic_gui.kivy.i18n._ id: settings - title: _('Electrum-Zcash Settings') + title: _('Electrum-Zclassic Settings') disable_pin: False use_encryption: False BoxLayout: @@ -44,7 +44,7 @@ Builder.load_string(''' SettingsItem: bu: app.base_unit title: _('Denomination') + ': ' + self.bu - description: _("Base unit for Zcash amounts.") + description: _("Base unit for Zclassic amounts.") action: partial(root.unit_dialog, self) CardSeparator SettingsItem: diff --git a/gui/kivy/uix/dialogs/tx_dialog.py b/gui/kivy/uix/dialogs/tx_dialog.py index 62a15e63..fc8de383 100644 --- a/gui/kivy/uix/dialogs/tx_dialog.py +++ b/gui/kivy/uix/dialogs/tx_dialog.py @@ -5,9 +5,9 @@ from kivy.lang import Builder from kivy.clock import Clock from kivy.uix.label import Label -from electrum_zcash_gui.kivy.i18n import _ +from electrum_zclassic_gui.kivy.i18n import _ from datetime import datetime -from electrum_zcash.util import InvalidPassword +from electrum_zclassic.util import InvalidPassword Builder.load_string(''' @@ -148,7 +148,7 @@ class TxDialog(Factory.Popup): self.app.broadcast(self.tx) def show_qr(self): - from electrum_zcash.bitcoin import base_encode, bfh + from electrum_zclassic.bitcoin import base_encode, bfh text = bfh(str(self.tx)) text = base_encode(text, base=43) self.app.qr_dialog(_("Raw Transaction"), text) diff --git a/gui/kivy/uix/dialogs/wallets.py b/gui/kivy/uix/dialogs/wallets.py index 9ac16675..79392325 100644 --- a/gui/kivy/uix/dialogs/wallets.py +++ b/gui/kivy/uix/dialogs/wallets.py @@ -5,7 +5,7 @@ from kivy.factory import Factory from kivy.properties import ObjectProperty from kivy.lang import Builder -from electrum_zcash.util import base_units +from electrum_zclassic.util import base_units from ...i18n import _ from .label_dialog import LabelDialog diff --git a/gui/kivy/uix/menus.py b/gui/kivy/uix/menus.py index 65aa6037..c21eba95 100644 --- a/gui/kivy/uix/menus.py +++ b/gui/kivy/uix/menus.py @@ -7,7 +7,7 @@ from kivy.uix.bubble import Bubble, BubbleButton from kivy.properties import ListProperty from kivy.uix.widget import Widget -from electrum_zcash_gui.kivy.i18n import _ +from electrum_zclassic_gui.kivy.i18n import _ class ContextMenuItem(Widget): '''abstract class diff --git a/gui/kivy/uix/screens.py b/gui/kivy/uix/screens.py index 87f981f5..57499b05 100644 --- a/gui/kivy/uix/screens.py +++ b/gui/kivy/uix/screens.py @@ -17,15 +17,15 @@ from kivy.lang import Builder from kivy.factory import Factory from kivy.utils import platform -from electrum_zcash.util import profiler, parse_URI, format_time, InvalidPassword, NotEnoughFunds, Fiat -from electrum_zcash import bitcoin -from electrum_zcash.util import timestamp_to_datetime -from electrum_zcash.paymentrequest import PR_UNPAID, PR_PAID, PR_UNKNOWN, PR_EXPIRED +from electrum_zclassic.util import profiler, parse_URI, format_time, InvalidPassword, NotEnoughFunds, Fiat +from electrum_zclassic import bitcoin +from electrum_zclassic.util import timestamp_to_datetime +from electrum_zclassic.paymentrequest import PR_UNPAID, PR_PAID, PR_UNKNOWN, PR_EXPIRED from .context_menu import ContextMenu -from electrum_zcash_gui.kivy.i18n import _ +from electrum_zclassic_gui.kivy.i18n import _ class CScreen(Factory.Screen): @@ -170,11 +170,11 @@ class SendScreen(CScreen): payment_request = None def set_URI(self, text): - import electrum_zcash + import electrum_zclassic try: - uri = electrum_zcash.util.parse_URI(text, self.app.on_pr) + uri = electrum_zclassic.util.parse_URI(text, self.app.on_pr) except: - self.app.show_info(_("Not a Zcash URI")) + self.app.show_info(_("Not a Zclassic URI")) return amount = uri.get('amount') self.screen.address = uri.get('address', '') @@ -212,7 +212,7 @@ class SendScreen(CScreen): # it should be already saved return # save address as invoice - from electrum_zcash.paymentrequest import make_unsigned_request, PaymentRequest + from electrum_zclassic.paymentrequest import make_unsigned_request, PaymentRequest req = {'address':self.screen.address, 'memo':self.screen.message} amount = self.app.get_amount(self.screen.amount) if self.screen.amount else 0 req['amount'] = amount @@ -243,10 +243,10 @@ class SendScreen(CScreen): else: address = str(self.screen.address) if not address: - self.app.show_error(_('Recipient not specified.') + ' ' + _('Please scan a Zcash address or a payment request')) + self.app.show_error(_('Recipient not specified.') + ' ' + _('Please scan a Zclassic address or a payment request')) return if not bitcoin.is_address(address): - self.app.show_error(_('Invalid Zcash Address') + ':\n' + address) + self.app.show_error(_('Invalid Zclassic Address') + ':\n' + address) return try: amount = self.app.get_amount(self.screen.amount) @@ -340,7 +340,7 @@ class ReceiveScreen(CScreen): Clock.schedule_once(lambda dt: self.update_qr()) def get_URI(self): - from electrum_zcash.util import create_URI + from electrum_zclassic.util import create_URI amount = self.screen.amount if amount: a, u = self.screen.amount.split() @@ -356,7 +356,7 @@ class ReceiveScreen(CScreen): def do_share(self): uri = self.get_URI() - self.app.do_share(uri, _("Share Zcash Request")) + self.app.do_share(uri, _("Share Zclassic Request")) def do_copy(self): uri = self.get_URI() diff --git a/gui/kivy/uix/ui_screens/about.kv b/gui/kivy/uix/ui_screens/about.kv index 55ac6efc..5644a936 100644 --- a/gui/kivy/uix/ui_screens/about.kv +++ b/gui/kivy/uix/ui_screens/about.kv @@ -1,7 +1,7 @@ -#:import VERSION electrum_zcash.version.ELECTRUM_VERSION +#:import VERSION electrum_zclassic.version.ELECTRUM_VERSION Popup: - title: _("About Electrum-Zcash") + title: _("About Electrum-Zclassic") BoxLayout: orientation: 'vertical' spacing: '10dp' diff --git a/gui/kivy/uix/ui_screens/history.kv b/gui/kivy/uix/ui_screens/history.kv index 2be32eb2..d096d1b3 100644 --- a/gui/kivy/uix/ui_screens/history.kv +++ b/gui/kivy/uix/ui_screens/history.kv @@ -1,4 +1,4 @@ -#:import _ electrum_zcash_gui.kivy.i18n._ +#:import _ electrum_zclassic_gui.kivy.i18n._ #:import Factory kivy.factory.Factory #:set font_light 'gui/kivy/data/fonts/Roboto-Condensed.ttf' #:set btc_symbol chr(171) diff --git a/gui/kivy/uix/ui_screens/network.kv b/gui/kivy/uix/ui_screens/network.kv index fd5c01ad..b5c5b63c 100644 --- a/gui/kivy/uix/ui_screens/network.kv +++ b/gui/kivy/uix/ui_screens/network.kv @@ -13,7 +13,7 @@ Popup: SettingsItem: value: _("{} connections.").format(app.num_nodes) if app.num_nodes else _("Not connected") title: _("Status") + ': ' + self.value - description: _("Connections with Electrum-Zcash servers") + description: _("Connections with Electrum-Zclassic servers") action: lambda x: None CardSeparator diff --git a/gui/kivy/uix/ui_screens/receive.kv b/gui/kivy/uix/ui_screens/receive.kv index 51a4ee59..4f290b22 100644 --- a/gui/kivy/uix/ui_screens/receive.kv +++ b/gui/kivy/uix/ui_screens/receive.kv @@ -1,4 +1,4 @@ -#:import _ electrum_zcash_gui.kivy.i18n._ +#:import _ electrum_zclassic_gui.kivy.i18n._ #:import Decimal decimal.Decimal #:set btc_symbol chr(171) #:set mbtc_symbol chr(187) @@ -68,7 +68,7 @@ ReceiveScreen: pos_hint: {'center_y': .5} BlueButton: id: address_label - text: s.address if s.address else _('Zcash Address') + text: s.address if s.address else _('Zclassic Address') shorten: True on_release: Clock.schedule_once(lambda dt: app.addresses_dialog(s)) CardSeparator: diff --git a/gui/kivy/uix/ui_screens/send.kv b/gui/kivy/uix/ui_screens/send.kv index 58334344..11fbae11 100644 --- a/gui/kivy/uix/ui_screens/send.kv +++ b/gui/kivy/uix/ui_screens/send.kv @@ -1,4 +1,4 @@ -#:import _ electrum_zcash_gui.kivy.i18n._ +#:import _ electrum_zclassic_gui.kivy.i18n._ #:import Decimal decimal.Decimal #:set btc_symbol chr(171) #:set mbtc_symbol chr(187) diff --git a/gui/kivy/uix/ui_screens/server.kv b/gui/kivy/uix/ui_screens/server.kv index 886134ad..80fe95ad 100644 --- a/gui/kivy/uix/ui_screens/server.kv +++ b/gui/kivy/uix/ui_screens/server.kv @@ -6,7 +6,7 @@ Popup: padding: '10dp' spacing: '10dp' TopLabel: - text: _("Electrum-Zcash requests your transaction history from a single server. The returned history is checked against blockchain headers sent by other nodes, using Simple Payment Verification (SPV).") + text: _("Electrum-Zclassic requests your transaction history from a single server. The returned history is checked against blockchain headers sent by other nodes, using Simple Payment Verification (SPV).") font_size: '6pt' Widget: size_hint: 1, 0.8 diff --git a/gui/kivy/uix/ui_screens/status.kv b/gui/kivy/uix/ui_screens/status.kv index 7c9aa33c..1ac0a1bc 100644 --- a/gui/kivy/uix/ui_screens/status.kv +++ b/gui/kivy/uix/ui_screens/status.kv @@ -1,5 +1,5 @@ Popup: - title: "Electrum-Zcash" + title: "Electrum-Zclassic" confirmed: 0 unconfirmed: 0 unmatured: 0 diff --git a/gui/qt/__init__.py b/gui/qt/__init__.py index fe28e60f..12f9e4ee 100644 --- a/gui/qt/__init__.py +++ b/gui/qt/__init__.py @@ -38,15 +38,15 @@ from PyQt5.QtWidgets import * from PyQt5.QtCore import * import PyQt5.QtCore as QtCore -from electrum_zcash.i18n import _, set_language -from electrum_zcash.plugins import run_hook -from electrum_zcash import WalletStorage -# from electrum_zcash.synchronizer import Synchronizer -# from electrum_zcash.verifier import SPV -# from electrum_zcash.util import DebugMem -from electrum_zcash.util import (UserCancelled, print_error, +from electrum_zclassic.i18n import _, set_language +from electrum_zclassic.plugins import run_hook +from electrum_zclassic import WalletStorage +# from electrum_zclassic.synchronizer import Synchronizer +# from electrum_zclassic.verifier import SPV +# from electrum_zclassic.util import DebugMem +from electrum_zclassic.util import (UserCancelled, print_error, WalletFileException, BitcoinException) -# from electrum_zcash.wallet import Abstract_Wallet +# from electrum_zclassic.wallet import Abstract_Wallet from .installwizard import InstallWizard, GoBack @@ -56,7 +56,7 @@ try: except Exception as e: print(e) print("Error: Could not find icons file.") - print("Please run 'pyrcc5 icons.qrc -o gui/qt/icons_rc.py', and reinstall Electrum-Zcash") + print("Please run 'pyrcc5 icons.qrc -o gui/qt/icons_rc.py', and reinstall Electrum-Zclassic") sys.exit(1) from .util import * # * needed for plugins @@ -97,7 +97,7 @@ class ElectrumGui: if hasattr(QtCore.Qt, "AA_ShareOpenGLContexts"): QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_ShareOpenGLContexts) if hasattr(QGuiApplication, 'setDesktopFileName'): - QGuiApplication.setDesktopFileName('electrum-zcash.desktop') + QGuiApplication.setDesktopFileName('electrum-zclassic.desktop') self.config = config self.daemon = daemon self.plugins = plugins @@ -111,7 +111,7 @@ class ElectrumGui: # init tray self.dark_icon = self.config.get("dark_icon", False) self.tray = QSystemTrayIcon(self.tray_icon(), None) - self.tray.setToolTip('Electrum-Zcash') + self.tray.setToolTip('Electrum-Zclassic') self.tray.activated.connect(self.tray_activated) self.build_tray_menu() self.tray.show() @@ -133,7 +133,7 @@ class ElectrumGui: submenu.addAction(_("Close"), window.close) m.addAction(_("Dark/Light"), self.toggle_tray_icon) m.addSeparator() - m.addAction(_("Exit Electrum-Zcash"), self.close) + m.addAction(_("Exit Electrum-Zclassic"), self.close) def tray_icon(self): if self.dark_icon: @@ -165,7 +165,7 @@ class ElectrumGui: def show_network_dialog(self, parent): if not self.daemon.network: - parent.show_warning(_('You are using Electrum-Zcash in offline mode; restart Electrum-Zcash if you want to get connected'), title=_('Offline')) + parent.show_warning(_('You are using Electrum-Zclassic in offline mode; restart Electrum-Zclassic if you want to get connected'), title=_('Offline')) return if self.nd: self.nd.on_update() diff --git a/gui/qt/address_dialog.py b/gui/qt/address_dialog.py index 7559fc94..c24bf702 100644 --- a/gui/qt/address_dialog.py +++ b/gui/qt/address_dialog.py @@ -23,7 +23,7 @@ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -from electrum_zcash.i18n import _ +from electrum_zclassic.i18n import _ from PyQt5.QtCore import * from PyQt5.QtGui import * diff --git a/gui/qt/address_list.py b/gui/qt/address_list.py index 3b761dab..be82465a 100644 --- a/gui/qt/address_list.py +++ b/gui/qt/address_list.py @@ -24,10 +24,10 @@ # SOFTWARE. import webbrowser -from electrum_zcash.i18n import _ -from electrum_zcash.util import block_explorer_URL -from electrum_zcash.plugins import run_hook -from electrum_zcash.bitcoin import is_address +from electrum_zclassic.i18n import _ +from electrum_zclassic.util import block_explorer_URL +from electrum_zclassic.plugins import run_hook +from electrum_zclassic.bitcoin import is_address from .util import * @@ -138,7 +138,7 @@ class AddressList(MyTreeWidget): self.setCurrentItem(address_item) def create_menu(self, position): - from electrum_zcash.wallet import Multisig_Wallet + from electrum_zclassic.wallet import Multisig_Wallet is_multisig = isinstance(self.wallet, Multisig_Wallet) can_delete = self.wallet.can_delete_address() selected = self.selectedItems() diff --git a/gui/qt/amountedit.py b/gui/qt/amountedit.py index efb87f90..19adc315 100644 --- a/gui/qt/amountedit.py +++ b/gui/qt/amountedit.py @@ -5,7 +5,7 @@ from PyQt5.QtGui import * from PyQt5.QtWidgets import (QLineEdit, QStyle, QStyleOptionFrame) from decimal import Decimal -from electrum_zcash.util import format_satoshis_plain +from electrum_zclassic.util import format_satoshis_plain class MyLineEdit(QLineEdit): @@ -82,11 +82,11 @@ class BTCAmountEdit(AmountEdit): def _base_unit(self): p = self.decimal_point() if p == 8: - return 'ZEC' + return 'ZCL' if p == 5: - return 'mZEC' + return 'mZCL' if p == 2: - return 'uZEC' + return 'uZCL' raise Exception('Unknown base unit') def get_amount(self): diff --git a/gui/qt/console.py b/gui/qt/console.py index 07e8bd25..cc5dadf8 100644 --- a/gui/qt/console.py +++ b/gui/qt/console.py @@ -6,7 +6,7 @@ import traceback, platform from PyQt5 import QtCore from PyQt5 import QtGui from PyQt5 import QtWidgets -from electrum_zcash import util +from electrum_zclassic import util if platform.system() == 'Windows': diff --git a/gui/qt/contact_list.py b/gui/qt/contact_list.py index b4f4510b..309805ec 100644 --- a/gui/qt/contact_list.py +++ b/gui/qt/contact_list.py @@ -24,10 +24,10 @@ # SOFTWARE. import webbrowser -from electrum_zcash.i18n import _ -from electrum_zcash.bitcoin import is_address -from electrum_zcash.util import block_explorer_URL -from electrum_zcash.plugins import run_hook +from electrum_zclassic.i18n import _ +from electrum_zclassic.bitcoin import is_address +from electrum_zclassic.util import block_explorer_URL +from electrum_zclassic.plugins import run_hook from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWidgets import ( diff --git a/gui/qt/exception_window.py b/gui/qt/exception_window.py index 0525df8f..f85300e9 100644 --- a/gui/qt/exception_window.py +++ b/gui/qt/exception_window.py @@ -35,8 +35,8 @@ import PyQt5.QtCore as QtCore from PyQt5.QtGui import QIcon from PyQt5.QtWidgets import * -from electrum_zcash.i18n import _ -from electrum_zcash import ELECTRUM_VERSION, bitcoin, constants +from electrum_zclassic.i18n import _ +from electrum_zclassic import ELECTRUM_VERSION, bitcoin, constants from .util import MessageBoxMixin @@ -47,7 +47,7 @@ issue_template = """

Traceback

Additional information

    -
  • Electrum-Zcash version: {app_version}
  • +
  • Electrum-Zclassic version: {app_version}
  • Operating system: {os}
  • Wallet type: {wallet_type}
  • Locale: {locale}
  • @@ -63,14 +63,14 @@ class Exception_Window(QWidget, MessageBoxMixin): self.exc_args = (exctype, value, tb) self.main_window = main_window QWidget.__init__(self) - self.setWindowTitle('Electrum-Zcash - ' + _('An Error Occurred')) + self.setWindowTitle('Electrum-Zclassic - ' + _('An Error Occurred')) self.setMinimumSize(600, 300) main_box = QVBoxLayout() heading = QLabel('

    ' + _('Sorry!') + '

    ') main_box.addWidget(heading) - main_box.addWidget(QLabel(_('Something went wrong while executing Electrum-Zcash.'))) + main_box.addWidget(QLabel(_('Something went wrong while executing Electrum-Zclassic.'))) main_box.addWidget(QLabel( _('To help us diagnose and fix the problem, you can send us a bug report that contains useful debug ' diff --git a/gui/qt/fee_slider.py b/gui/qt/fee_slider.py index 81f0caeb..b06ef03a 100644 --- a/gui/qt/fee_slider.py +++ b/gui/qt/fee_slider.py @@ -1,4 +1,4 @@ -from electrum_zcash.i18n import _ +from electrum_zclassic.i18n import _ from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWidgets import QSlider, QToolTip diff --git a/gui/qt/history_list.py b/gui/qt/history_list.py index fb2d28b2..4ff5b987 100644 --- a/gui/qt/history_list.py +++ b/gui/qt/history_list.py @@ -26,13 +26,13 @@ import webbrowser import datetime -from electrum_zcash.wallet import AddTransactionException, TX_HEIGHT_LOCAL +from electrum_zclassic.wallet import AddTransactionException, TX_HEIGHT_LOCAL from .util import * -from electrum_zcash.i18n import _ -from electrum_zcash.util import block_explorer_URL, profiler +from electrum_zclassic.i18n import _ +from electrum_zclassic.util import block_explorer_URL, profiler try: - from electrum_zcash.plot import plot_history, NothingToPlotException + from electrum_zclassic.plot import plot_history, NothingToPlotException except: plot_history = None @@ -376,7 +376,7 @@ class HistoryList(MyTreeWidget, AcceptFileDragDrop): d = WindowModalDialog(self, _('Export History')) d.setMinimumSize(400, 200) vbox = QVBoxLayout(d) - defaultname = os.path.expanduser('~/electrum-zcash-history.csv') + defaultname = os.path.expanduser('~/electrum-zclassic-history.csv') select_msg = _('Select file to export your wallet transactions to') hbox, filename_e, csv_button = filename_field(self, self.config, defaultname, select_msg) vbox.addLayout(hbox) @@ -393,7 +393,7 @@ class HistoryList(MyTreeWidget, AcceptFileDragDrop): try: self.do_export_history(self.wallet, filename, csv_button.isChecked()) except (IOError, os.error) as reason: - export_error_label = _("Electrum-Zcash was unable to produce a transaction export.") + export_error_label = _("Electrum-Zclassic was unable to produce a transaction export.") self.parent.show_critical(export_error_label + "\n" + str(reason), title=_("Unable to export history")) return self.parent.show_message(_("Your wallet history has been successfully exported.")) @@ -414,5 +414,5 @@ class HistoryList(MyTreeWidget, AcceptFileDragDrop): for line in lines: transaction.writerow(line) else: - from electrum_zcash.util import json_encode + from electrum_zclassic.util import json_encode f.write(json_encode(history)) diff --git a/gui/qt/installwizard.py b/gui/qt/installwizard.py index 1eca9295..b0779873 100644 --- a/gui/qt/installwizard.py +++ b/gui/qt/installwizard.py @@ -8,10 +8,10 @@ from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * -from electrum_zcash import Wallet, WalletStorage -from electrum_zcash.util import UserCancelled, InvalidPassword -from electrum_zcash.base_wizard import BaseWizard, HWD_SETUP_DECRYPT_WALLET -from electrum_zcash.i18n import _ +from electrum_zclassic import Wallet, WalletStorage +from electrum_zclassic.util import UserCancelled, InvalidPassword +from electrum_zclassic.base_wizard import BaseWizard, HWD_SETUP_DECRYPT_WALLET +from electrum_zclassic.i18n import _ from .seed_dialog import SeedLayout, KeysLayout from .network_dialog import NetworkChoiceLayout @@ -97,7 +97,7 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard): def __init__(self, config, app, plugins, storage): BaseWizard.__init__(self, config, storage) QDialog.__init__(self, None) - self.setWindowTitle('Electrum-Zcash - ' + _('Install Wizard')) + self.setWindowTitle('Electrum-Zclassic - ' + _('Install Wizard')) self.app = app self.config = config # Set for base base class @@ -142,7 +142,7 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard): hbox.setStretchFactor(scroll, 1) outer_vbox.addLayout(hbox) outer_vbox.addLayout(Buttons(self.back_button, self.next_button)) - self.set_icon(':icons/electrum-zcash.png') + self.set_icon(':icons/electrum-zclassic.png') self.show() self.raise_() self.refresh_gui() # Need for QT on MacOSX. Lame. @@ -169,7 +169,7 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard): hbox2.addWidget(self.pw_e) hbox2.addStretch() vbox.addLayout(hbox2) - self.set_layout(vbox, title=_('Electrum-Zcash wallet')) + self.set_layout(vbox, title=_('Electrum-Zclassic wallet')) wallet_folder = os.path.dirname(self.storage.path) @@ -276,7 +276,7 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard): path = self.storage.path if self.storage.requires_split(): self.hide() - msg = _("The wallet '{}' contains multiple accounts, which are no longer supported since Electrum-Zcash 2.7.\n\n" + msg = _("The wallet '{}' contains multiple accounts, which are no longer supported since Electrum-Zclassic 2.7.\n\n" "Do you want to split your wallet into multiple files?").format(path) if not self.question(msg): return @@ -540,10 +540,10 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard): return None def init_network(self, network): - message = _("Electrum-Zcash communicates with remote servers to get " + message = _("Electrum-Zclassic communicates with remote servers to get " "information about your transactions and addresses. The " "servers all fulfill the same purpose only differing in " - "hardware. In most cases you simply want to let Electrum-Zcash " + "hardware. In most cases you simply want to let Electrum-Zclassic " "pick one at random. However if you prefer feel free to " "select a server manually.") choices = [_("Auto connect"), _("Select server manually")] diff --git a/gui/qt/invoice_list.py b/gui/qt/invoice_list.py index 410cb4b1..150d769e 100644 --- a/gui/qt/invoice_list.py +++ b/gui/qt/invoice_list.py @@ -23,8 +23,8 @@ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -from electrum_zcash.i18n import _ -from electrum_zcash.util import format_time +from electrum_zclassic.i18n import _ +from electrum_zclassic.util import format_time from .util import * diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py index 5e19c1df..c8879fa3 100644 --- a/gui/qt/main_window.py +++ b/gui/qt/main_window.py @@ -39,19 +39,19 @@ import PyQt5.QtCore as QtCore from .exception_window import Exception_Hook from PyQt5.QtWidgets import * -from electrum_zcash import keystore, simple_config -from electrum_zcash.bitcoin import COIN, is_address, TYPE_ADDRESS -from electrum_zcash import constants -from electrum_zcash.plugins import run_hook -from electrum_zcash.i18n import _ -from electrum_zcash.util import (format_time, format_satoshis, PrintError, +from electrum_zclassic import keystore, simple_config +from electrum_zclassic.bitcoin import COIN, is_address, TYPE_ADDRESS +from electrum_zclassic import constants +from electrum_zclassic.plugins import run_hook +from electrum_zclassic.i18n import _ +from electrum_zclassic.util import (format_time, format_satoshis, PrintError, format_satoshis_plain, NotEnoughFunds, UserCancelled, NoDynamicFeeEstimates, profiler, export_meta, import_meta, bh2u, bfh, InvalidPassword) -from electrum_zcash import Transaction -from electrum_zcash import util, bitcoin, commands, coinchooser -from electrum_zcash import paymentrequest -from electrum_zcash.wallet import Multisig_Wallet, AddTransactionException +from electrum_zclassic import Transaction +from electrum_zclassic import util, bitcoin, commands, coinchooser +from electrum_zclassic import paymentrequest +from electrum_zclassic.wallet import Multisig_Wallet, AddTransactionException from .amountedit import AmountEdit, BTCAmountEdit, MyLineEdit, FeerateEdit from .qrcodewidget import QRCodeWidget, QRDialog @@ -80,7 +80,7 @@ class StatusBarButton(QPushButton): self.func() -from electrum_zcash.paymentrequest import PR_PAID +from electrum_zclassic.paymentrequest import PR_PAID class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): @@ -160,7 +160,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): if self.config.get("is_maximized"): self.showMaximized() - self.setWindowIcon(QIcon(":icons/electrum-zcash.png")) + self.setWindowIcon(QIcon(":icons/electrum-zclassic.png")) self.init_menubar() wrtabs = weakref.proxy(tabs) @@ -375,7 +375,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): self.setGeometry(100, 100, 840, 400) def watching_only_changed(self): - name = "Electrum-Zcash Testnet" if constants.net.TESTNET else "Electrum-Zcash" + name = "Electrum-Zclassic Testnet" if constants.net.TESTNET else "Electrum-Zclassic" title = '%s %s - %s' % (name, self.wallet.electrum_version, self.wallet.basename()) extra = [self.wallet.storage.get('wallet_type', '?')] @@ -393,8 +393,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): if self.wallet.is_watching_only(): msg = ' '.join([ _("This wallet is watching-only."), - _("This means you will not be able to spend Zcash coins with it."), - _("Make sure you own the seed phrase or the private keys, before you request Zcash coins to be sent to this wallet.") + _("This means you will not be able to spend Zclassic coins with it."), + _("Make sure you own the seed phrase or the private keys, before you request Zclassic coins to be sent to this wallet.") ]) self.show_warning(msg, title=_('Information')) @@ -422,7 +422,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): shutil.copy2(path, new_path) self.show_message(_("A copy of your wallet file was created in")+" '%s'" % str(new_path), title=_("Wallet backup created")) except BaseException as reason: - self.show_critical(_("Electrum-Zcash was unable to copy your wallet file to the specified location.") + "\n" + str(reason), title=_("Unable to create backup")) + self.show_critical(_("Electrum-Zclassic was unable to copy your wallet file to the specified location.") + "\n" + str(reason), title=_("Unable to create backup")) def update_recently_visited(self, filename): recent = self.config.get('recently_open', []) @@ -521,7 +521,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): tools_menu = menubar.addMenu(_("&Tools")) # Settings / Preferences are all reserved keywords in macOS using this as work around - tools_menu.addAction(_("Electrum-Zcash preferences") if sys.platform == 'darwin' else _("Preferences"), self.settings_dialog) + tools_menu.addAction(_("Electrum-Zclassic preferences") if sys.platform == 'darwin' else _("Preferences"), self.settings_dialog) tools_menu.addAction(_("&Network"), lambda: self.gui_object.show_network_dialog(self)) tools_menu.addAction(_("&Plugins"), self.plugins_dialog) tools_menu.addSeparator() @@ -541,9 +541,9 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): help_menu = menubar.addMenu(_("&Help")) help_menu.addAction(_("&About"), self.show_about) - #help_menu.addAction(_("&Official website"), lambda: webbrowser.open("https://github.com/zebra-lucky/electrum-zcash")) + #help_menu.addAction(_("&Official website"), lambda: webbrowser.open("https://github.com/zebra-lucky/electrum-zclassic")) help_menu.addSeparator() - #help_menu.addAction(_("&Documentation"), lambda: webbrowser.open("http://github.com/zebra-lucky/electrum-zcash")).setShortcut(QKeySequence.HelpContents) + #help_menu.addAction(_("&Documentation"), lambda: webbrowser.open("http://github.com/zebra-lucky/electrum-zclassic")).setShortcut(QKeySequence.HelpContents) #self._auto_crash_reports = QAction(_("&Automated Crash Reports"), self, checkable=True) #self._auto_crash_reports.setChecked(self.config.get("show_crash_reporter", default=False)) #self._auto_crash_reports.triggered.connect(self.auto_crash_reports) @@ -562,24 +562,24 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): d = self.network.get_donation_address() if d: host = self.network.get_parameters()[0] - self.pay_to_URI('zcash:%s?message=donation for %s'%(d, host)) + self.pay_to_URI('zclassic:%s?message=donation for %s'%(d, host)) else: self.show_error(_('No donation address for this server')) def show_about(self): - QMessageBox.about(self, "Electrum-Zcash", + QMessageBox.about(self, "Electrum-Zclassic", _("Version")+" %s" % (self.wallet.electrum_version) + "\n\n" + - _("Electrum-Zcash focus is speed, with low resource usage and simplifying Bitcoin. You do not need to perform regular backups, because your wallet can be recovered from a secret phrase that you can memorize or write on paper. Startup times are instant because it operates in conjunction with high-performance servers that handle the most complicated parts of the Bitcoin system." + "\n\n" + + _("Electrum-Zclassic focus is speed, with low resource usage and simplifying Bitcoin. You do not need to perform regular backups, because your wallet can be recovered from a secret phrase that you can memorize or write on paper. Startup times are instant because it operates in conjunction with high-performance servers that handle the most complicated parts of the Bitcoin system." + "\n\n" + _("Uses icons from the Icons8 icon pack (icons8.com)."))) def show_report_bug(self): msg = ' '.join([ _("Please report any bugs as issues on github:
    "), - "https://github.com/zebra-lucky/electrum-zcash/issues

    ", - _("Before reporting a bug, upgrade to the most recent version of Electrum-Zcash (latest release or git HEAD), and include the version number in your report."), + "https://github.com/zebra-lucky/electrum-zclassic/issues

    ", + _("Before reporting a bug, upgrade to the most recent version of Electrum-Zclassic (latest release or git HEAD), and include the version number in your report."), _("Try to explain not only what the bug is, but how it occurs.") ]) - self.show_message(msg, title="Electrum-Zcash - " + _("Reporting Bugs")) + self.show_message(msg, title="Electrum-Zclassic - " + _("Reporting Bugs")) def notify_transactions(self): if not self.network or not self.network.is_connected(): @@ -609,9 +609,9 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): if self.tray: try: # this requires Qt 5.9 - self.tray.showMessage("Electrum-Zcash", message, QIcon(":icons/electrum_dark_icon"), 20000) + self.tray.showMessage("Electrum-Zclassic", message, QIcon(":icons/electrum_dark_icon"), 20000) except TypeError: - self.tray.showMessage("Electrum-Zcash", message, QSystemTrayIcon.Information, 20000) + self.tray.showMessage("Electrum-Zclassic", message, QSystemTrayIcon.Information, 20000) @@ -666,11 +666,11 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): def base_unit(self): assert self.decimal_point in [2, 5, 8] if self.decimal_point == 2: - return 'uZEC' + return 'uZCL' if self.decimal_point == 5: - return 'mZEC' + return 'mZCL' if self.decimal_point == 8: - return 'ZEC' + return 'ZCL' raise Exception('Unknown base unit') def connect_fields(self, window, btc_e, fiat_e, fee_e): @@ -798,7 +798,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): self.receive_address_e = ButtonsLineEdit() self.receive_address_e.addCopyButton(self.app) self.receive_address_e.setReadOnly(True) - msg = _('Zcash address where the payment should be received. Note that each payment request uses a different Zcash address.') + msg = _('Zclassic address where the payment should be received. Note that each payment request uses a different Zclassic address.') self.receive_address_label = HelpLabel(_('Receiving address'), msg) self.receive_address_e.textChanged.connect(self.update_receive_qr) self.receive_address_e.setFocusPolicy(Qt.ClickFocus) @@ -828,8 +828,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): msg = ' '.join([ _('Expiration date of your request.'), _('This information is seen by the recipient if you send them a signed payment request.'), - _('Expired requests have to be deleted manually from your list, in order to free the corresponding Zcash addresses.'), - _('The Zcash address never expires and will always be part of this electrum-zcash wallet.'), + _('Expired requests have to be deleted manually from your list, in order to free the corresponding Zclassic addresses.'), + _('The Zclassic address never expires and will always be part of this electrum-zclassic wallet.'), ]) grid.addWidget(HelpLabel(_('Request expires'), msg), 3, 0) grid.addWidget(self.expires_combo, 3, 1) @@ -1055,7 +1055,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): self.amount_e = BTCAmountEdit(self.get_decimal_point) self.payto_e = PayToEdit(self) msg = _('Recipient of the funds.') + '\n\n'\ - + _('You may enter a Zcash address, a label from your list of contacts (a list of completions will be proposed), or an alias (email-like address that forwards to a Zcash address)') + + _('You may enter a Zclassic address, a label from your list of contacts (a list of completions will be proposed), or an alias (email-like address that forwards to a Zclassic address)') payto_label = HelpLabel(_('Pay to'), msg) grid.addWidget(payto_label, 1, 0) grid.addWidget(self.payto_e, 1, 1, 1, -1) @@ -1102,7 +1102,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): hbox.addStretch(1) grid.addLayout(hbox, 4, 4) - msg = _('Zcash transactions are in general not free. A transaction fee is paid by the sender of the funds.') + '\n\n'\ + msg = _('Zclassic transactions are in general not free. A transaction fee is paid by the sender of the funds.') + '\n\n'\ + _('The amount of fee can be decided freely by the sender. However, transactions with low fees take more time to be processed.') + '\n\n'\ + _('A suggested fee is automatically added to this field. You may override it. The suggested fee increases with the size of the transaction.') self.fee_e_label = HelpLabel(_('Fee'), msg) @@ -1163,7 +1163,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): def feerounding_onclick(): text = (self.feerounding_text + '\n\n' + - _('To somewhat protect your privacy, Electrum-Zcash tries to create change with similar precision to other outputs.') + ' ' + + _('To somewhat protect your privacy, Electrum-Zclassic tries to create change with similar precision to other outputs.') + ' ' + _('At most 100 satoshis might be lost due to this rounding.') + ' ' + _("You can disable this setting in '{}'.").format(_('Preferences')) + '\n' + _('Also, dust is not kept as change, but added to the fee.')) @@ -1486,10 +1486,10 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): for _type, addr, amount in outputs: if addr is None: - self.show_error(_('Zcash Address is None')) + self.show_error(_('Zclassic Address is None')) return if _type == TYPE_ADDRESS and not bitcoin.is_address(addr): - self.show_error(_('Invalid Zcash Address')) + self.show_error(_('Invalid Zclassic Address')) return if amount is None: self.show_error(_('Invalid Amount')) @@ -1705,7 +1705,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): try: out = util.parse_URI(URI, self.on_pr) except BaseException as e: - self.show_error(_('Invalid zcash URI:') + '\n' + str(e)) + self.show_error(_('Invalid zclassic URI:') + '\n' + str(e)) return self.show_send_tab() r = out.get('r') @@ -1964,7 +1964,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): self.send_button.setVisible(not self.wallet.is_watching_only()) def change_password_dialog(self): - from electrum_zcash.storage import STO_EV_XPUB_PW + from electrum_zclassic.storage import STO_EV_XPUB_PW if self.wallet.get_available_storage_encryption_version() == STO_EV_XPUB_PW: from .password_dialog import ChangePasswordDialogForHW d = ChangePasswordDialogForHW(self, self.wallet) @@ -2154,7 +2154,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): address = address.text().strip() message = message.toPlainText().strip() if not bitcoin.is_address(address): - self.show_message(_('Invalid Zcash address.')) + self.show_message(_('Invalid Zclassic address.')) return if self.wallet.is_watching_only(): self.show_message(_('This is a watching-only wallet.')) @@ -2182,7 +2182,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): address = address.text().strip() message = message.toPlainText().strip().encode('utf-8') if not bitcoin.is_address(address): - self.show_message(_('Invalid Zcash address.')) + self.show_message(_('Invalid Zclassic address.')) return try: # This can throw on invalid base64 @@ -2305,16 +2305,16 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): return d.run() def tx_from_text(self, txt): - from electrum_zcash.transaction import tx_from_str + from electrum_zclassic.transaction import tx_from_str try: tx = tx_from_str(txt) return Transaction(tx) except BaseException as e: - self.show_critical(_("Electrum-Zcash was unable to parse your transaction") + ":\n" + str(e)) + self.show_critical(_("Electrum-Zclassic was unable to parse your transaction") + ":\n" + str(e)) return def read_tx_from_qrcode(self): - from electrum_zcash import qrscanner + from electrum_zclassic import qrscanner try: data = qrscanner.scan_barcode(self.config.get_video_device()) except BaseException as e: @@ -2322,8 +2322,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): return if not data: return - # if the user scanned a zcash URI - if str(data).startswith("zcash:"): + # if the user scanned a zclassic URI + if str(data).startswith("zclassic:"): self.pay_to_URI(data) return # else if the user scanned an offline signed tx @@ -2345,7 +2345,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): with open(fileName, "r") as f: file_content = f.read() except (ValueError, IOError, os.error) as reason: - self.show_critical(_("Electrum-Zcash was unable to open your transaction file") + "\n" + str(reason), title=_("Unable to read file or no transaction found")) + self.show_critical(_("Electrum-Zclassic was unable to open your transaction file") + "\n" + str(reason), title=_("Unable to read file or no transaction found")) return return self.tx_from_text(file_content) @@ -2363,7 +2363,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): self.show_transaction(tx) def do_process_from_txid(self): - from electrum_zcash import transaction + from electrum_zclassic import transaction txid, ok = QInputDialog.getText(self, _('Lookup transaction'), _('Transaction ID') + ':') if ok and txid: txid = str(txid).strip() @@ -2398,7 +2398,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): e.setReadOnly(True) vbox.addWidget(e) - defaultname = 'electrum-zcash-private-keys.csv' + defaultname = 'electrum-zclassic-private-keys.csv' select_msg = _('Select file to export your private keys to') hbox, filename_e, csv_button = filename_field(self, self.config, defaultname, select_msg) vbox.addLayout(hbox) @@ -2456,7 +2456,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): self.do_export_privkeys(filename, private_keys, csv_button.isChecked()) except (IOError, os.error) as reason: txt = "\n".join([ - _("Electrum-Zcash was unable to produce a private key-export."), + _("Electrum-Zclassic was unable to produce a private key-export."), str(reason) ]) self.show_critical(txt, title=_("Unable to create csv")) @@ -2538,7 +2538,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): address_e.textChanged.connect(on_address) if not d.exec_(): return - from electrum_zcash.wallet import sweep_preparations + from electrum_zclassic.wallet import sweep_preparations try: self.do_clear() coins, keypairs = sweep_preparations(get_pk(), self.network) @@ -2611,7 +2611,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): lang_help = _('Select which language is used in the GUI (after restart).') lang_label = HelpLabel(_('Language') + ':', lang_help) lang_combo = QComboBox() - from electrum_zcash.i18n import languages + from electrum_zclassic.i18n import languages lang_combo.addItems(list(languages.values())) try: index = languages.keys().index(self.config.get("language",'')) @@ -2720,9 +2720,9 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): SSL_id_e.setReadOnly(True) id_widgets.append((SSL_id_label, SSL_id_e)) - units = ['ZEC', 'mZEC', 'uZEC'] + units = ['ZCL', 'mZCL', 'uZCL'] msg = (_('Base unit of your wallet.') - + '\n1 ZEC = 1000 mZEC. 1 mZEC = 1000 uZEC.\n' + + '\n1 ZCL = 1000 mZCL. 1 mZCL = 1000 uZCL.\n' + _('This setting affects the Send tab, and all balance related fields.')) unit_label = HelpLabel(_('Base unit') + ':', msg) unit_combo = QComboBox() @@ -2734,11 +2734,11 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): return edits = self.amount_e, self.fee_e, self.receive_amount_e amounts = [edit.get_amount() for edit in edits] - if unit_result == 'ZEC': + if unit_result == 'ZCL': self.decimal_point = 8 - elif unit_result == 'mZEC': + elif unit_result == 'mZCL': self.decimal_point = 5 - elif unit_result == 'uZEC': + elif unit_result == 'uZCL': self.decimal_point = 2 else: raise Exception('Unknown base unit') @@ -2765,7 +2765,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): block_ex_combo.currentIndexChanged.connect(on_be) gui_widgets.append((block_ex_label, block_ex_combo)) - from electrum_zcash import qrscanner + from electrum_zclassic import qrscanner system_cameras = qrscanner._find_system_cameras() qr_combo = QComboBox() qr_combo.addItem("Default","default") @@ -2986,7 +2986,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): run_hook('close_settings_dialog') if self.need_restart: - self.show_warning(_('Please restart Electrum-Zcash to activate the new GUI settings'), title=_('Success')) + self.show_warning(_('Please restart Electrum-Zclassic to activate the new GUI settings'), title=_('Success')) def closeEvent(self, event): @@ -3013,7 +3013,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): self.gui_object.close_window(self) def plugins_dialog(self): - self.pluginsdialog = d = WindowModalDialog(self, _('Electrum-Zcash Plugins')) + self.pluginsdialog = d = WindowModalDialog(self, _('Electrum-Zclassic Plugins')) plugins = self.gui_object.plugins diff --git a/gui/qt/network_dialog.py b/gui/qt/network_dialog.py index 479f1bcb..3c9689da 100644 --- a/gui/qt/network_dialog.py +++ b/gui/qt/network_dialog.py @@ -30,10 +30,10 @@ from PyQt5.QtCore import * from PyQt5.QtWidgets import * import PyQt5.QtCore as QtCore -from electrum_zcash.i18n import _ -from electrum_zcash import constants -from electrum_zcash.util import print_error -from electrum_zcash.network import serialize_server, deserialize_server +from electrum_zclassic.i18n import _ +from electrum_zclassic import constants +from electrum_zclassic.util import print_error +from electrum_zclassic.network import serialize_server, deserialize_server from .util import * @@ -214,8 +214,8 @@ class NetworkChoiceLayout(object): self.autoconnect_cb.clicked.connect(self.update) msg = ' '.join([ - _("If auto-connect is enabled, Electrum-Zcash will always use a server that is on the longest blockchain."), - _("If it is disabled, you have to choose a server you want to use. Electrum-Zcash will warn you if your server is lagging.") + _("If auto-connect is enabled, Electrum-Zclassic will always use a server that is on the longest blockchain."), + _("If it is disabled, you have to choose a server you want to use. Electrum-Zclassic will warn you if your server is lagging.") ]) grid.addWidget(self.autoconnect_cb, 0, 0, 1, 3) grid.addWidget(HelpButton(msg), 0, 4) @@ -270,7 +270,7 @@ class NetworkChoiceLayout(object): grid.addWidget(self.tor_cb, 1, 0, 1, 3) grid.addWidget(self.proxy_cb, 2, 0, 1, 3) - grid.addWidget(HelpButton(_('Proxy settings apply to all connections: with Electrum-Zcash servers, but also with third-party services.')), 2, 4) + grid.addWidget(HelpButton(_('Proxy settings apply to all connections: with Electrum-Zclassic servers, but also with third-party services.')), 2, 4) grid.addWidget(self.proxy_mode, 4, 1) grid.addWidget(self.proxy_host, 4, 2) grid.addWidget(self.proxy_port, 4, 3) @@ -281,7 +281,7 @@ class NetworkChoiceLayout(object): # Blockchain Tab grid = QGridLayout(blockchain_tab) msg = ' '.join([ - _("Electrum-Zcash connects to several nodes in order to download block headers and find out the longest blockchain."), + _("Electrum-Zclassic connects to several nodes in order to download block headers and find out the longest blockchain."), _("This blockchain is used to verify the transactions sent by your transaction server.") ]) self.status_label = QLabel('') @@ -290,7 +290,7 @@ class NetworkChoiceLayout(object): grid.addWidget(HelpButton(msg), 0, 4) self.server_label = QLabel('') - msg = _("Electrum-Zcash sends your wallet addresses to a single server, in order to receive your transaction history.") + msg = _("Electrum-Zclassic sends your wallet addresses to a single server, in order to receive your transaction history.") grid.addWidget(QLabel(_('Server') + ':'), 1, 0) grid.addWidget(self.server_label, 1, 1, 1, 3) grid.addWidget(HelpButton(msg), 1, 4) diff --git a/gui/qt/password_dialog.py b/gui/qt/password_dialog.py index 689e75d6..046d0626 100644 --- a/gui/qt/password_dialog.py +++ b/gui/qt/password_dialog.py @@ -26,12 +26,12 @@ from PyQt5.QtCore import Qt from PyQt5.QtGui import * from PyQt5.QtWidgets import * -from electrum_zcash.i18n import _ +from electrum_zclassic.i18n import _ from .util import * import re import math -from electrum_zcash.plugins import run_hook +from electrum_zclassic.plugins import run_hook def check_password_strength(password): @@ -248,7 +248,7 @@ class ChangePasswordDialogForSW(ChangePasswordDialogBase): msg += ' ' + _('Use this dialog to add a password to your wallet.') else: if not is_encrypted: - msg = _('Your Zcash coins are password protected. However, your wallet file is not encrypted.') + msg = _('Your Zclassic coins are password protected. However, your wallet file is not encrypted.') else: msg = _('Your wallet is password protected and encrypted.') msg += ' ' + _('Use this dialog to change your password.') diff --git a/gui/qt/paytoedit.py b/gui/qt/paytoedit.py index a53ebffa..01a7b0ed 100644 --- a/gui/qt/paytoedit.py +++ b/gui/qt/paytoedit.py @@ -28,8 +28,8 @@ from PyQt5.QtWidgets import QLineEdit import re from decimal import Decimal -from electrum_zcash import bitcoin -from electrum_zcash.util import bfh +from electrum_zclassic import bitcoin +from electrum_zclassic.util import bfh from .qrtextedit import ScanQRTextEdit from .completion_text_edit import CompletionTextEdit @@ -90,7 +90,7 @@ class PayToEdit(CompletionTextEdit, ScanQRTextEdit): return bitcoin.TYPE_SCRIPT, script def parse_script(self, x): - from electrum_zcash.transaction import opcodes, push_script + from electrum_zclassic.transaction import opcodes, push_script script = '' for word in x.split(): if word[0:3] == 'OP_': @@ -127,7 +127,7 @@ class PayToEdit(CompletionTextEdit, ScanQRTextEdit): self.payto_address = None if len(lines) == 1: data = lines[0] - if data.startswith("zcash:"): + if data.startswith("zclassic:"): self.scan_f(data) return try: @@ -202,7 +202,7 @@ class PayToEdit(CompletionTextEdit, ScanQRTextEdit): def qr_input(self): data = super(PayToEdit,self).qr_input() - if data.startswith("zcash:"): + if data.startswith("zclassic:"): self.scan_f(data) # TODO: update fee diff --git a/gui/qt/qrcodewidget.py b/gui/qt/qrcodewidget.py index 4a53290f..4e563a74 100644 --- a/gui/qt/qrcodewidget.py +++ b/gui/qt/qrcodewidget.py @@ -8,8 +8,8 @@ from PyQt5.QtWidgets import ( import os import qrcode -import electrum_zcash -from electrum_zcash.i18n import _ +import electrum_zclassic +from electrum_zclassic.i18n import _ from .util import WindowModalDialog @@ -102,7 +102,7 @@ class QRDialog(WindowModalDialog): hbox = QHBoxLayout() hbox.addStretch(1) - config = electrum_zcash.get_config() + config = electrum_zclassic.get_config() if config: filename = os.path.join(config.path, "qrcode.png") diff --git a/gui/qt/qrtextedit.py b/gui/qt/qrtextedit.py index 1417b6d3..ec0db302 100644 --- a/gui/qt/qrtextedit.py +++ b/gui/qt/qrtextedit.py @@ -1,6 +1,6 @@ -from electrum_zcash.i18n import _ -from electrum_zcash.plugins import run_hook +from electrum_zclassic.i18n import _ +from electrum_zclassic.plugins import run_hook from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWidgets import QFileDialog @@ -55,7 +55,7 @@ class ScanQRTextEdit(ButtonsTextEdit, MessageBoxMixin): self.setText(data) def qr_input(self): - from electrum_zcash import qrscanner, get_config + from electrum_zclassic import qrscanner, get_config try: data = qrscanner.scan_barcode(get_config().get_video_device()) except BaseException as e: diff --git a/gui/qt/qrwindow.py b/gui/qt/qrwindow.py index db17a1e7..9761f797 100644 --- a/gui/qt/qrwindow.py +++ b/gui/qt/qrwindow.py @@ -29,8 +29,8 @@ from PyQt5.QtCore import Qt from PyQt5.QtGui import * from PyQt5.QtWidgets import QHBoxLayout, QVBoxLayout, QLabel, QWidget -from electrum_zcash_gui.qt.qrcodewidget import QRCodeWidget -from electrum_zcash.i18n import _ +from electrum_zclassic_gui.qt.qrcodewidget import QRCodeWidget +from electrum_zclassic.i18n import _ if platform.system() == 'Windows': MONOSPACE_FONT = 'Lucida Console' @@ -46,7 +46,7 @@ class QR_Window(QWidget): def __init__(self, win): QWidget.__init__(self) self.win = win - self.setWindowTitle('Electrum-Zcash - '+_('Payment Request')) + self.setWindowTitle('Electrum-Zclassic - '+_('Payment Request')) self.setMinimumSize(800, 250) self.address = '' self.label = '' diff --git a/gui/qt/request_list.py b/gui/qt/request_list.py index 1c719761..d70d1c62 100644 --- a/gui/qt/request_list.py +++ b/gui/qt/request_list.py @@ -23,10 +23,10 @@ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -from electrum_zcash.i18n import _ -from electrum_zcash.util import format_time, age -from electrum_zcash.plugins import run_hook -from electrum_zcash.paymentrequest import PR_UNKNOWN +from electrum_zclassic.i18n import _ +from electrum_zclassic.util import format_time, age +from electrum_zclassic.plugins import run_hook +from electrum_zclassic.paymentrequest import PR_UNKNOWN from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWidgets import QTreeWidgetItem, QMenu diff --git a/gui/qt/seed_dialog.py b/gui/qt/seed_dialog.py index 90843df5..3edc8a33 100644 --- a/gui/qt/seed_dialog.py +++ b/gui/qt/seed_dialog.py @@ -23,9 +23,9 @@ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -from electrum_zcash.i18n import _ -from electrum_zcash.mnemonic import Mnemonic -import electrum_zcash.old_mnemonic +from electrum_zclassic.i18n import _ +from electrum_zclassic.mnemonic import Mnemonic +import electrum_zclassic.old_mnemonic from .util import * from .qrtextedit import ShowQRTextEdit, ScanQRTextEdit @@ -68,10 +68,10 @@ class SeedLayout(QVBoxLayout): if b: msg = ' '.join([ '' + _('Warning') + ': ', - _('BIP39 seeds can be imported in Electrum-Zcash, so that users can access funds locked in other wallets.'), + _('BIP39 seeds can be imported in Electrum-Zclassic, so that users can access funds locked in other wallets.'), _('However, we do not generate BIP39 seeds, because they do not meet our safety standard.'), _('BIP39 seeds do not include a version number, which compromises compatibility with future software.'), - _('We do not guarantee that BIP39 imports will always be supported in Electrum-Zcash.'), + _('We do not guarantee that BIP39 imports will always be supported in Electrum-Zclassic.'), ]) else: msg = '' @@ -136,7 +136,7 @@ class SeedLayout(QVBoxLayout): def initialize_completer(self): english_list = Mnemonic('en').wordlist - old_list = electrum_zcash.old_mnemonic.words + old_list = electrum_zclassic.old_mnemonic.words self.wordlist = english_list + list(set(old_list) - set(english_list)) #concat both lists self.wordlist.sort() self.completer = QCompleter(self.wordlist) @@ -147,14 +147,14 @@ class SeedLayout(QVBoxLayout): return ' '.join(text.split()) def on_edit(self): - from electrum_zcash.bitcoin import seed_type + from electrum_zclassic.bitcoin import seed_type s = self.get_seed() b = self.is_seed(s) if not self.is_bip39: t = seed_type(s) label = _('Seed Type') + ': ' + t if t else '' else: - from electrum_zcash.keystore import bip39_is_checksum_valid + from electrum_zclassic.keystore import bip39_is_checksum_valid is_checksum, is_wordlist = bip39_is_checksum_valid(s) status = ('checksum: ' + ('ok' if is_checksum else 'failed')) if is_wordlist else 'unknown wordlist' label = 'BIP39' + ' (%s)'%status @@ -189,7 +189,7 @@ class KeysLayout(QVBoxLayout): class SeedDialog(WindowModalDialog): def __init__(self, parent, seed, passphrase): - WindowModalDialog.__init__(self, parent, ('Electrum-Zcash - ' + _('Seed'))) + WindowModalDialog.__init__(self, parent, ('Electrum-Zclassic - ' + _('Seed'))) self.setMinimumWidth(400) vbox = QVBoxLayout(self) title = _("Your wallet generation seed is:") diff --git a/gui/qt/transaction_dialog.py b/gui/qt/transaction_dialog.py index b08ff98c..f97ffe64 100644 --- a/gui/qt/transaction_dialog.py +++ b/gui/qt/transaction_dialog.py @@ -31,14 +31,14 @@ from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * -from electrum_zcash.bitcoin import base_encode -from electrum_zcash.i18n import _ -from electrum_zcash.plugins import run_hook -from electrum_zcash import simple_config +from electrum_zclassic.bitcoin import base_encode +from electrum_zclassic.i18n import _ +from electrum_zclassic.plugins import run_hook +from electrum_zclassic import simple_config -from electrum_zcash.util import bfh -from electrum_zcash.wallet import AddTransactionException -from electrum_zcash.transaction import SerializationError +from electrum_zclassic.util import bfh +from electrum_zclassic.wallet import AddTransactionException +from electrum_zclassic.transaction import SerializationError from .util import * @@ -50,7 +50,7 @@ def show_transaction(tx, parent, desc=None, prompt_if_unsaved=False): d = TxDialog(tx, parent, desc, prompt_if_unsaved) except SerializationError as e: traceback.print_exc(file=sys.stderr) - parent.show_critical(_("Electrum-Zcash was unable to deserialize the transaction:") + "\n" + str(e)) + parent.show_critical(_("Electrum-Zclassic was unable to deserialize the transaction:") + "\n" + str(e)) else: dialogs.append(d) d.show() diff --git a/gui/qt/util.py b/gui/qt/util.py index d7dcabae..e79b03ad 100644 --- a/gui/qt/util.py +++ b/gui/qt/util.py @@ -10,9 +10,9 @@ from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWidgets import * -from electrum_zcash.i18n import _ -from electrum_zcash.util import FileImportFailed, FileExportFailed -from electrum_zcash.paymentrequest import PR_UNPAID, PR_PAID, PR_EXPIRED +from electrum_zclassic.i18n import _ +from electrum_zclassic.util import FileImportFailed, FileExportFailed +from electrum_zclassic.paymentrequest import PR_UNPAID, PR_PAID, PR_EXPIRED if platform.system() == 'Windows': diff --git a/gui/qt/utxo_list.py b/gui/qt/utxo_list.py index 8ac344af..80cea10e 100644 --- a/gui/qt/utxo_list.py +++ b/gui/qt/utxo_list.py @@ -23,7 +23,7 @@ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. from .util import * -from electrum_zcash.i18n import _ +from electrum_zclassic.i18n import _ class UTXOList(MyTreeWidget): diff --git a/gui/stdio.py b/gui/stdio.py index ddb665e0..b7551fa8 100644 --- a/gui/stdio.py +++ b/gui/stdio.py @@ -1,9 +1,9 @@ from decimal import Decimal _ = lambda x:x #from i18n import _ -from electrum_zcash import WalletStorage, Wallet -from electrum_zcash.util import format_satoshis, set_verbosity -from electrum_zcash.bitcoin import is_address, COIN, TYPE_ADDRESS +from electrum_zclassic import WalletStorage, Wallet +from electrum_zclassic.util import format_satoshis, set_verbosity +from electrum_zclassic.bitcoin import is_address, COIN, TYPE_ADDRESS import getpass, datetime # minimal fdisk like gui for console usage @@ -16,7 +16,7 @@ class ElectrumGui: self.network = daemon.network storage = WalletStorage(config.get_wallet_path()) if not storage.file_exists: - print("Wallet not found. try 'electrum-zcash create'") + print("Wallet not found. try 'electrum-zclassic create'") exit() if storage.is_encrypted(): password = getpass.getpass('Password:', stream=None) @@ -163,7 +163,7 @@ class ElectrumGui: def do_send(self): if not is_address(self.str_recipient): - print(_('Invalid Zcash address')) + print(_('Invalid Zclassic address')) return try: amount = int(Decimal(self.str_amount) * COIN) @@ -208,12 +208,12 @@ class ElectrumGui: print(_('Error')) def network_dialog(self): - print("use 'electrum-zcash setconfig server/proxy' to change your network settings") + print("use 'electrum-zclassic setconfig server/proxy' to change your network settings") return True def settings_dialog(self): - print("use 'electrum-zcash setconfig' to change your settings") + print("use 'electrum-zclassic setconfig' to change your settings") return True def password_dialog(self): diff --git a/gui/text.py b/gui/text.py index b6c22a74..06e1380d 100644 --- a/gui/text.py +++ b/gui/text.py @@ -3,10 +3,10 @@ import curses, datetime, locale from decimal import Decimal import getpass -import electrum_zcash -from electrum_zcash.util import format_satoshis, set_verbosity -from electrum_zcash.bitcoin import is_address, COIN, TYPE_ADDRESS -from electrum_zcash import Wallet, WalletStorage +import electrum_zclassic +from electrum_zclassic.util import format_satoshis, set_verbosity +from electrum_zclassic.bitcoin import is_address, COIN, TYPE_ADDRESS +from electrum_zclassic import Wallet, WalletStorage _ = lambda x:x @@ -20,7 +20,7 @@ class ElectrumGui: self.network = daemon.network storage = WalletStorage(config.get_wallet_path()) if not storage.file_exists(): - print("Wallet not found. try 'electrum-zcash create'") + print("Wallet not found. try 'electrum-zclassic create'") exit() if storage.is_encrypted(): password = getpass.getpass('Password:', stream=None) @@ -320,7 +320,7 @@ class ElectrumGui: def do_send(self): if not is_address(self.str_recipient): - self.show_message(_('Invalid Zcash address')) + self.show_message(_('Invalid Zclassic address')) return try: amount = int(Decimal(self.str_amount) * COIN) @@ -392,7 +392,7 @@ class ElectrumGui: self.show_message("Error:" + server + "\nIn doubt, type \"auto-connect\"") return False if out.get('server') or out.get('proxy'): - proxy = electrum_zcash.network.deserialize_proxy(out.get('proxy')) if out.get('proxy') else proxy_config + proxy = electrum_zclassic.network.deserialize_proxy(out.get('proxy')) if out.get('proxy') else proxy_config self.network.set_parameters(host, port, protocol, proxy, auto_connect) def settings_dialog(self): diff --git a/icons.qrc b/icons.qrc index 7370cb04..f3498834 100644 --- a/icons.qrc +++ b/icons.qrc @@ -1,6 +1,6 @@ - icons/electrum-zcash.png + icons/electrum-zclassic.png icons/clock1.png icons/clock2.png icons/clock3.png diff --git a/icons/electrum-zcash.ico b/icons/electrum-zcash.ico deleted file mode 100644 index 620129a6..00000000 Binary files a/icons/electrum-zcash.ico and /dev/null differ diff --git a/icons/electrum-zcash.png b/icons/electrum-zcash.png deleted file mode 100644 index 4490f895..00000000 Binary files a/icons/electrum-zcash.png and /dev/null differ diff --git a/icons/electrum-zclassic.ico b/icons/electrum-zclassic.ico new file mode 100644 index 00000000..37855774 Binary files /dev/null and b/icons/electrum-zclassic.ico differ diff --git a/icons/electrum-zclassic.png b/icons/electrum-zclassic.png new file mode 100644 index 00000000..2f62af42 Binary files /dev/null and b/icons/electrum-zclassic.png differ diff --git a/icons/electrum.icns b/icons/electrum.icns new file mode 100644 index 00000000..62c3fc55 Binary files /dev/null and b/icons/electrum.icns differ diff --git a/icons/electrum_dark_icon.png b/icons/electrum_dark_icon.png index 0dad8037..6fee7de9 100644 Binary files a/icons/electrum_dark_icon.png and b/icons/electrum_dark_icon.png differ diff --git a/icons/electrum_light_icon.png b/icons/electrum_light_icon.png index 02fecf67..da52cb3c 100644 Binary files a/icons/electrum_light_icon.png and b/icons/electrum_light_icon.png differ diff --git a/icons/electrum_presplash.png b/icons/electrum_presplash.png index f8fba319..8d7b414d 100644 Binary files a/icons/electrum_presplash.png and b/icons/electrum_presplash.png differ diff --git a/lib/base_wizard.py b/lib/base_wizard.py index 0df8fc94..6250dcae 100644 --- a/lib/base_wizard.py +++ b/lib/base_wizard.py @@ -90,7 +90,7 @@ class BaseWizard(object): wallet_kinds = [ ('standard', _("Standard wallet")), ('multisig', _("Multi-signature wallet")), - ('imported', _("Import Zcash addresses or private keys")), + ('imported', _("Import Zclassic addresses or private keys")), ] choices = [pair for pair in wallet_kinds if pair[0] in wallet_types] self.choice_dialog(title=title, message=message, choices=choices, run_next=self.on_wallet_type) @@ -139,8 +139,8 @@ class BaseWizard(object): def import_addresses_or_keys(self): v = lambda x: keystore.is_address_list(x) or keystore.is_private_key_list(x) - title = _("Import Zcash Addresses") - message = _("Enter a list of Zcash addresses (this will create a watching-only wallet), or a list of private keys.") + title = _("Import Zclassic Addresses") + message = _("Enter a list of Zclassic addresses (this will create a watching-only wallet), or a list of private keys.") self.add_xpub_dialog(title=title, message=message, run_next=self.on_import, is_valid=v, allow_multi=True) @@ -512,5 +512,5 @@ class BaseWizard(object): self.wallet.synchronize() self.wallet.storage.write() self.terminate() - msg = _("Electrum-Zcash is generating your addresses, please wait...") + msg = _("Electrum-Zclassic is generating your addresses, please wait...") self.waiting_dialog(task, msg) diff --git a/lib/bitcoin.py b/lib/bitcoin.py index 929553e7..045fedb7 100644 --- a/lib/bitcoin.py +++ b/lib/bitcoin.py @@ -550,7 +550,7 @@ from ecdsa.util import string_to_number, number_to_string def msg_magic(message): length = bfh(var_int(len(message))) - return b"\x18Zcash Signed Message:\n" + length + message + return b"\x18Zclassic Signed Message:\n" + length + message def verify_message(address, sig, message): diff --git a/lib/commands.py b/lib/commands.py index d24cd8bb..00885e29 100644 --- a/lib/commands.py +++ b/lib/commands.py @@ -81,7 +81,7 @@ def command(s): wallet = args[0].wallet password = kwargs.get('password') if c.requires_wallet and wallet is None: - raise Exception("wallet not loaded. Use 'electrum-zcash daemon load_wallet'") + raise Exception("wallet not loaded. Use 'electrum-zclassic daemon load_wallet'") if c.requires_password and password is None and wallet.has_password(): return {'error': 'Password required' } return func(*args, **kwargs) @@ -130,8 +130,8 @@ class Commands: @command('wn') def restore(self, text): """Restore a wallet from text. Text can be a seed phrase, a master - public key, a master private key, a list of Zcash addresses - or Zcash private keys. If you want to be prompted for your + public key, a master private key, a list of Zclassic addresses + or Zclassic private keys. If you want to be prompted for your seed, type '?' or ':' (concealed) """ raise Exception('Not a JSON-RPC command') @@ -293,7 +293,7 @@ class Commands: @command('') def dumpprivkeys(self): """Deprecated.""" - return "This command is deprecated. Use a pipe instead: 'electrum-zcash listaddresses | electrum-zcash getprivatekeys - '" + return "This command is deprecated. Use a pipe instead: 'electrum-zclassic listaddresses | electrum-zclassic getprivatekeys - '" @command('') def validateaddress(self, address): @@ -329,7 +329,7 @@ class Commands: @command('n') def getmerkle(self, txid, height): - """Get Merkle branch of a transaction included in a block. Electrum-Zcash + """Get Merkle branch of a transaction included in a block. Electrum-Zclassic uses this to verify transactions (Simple Payment Verification).""" return self.network.synchronous_get(('blockchain.transaction.get_merkle', [txid, int(height)])) @@ -340,7 +340,7 @@ class Commands: @command('') def version(self): - """Return the version of Electrum-Zcash.""" + """Return the version of Electrum-Zclassic.""" from .version import ELECTRUM_VERSION return ELECTRUM_VERSION @@ -419,7 +419,7 @@ class Commands: coins = self.wallet.get_spendable_coins(domain, self.config) tx = self.wallet.make_unsigned_transaction(coins, final_outputs, self.config, fee, change_addr) - if locktime != None: + if locktime != None: tx.locktime = locktime if not unsigned: run_hook('sign_tx', self.wallet, tx) @@ -460,7 +460,7 @@ class Commands: @command('w') def setlabel(self, key, label): - """Assign a label to an item. Item may be a Zcash address or a + """Assign a label to an item. Item may be a Zclassic address or a transaction ID""" self.wallet.set_label(key, label) @@ -538,7 +538,7 @@ class Commands: PR_PAID: 'Paid', PR_EXPIRED: 'Expired', } - out['amount (ZEC)'] = format_satoshis(out.get('amount')) + out['amount (ZCL)'] = format_satoshis(out.get('amount')) out['status'] = pr_str[out.get('status', PR_UNKNOWN)] return out @@ -674,8 +674,8 @@ class Commands: param_descriptions = { 'privkey': 'Private key. Type \'?\' to get a prompt.', - 'destination': 'Zcash address, contact or alias', - 'address': 'Zcash address', + 'destination': 'Zclassic address, contact or alias', + 'address': 'Zclassic address', 'seed': 'Seed phrase', 'txid': 'Transaction ID', 'pos': 'Position', @@ -685,8 +685,8 @@ param_descriptions = { 'pubkey': 'Public key', 'message': 'Clear text message. Use quotes if it contains spaces.', 'encrypted': 'Encrypted message', - 'amount': 'Amount to be sent (in ZEC). Type \'!\' to send the maximum available.', - 'requested_amount': 'Requested amount (in ZEC).', + 'amount': 'Amount to be sent (in ZCL). Type \'!\' to send the maximum available.', + 'requested_amount': 'Requested amount (in ZCL).', 'outputs': 'list of ["address", amount]', 'redeem_script': 'redeem script (hexadecimal)', 'cpfile': 'Checkpoints file', @@ -704,7 +704,7 @@ command_options = { 'labels': ("-l", "Show the labels of listed addresses"), 'nocheck': (None, "Do not verify aliases"), 'imax': (None, "Maximum number of inputs"), - 'fee': ("-f", "Transaction fee (in ZEC)"), + 'fee': ("-f", "Transaction fee (in ZCL)"), 'from_addr': ("-F", "Source address (must be a wallet address; use sweep to spend from non-wallet address)."), 'change_addr': ("-c", "Change address. Default is a spare address, or the source address if it's not in the wallet"), 'nbits': (None, "Number of bits of entropy"), @@ -750,10 +750,10 @@ config_variables = { 'requests_dir': 'directory where a bip70 file will be written.', 'ssl_privkey': 'Path to your SSL private key, needed to sign the request.', 'ssl_chain': 'Chain of SSL certificates, needed for signed requests. Put your certificate at the top and the root CA at the end', - 'url_rewrite': 'Parameters passed to str.replace(), in order to create the r= part of zcash: URIs. Example: \"(\'file:///var/www/\',\'https://electrum.z.cash/\')\"', + 'url_rewrite': 'Parameters passed to str.replace(), in order to create the r= part of zclassic: URIs. Example: \"(\'file:///var/www/\',\'https://electrum.z.cash/\')\"', }, 'listrequests':{ - 'url_rewrite': 'Parameters passed to str.replace(), in order to create the r= part of zcash: URIs. Example: \"(\'file:///var/www/\',\'https://electrum.z.cash/\')\"', + 'url_rewrite': 'Parameters passed to str.replace(), in order to create the r= part of zclassic: URIs. Example: \"(\'file:///var/www/\',\'https://electrum.z.cash/\')\"', } } @@ -817,7 +817,7 @@ def add_network_options(parser): def add_global_options(parser): group = parser.add_argument_group('global options') group.add_argument("-v", "--verbose", action="store_true", dest="verbose", default=False, help="Show debugging information") - group.add_argument("-D", "--dir", dest="electrum_path", help="electrum-zcash directory") + group.add_argument("-D", "--dir", dest="electrum_path", help="electrum-zclassic directory") group.add_argument("-P", "--portable", action="store_true", dest="portable", default=False, help="Use local 'electrum_data' directory") group.add_argument("-w", "--wallet", dest="wallet_path", help="wallet path") group.add_argument("--testnet", action="store_true", dest="testnet", default=False, help="Use Testnet") @@ -826,12 +826,12 @@ def add_global_options(parser): def get_parser(): # create main parser parser = argparse.ArgumentParser( - epilog="Run 'electrum-zcash help ' to see the help for a command") + epilog="Run 'electrum-zclassic help ' to see the help for a command") add_global_options(parser) subparsers = parser.add_subparsers(dest='cmd', metavar='') # gui - parser_gui = subparsers.add_parser('gui', description="Run Electrum-Zcash Graphical User Interface.", help="Run GUI (default)") - parser_gui.add_argument("url", nargs='?', default=None, help="Zcash URI (or bip70 file)") + parser_gui = subparsers.add_parser('gui', description="Run Electrum-Zclassic Graphical User Interface.", help="Run GUI (default)") + parser_gui.add_argument("url", nargs='?', default=None, help="Zclassic URI (or bip70 file)") parser_gui.add_argument("-g", "--gui", dest="gui", help="select graphical user interface", choices=['qt', 'kivy', 'text', 'stdio']) parser_gui.add_argument("-o", "--offline", action="store_true", dest="offline", default=False, help="Run offline") parser_gui.add_argument("-m", action="store_true", dest="hide_gui", default=False, help="hide GUI on startup") diff --git a/lib/constants.py b/lib/constants.py index c4be3184..8d3e4cee 100644 --- a/lib/constants.py +++ b/lib/constants.py @@ -43,8 +43,8 @@ class BitcoinMainnet: WIF_PREFIX = 0x80 ADDRTYPE_P2PKH = bytes.fromhex('1CB8') ADDRTYPE_P2SH = bytes.fromhex('1CBD') - GENESIS = "00040fe8ec8471911baa1db1266ea15dd06b4a8a5c453883c000b031973dce08" - DEFAULT_PORTS = {'t': '50021', 's': '50022'} + GENESIS = "0007104ccda289427919efc39dc9e4d499804b7bebc22df55f8b834301260602" + DEFAULT_PORTS = {'t': '50001', 's': '50002'} DEFAULT_SERVERS = read_json('servers.json', {}) CHECKPOINTS = read_json('checkpoints.json', []) @@ -54,7 +54,7 @@ class BitcoinMainnet: XPUB_HEADERS = { 'standard': 0x0488b21e, # xpub } - OVERWINTER_HEIGHT = 347500 + OVERWINTER_HEIGHT = 476969 class BitcoinTestnet: @@ -63,7 +63,7 @@ class BitcoinTestnet: WIF_PREFIX = 0xEF ADDRTYPE_P2PKH = bytes.fromhex('1D25') ADDRTYPE_P2SH = bytes.fromhex('1CBA') - GENESIS = "05a60a92d99d85997cce3b87616c089f6124d7342af37106edc76126334a2c38" + GENESIS = "03e1c4bb705c871bf9bfda3e74b7f8f86bff267993c215a89d5795e3708e5e1f" DEFAULT_PORTS = {'t': '51021', 's': '51022'} DEFAULT_SERVERS = read_json('servers_testnet.json', {}) CHECKPOINTS = read_json('checkpoints_testnet.json', []) @@ -74,7 +74,7 @@ class BitcoinTestnet: XPUB_HEADERS = { 'standard': 0x043587cf, # tpub } - OVERWINTER_HEIGHT = 207500 + OVERWINTER_HEIGHT = 476969 class BitcoinRegtest(BitcoinTestnet): diff --git a/lib/contacts.py b/lib/contacts.py index ad3f92c8..0db4a9fc 100644 --- a/lib/contacts.py +++ b/lib/contacts.py @@ -92,7 +92,7 @@ class Contacts(dict): 'type': 'openalias', 'validated': validated } - raise Exception("Invalid Zcash address or alias", k) + raise Exception("Invalid Zclassic address or alias", k) def resolve_openalias(self, url): # support email-style addresses, per the OA standard @@ -102,7 +102,7 @@ class Contacts(dict): except DNSException as e: print_error('Error resolving openalias: ', str(e)) return None - prefix = 'zcash' + prefix = 'zclassic' for record in records: string = to_string(record.strings[0], 'utf8') if string.startswith('oa1:' + prefix): @@ -120,7 +120,7 @@ class Contacts(dict): return regex.search(haystack).groups()[0] except AttributeError: return None - + def _validate(self, data): for k, v in list(data.items()): if k == 'contacts': diff --git a/lib/currencies.json b/lib/currencies.json index 80f9f248..725f260b 100644 --- a/lib/currencies.json +++ b/lib/currencies.json @@ -1,16 +1,7 @@ { - "BitcoinAverage": [ + "CoinMarketCap": [ "USD", "EUR", - "PLN" - ], - "Bittrex": [ - "BTC" - ], - "Poloniex": [ - "BTC" - ], - "CoinMarketCap": [ - "USD" + "CNY" ] } diff --git a/lib/daemon.py b/lib/daemon.py index d66716ab..1cabb9b3 100644 --- a/lib/daemon.py +++ b/lib/daemon.py @@ -269,7 +269,7 @@ class Daemon(DaemonThread): path = config.get_wallet_path() wallet = self.wallets.get(path) if wallet is None: - return {'error': 'Wallet "%s" is not loaded. Use "electrum-zcash daemon load_wallet"'%os.path.basename(path) } + return {'error': 'Wallet "%s" is not loaded. Use "electrum-zclassic daemon load_wallet"'%os.path.basename(path) } else: wallet = None # arguments passed to function @@ -305,7 +305,7 @@ class Daemon(DaemonThread): gui_name = config.get('gui', 'qt') if gui_name in ['lite', 'classic']: gui_name = 'qt' - gui = __import__('electrum_zcash_gui.' + gui_name, fromlist=['electrum_zcash_gui']) + gui = __import__('electrum_zclassic_gui.' + gui_name, fromlist=['electrum_zclassic_gui']) self.gui = gui.ElectrumGui(config, self, plugins) try: self.gui.main() diff --git a/lib/exchange_rate.py b/lib/exchange_rate.py index 3e0ca4be..e03a2cd3 100644 --- a/lib/exchange_rate.py +++ b/lib/exchange_rate.py @@ -41,12 +41,12 @@ class ExchangeBase(PrintError): def get_json(self, site, get_string): # APIs must have https url = ''.join(['https://', site, get_string]) - response = requests.request('GET', url, headers={'User-Agent' : 'Electrum-Zcash'}, timeout=10) + response = requests.request('GET', url, headers={'User-Agent' : 'Electrum-Zclassic'}, timeout=10) return response.json() def get_csv(self, site, get_string): url = ''.join(['https://', site, get_string]) - response = requests.request('GET', url, headers={'User-Agent' : 'Electrum-Zcash'}) + response = requests.request('GET', url, headers={'User-Agent' : 'Electrum-Zclassic'}) reader = csv.DictReader(response.content.decode().split('\n')) return list(reader) @@ -125,7 +125,7 @@ class BitcoinAverage(ExchangeBase): def get_rates(self, ccy): json = self.get_json('apiv2.bitcoinaverage.com', - '/indices/local/ticker/ZEC%s' % ccy) + '/indices/local/ticker/ZCL%s' % ccy) return {ccy: Decimal(json['last'])} @@ -134,7 +134,7 @@ class BitcoinAverage(ExchangeBase): def request_history(self, ccy): history = self.get_json('apiv2.bitcoinaverage.com', - "/indices/local/history/ZEC%s" + "/indices/local/history/ZCL%s" "?period=alltime&format=json" % ccy) return dict([(h['time'][:10], h['average']) for h in history]) @@ -142,7 +142,7 @@ class BitcoinAverage(ExchangeBase): class Bittrex(ExchangeBase): def get_rates(self, ccy): json = self.get_json('bittrex.com', - '/api/v1.1/public/getticker?market=BTC-ZEC') + '/api/v1.1/public/getticker?market=BTC-ZCL') quote_currencies = {} if not json.get('success', False): return quote_currencies @@ -155,8 +155,8 @@ class Poloniex(ExchangeBase): def get_rates(self, ccy): json = self.get_json('poloniex.com', '/public?command=returnTicker') quote_currencies = {} - zcash_ticker = json.get('BTC_ZEC') - quote_currencies['BTC'] = Decimal(zcash_ticker['last']) + zclassic_ticker = json.get('BTC_ZCL') + quote_currencies['BTC'] = Decimal(zclassic_ticker['last']) return quote_currencies @@ -371,6 +371,6 @@ class FxThread(ThreadJob): return self.fiat_value(satoshis, self.history_rate(d_t)) def timestamp_rate(self, timestamp): - from electrum_zcash.util import timestamp_to_datetime + from electrum_zclassic.util import timestamp_to_datetime date = timestamp_to_datetime(timestamp) return self.history_rate(date) diff --git a/lib/paymentrequest.py b/lib/paymentrequest.py index acd66379..368b6813 100644 --- a/lib/paymentrequest.py +++ b/lib/paymentrequest.py @@ -47,8 +47,8 @@ from . import rsakey from .bitcoin import TYPE_ADDRESS -REQUEST_HEADERS = {'Accept': 'application/zcash-paymentrequest', 'User-Agent': 'Electrum-Zcash'} -ACK_HEADERS = {'Content-Type':'application/zcash-payment','Accept':'application/zcash-paymentack','User-Agent':'Electrum-Zcash'} +REQUEST_HEADERS = {'Accept': 'application/zclassic-paymentrequest', 'User-Agent': 'Electrum-Zclassic'} +ACK_HEADERS = {'Content-Type':'application/zclassic-payment','Accept':'application/zclassic-paymentack','User-Agent':'Electrum-Zclassic'} ca_path = requests.certs.where() ca_list = None @@ -76,9 +76,9 @@ def get_payment_request(url): try: response = requests.request('GET', url, headers=REQUEST_HEADERS) response.raise_for_status() - # Guard against `zcash:`-URIs with invalid payment request URLs + # Guard against `zclassic:`-URIs with invalid payment request URLs if "Content-Type" not in response.headers \ - or response.headers["Content-Type"] != "application/zcash-paymentrequest": + or response.headers["Content-Type"] != "application/zclassic-paymentrequest": data = None error = "payment URL not pointing to a payment request handling server" else: @@ -267,7 +267,7 @@ class PaymentRequest: paymnt.transactions.append(bfh(raw_tx)) ref_out = paymnt.refund_to.add() ref_out.script = util.bfh(transaction.Transaction.pay_script(TYPE_ADDRESS, refund_addr)) - paymnt.memo = "Paid using Electrum-Zcash" + paymnt.memo = "Paid using Electrum-Zclassic" pm = paymnt.SerializeToString() payurl = urllib.parse.urlparse(pay_det.payment_url) try: diff --git a/lib/plot.py b/lib/plot.py index e5cb3c45..011974e6 100644 --- a/lib/plot.py +++ b/lib/plot.py @@ -37,7 +37,7 @@ def plot_history(history): plt.subplots_adjust(bottom=0.2) plt.xticks( rotation=25 ) ax = plt.gca() - plt.ylabel('ZEC') + plt.ylabel('ZCL') plt.xlabel('Month') xfmt = md.DateFormatter('%Y-%m-%d') ax.xaxis.set_major_formatter(xfmt) diff --git a/lib/plugins.py b/lib/plugins.py index 3c2be0f3..67ed9bf8 100644 --- a/lib/plugins.py +++ b/lib/plugins.py @@ -48,9 +48,9 @@ class Plugins(DaemonThread): DaemonThread.__init__(self) if is_local: find = imp.find_module('plugins') - plugins = imp.load_module('electrum_zcash_plugins', *find) + plugins = imp.load_module('electrum_zclassic_plugins', *find) else: - plugins = __import__('electrum_zcash_plugins') + plugins = __import__('electrum_zclassic_plugins') self.pkgpath = os.path.dirname(plugins.__file__) self.config = config self.hw_wallets = {} @@ -95,7 +95,7 @@ class Plugins(DaemonThread): def load_plugin(self, name): if name in self.plugins: return self.plugins[name] - full_name = 'electrum_zcash_plugins.' + name + '.' + self.gui_name + full_name = 'electrum_zclassic_plugins.' + name + '.' + self.gui_name loader = pkgutil.find_loader(full_name) if not loader: raise RuntimeError("%s implementation for %s plugin not found" @@ -452,8 +452,8 @@ class DeviceMgr(ThreadJob, PrintError): # The user input has wrong PIN or passphrase, or cancelled input, # or it is not pairable raise DeviceUnpairableError( - _('Electrum-Zcash cannot pair with your {}.\n\n' - 'Before you request Zcash coins to be sent to addresses in this ' + _('Electrum-Zclassic cannot pair with your {}.\n\n' + 'Before you request Zclassic coins to be sent to addresses in this ' 'wallet, ensure you can pair with your device, or that you have ' 'its seed (and passphrase, if any). Otherwise all coins you ' 'receive will be unspendable.').format(plugin.device)) diff --git a/lib/servers.json b/lib/servers.json index c787e13a..4e558377 100644 --- a/lib/servers.json +++ b/lib/servers.json @@ -1,8 +1,8 @@ { - "localhost": { + "electrum.zclcore.com": { "pruning": "-", - "s": "50022", - "t": "50021", + "s": "50002", + "t": "50001", "version": "1.2" } } diff --git a/lib/simple_config.py b/lib/simple_config.py index 9b00f6df..8baa3adb 100644 --- a/lib/simple_config.py +++ b/lib/simple_config.py @@ -119,7 +119,7 @@ class SimpleConfig(PrintError): path = os.path.join(path, 'regtest') make_dir(path) - self.print_error("electrum-zcash directory", path) + self.print_error("electrum-zclassic directory", path) return path def rename_config_keys(self, config, keypairs, deprecation_warning=False): @@ -238,7 +238,7 @@ class SimpleConfig(PrintError): # default path if not os.path.exists(self.path): raise FileNotFoundError( - _('Electrum-Zcash datadir does not exist. Was it deleted while running?') + '\n' + + _('Electrum-Zclassic datadir does not exist. Was it deleted while running?') + '\n' + _('Should be at {}').format(self.path)) dirpath = os.path.join(self.path, "wallets") if not os.path.exists(dirpath): @@ -488,7 +488,7 @@ class SimpleConfig(PrintError): def read_user_config(path): - """Parse and store the user config settings in electrum-zcash.conf into user_config[].""" + """Parse and store the user config settings in electrum-zclassic.conf into user_config[].""" if not path: return {} config_path = os.path.join(path, "config") diff --git a/lib/tests/test_util.py b/lib/tests/test_util.py index 81d8d6c2..fdbe4d24 100644 --- a/lib/tests/test_util.py +++ b/lib/tests/test_util.py @@ -23,7 +23,7 @@ class TestUtil(unittest.TestCase): self.assertEqual(expected, result) def test_parse_URI_address(self): - self._do_test_parse_URI('zcash:t1NdvKvSnnBoJ7D9nfJSX5kK7GEGNs1bY4S', + self._do_test_parse_URI('zclassic:t1NdvKvSnnBoJ7D9nfJSX5kK7GEGNs1bY4S', {'address': 't1NdvKvSnnBoJ7D9nfJSX5kK7GEGNs1bY4S'}) def test_parse_URI_only_address(self): @@ -32,39 +32,39 @@ class TestUtil(unittest.TestCase): def test_parse_URI_address_label(self): - self._do_test_parse_URI('zcash:t1NdvKvSnnBoJ7D9nfJSX5kK7GEGNs1bY4S?label=electrum%20test', + self._do_test_parse_URI('zclassic:t1NdvKvSnnBoJ7D9nfJSX5kK7GEGNs1bY4S?label=electrum%20test', {'address': 't1NdvKvSnnBoJ7D9nfJSX5kK7GEGNs1bY4S', 'label': 'electrum test'}) def test_parse_URI_address_message(self): - self._do_test_parse_URI('zcash:t1NdvKvSnnBoJ7D9nfJSX5kK7GEGNs1bY4S?message=electrum%20test', + self._do_test_parse_URI('zclassic:t1NdvKvSnnBoJ7D9nfJSX5kK7GEGNs1bY4S?message=electrum%20test', {'address': 't1NdvKvSnnBoJ7D9nfJSX5kK7GEGNs1bY4S', 'message': 'electrum test', 'memo': 'electrum test'}) def test_parse_URI_address_amount(self): - self._do_test_parse_URI('zcash:t1NdvKvSnnBoJ7D9nfJSX5kK7GEGNs1bY4S?amount=0.0003', + self._do_test_parse_URI('zclassic:t1NdvKvSnnBoJ7D9nfJSX5kK7GEGNs1bY4S?amount=0.0003', {'address': 't1NdvKvSnnBoJ7D9nfJSX5kK7GEGNs1bY4S', 'amount': 30000}) def test_parse_URI_address_request_url(self): - self._do_test_parse_URI('zcash:t1NdvKvSnnBoJ7D9nfJSX5kK7GEGNs1bY4S?r=http://domain.tld/page?h%3D2a8628fc2fbe', + self._do_test_parse_URI('zclassic:t1NdvKvSnnBoJ7D9nfJSX5kK7GEGNs1bY4S?r=http://domain.tld/page?h%3D2a8628fc2fbe', {'address': 't1NdvKvSnnBoJ7D9nfJSX5kK7GEGNs1bY4S', 'r': 'http://domain.tld/page?h=2a8628fc2fbe'}) def test_parse_URI_ignore_args(self): - self._do_test_parse_URI('zcash:t1NdvKvSnnBoJ7D9nfJSX5kK7GEGNs1bY4S?test=test', + self._do_test_parse_URI('zclassic:t1NdvKvSnnBoJ7D9nfJSX5kK7GEGNs1bY4S?test=test', {'address': 't1NdvKvSnnBoJ7D9nfJSX5kK7GEGNs1bY4S', 'test': 'test'}) def test_parse_URI_multiple_args(self): - self._do_test_parse_URI('zcash:t1NdvKvSnnBoJ7D9nfJSX5kK7GEGNs1bY4S?amount=0.00004&label=electrum-test&message=electrum%20test&test=none&r=http://domain.tld/page', + self._do_test_parse_URI('zclassic:t1NdvKvSnnBoJ7D9nfJSX5kK7GEGNs1bY4S?amount=0.00004&label=electrum-test&message=electrum%20test&test=none&r=http://domain.tld/page', {'address': 't1NdvKvSnnBoJ7D9nfJSX5kK7GEGNs1bY4S', 'amount': 4000, 'label': 'electrum-test', 'message': u'electrum test', 'memo': u'electrum test', 'r': 'http://domain.tld/page', 'test': 'none'}) def test_parse_URI_no_address_request_url(self): - self._do_test_parse_URI('zcash:?r=http://domain.tld/page?h%3D2a8628fc2fbe', + self._do_test_parse_URI('zclassic:?r=http://domain.tld/page?h%3D2a8628fc2fbe', {'r': 'http://domain.tld/page?h=2a8628fc2fbe'}) def test_parse_URI_invalid_address(self): - self.assertRaises(BaseException, parse_URI, 'zcash:invalidaddress') + self.assertRaises(BaseException, parse_URI, 'zclassic:invalidaddress') def test_parse_URI_invalid(self): - self.assertRaises(BaseException, parse_URI, 'notzcash:t1NdvKvSnnBoJ7D9nfJSX5kK7GEGNs1bY4S') + self.assertRaises(BaseException, parse_URI, 'notzclassic:t1NdvKvSnnBoJ7D9nfJSX5kK7GEGNs1bY4S') def test_parse_URI_parameter_polution(self): - self.assertRaises(Exception, parse_URI, 'zcash:t1NdvKvSnnBoJ7D9nfJSX5kK7GEGNs1bY4S?amount=0.0003&label=test&amount=30.0') + self.assertRaises(Exception, parse_URI, 'zclassic:t1NdvKvSnnBoJ7D9nfJSX5kK7GEGNs1bY4S?amount=0.0003&label=test&amount=30.0') diff --git a/lib/transaction.py b/lib/transaction.py index 2265841c..ca135131 100644 --- a/lib/transaction.py +++ b/lib/transaction.py @@ -834,18 +834,18 @@ class Transaction: nHeader = int_to_hex(0x80000000 | version, 4) nVersionGroupId = int_to_hex(self.versionGroupId, 4) s_prevouts = bfh(''.join(self.serialize_outpoint(txin) for txin in inputs)) - hashPrevouts = blake2b(s_prevouts, digest_size=32, person=b'ZcashPrevoutHash').hexdigest() + hashPrevouts = blake2b(s_prevouts, digest_size=32, person=b'ZclassicPrevoutHash').hexdigest() s_sequences = bfh(''.join(int_to_hex(txin.get('sequence', 0xffffffff - 1), 4) for txin in inputs)) - hashSequence = blake2b(s_sequences, digest_size=32, person=b'ZcashSequencHash').hexdigest() + hashSequence = blake2b(s_sequences, digest_size=32, person=b'ZclassicSequencHash').hexdigest() s_outputs = bfh(''.join(self.serialize_output(o) for o in outputs)) - hashOutputs = blake2b(s_outputs, digest_size=32, person=b'ZcashOutputsHash').hexdigest() + hashOutputs = blake2b(s_outputs, digest_size=32, person=b'ZclassicOutputsHash').hexdigest() joinSplits = self.joinSplits #if joinSplits is None: # hashJoinSplits = '00'*32 #else: # s_joinSplits = bfh(''.join(self.serialize_join_split(j) for j in joinSplits)) # s_joinSplits += self.joinSplitPubKey - # hashJoinSplits = blake2b(s_joinSplits, digest_size=32, person=b'ZcashJSplitsHash').hexdigest() + # hashJoinSplits = blake2b(s_joinSplits, digest_size=32, person=b'ZclassicJSplitsHash').hexdigest() hashJoinSplits = '00'*32 hashShieldedSpends = '00'*32 hashShieldedOutputs = '00'*32 @@ -993,7 +993,7 @@ class Transaction: # add signature if self.overwintered: data = bfh(self.serialize_preimage(i)) - person = b'ZcashSigHash' + SAPLING_BRANCH_ID.to_bytes(4, 'little') + person = b'ZclassicSigHash' + SAPLING_BRANCH_ID.to_bytes(4, 'little') pre_hash = blake2b(data, digest_size=32, person=person).digest() else: pre_hash = Hash(bfh(self.serialize_preimage(i))) diff --git a/lib/util.py b/lib/util.py index 85d19def..48602600 100644 --- a/lib/util.py +++ b/lib/util.py @@ -40,7 +40,7 @@ def inv_dict(d): return {v: k for k, v in d.items()} -base_units = {'ZEC':8, 'mZEC':5, 'uZEC':2} +base_units = {'ZCL':8, 'mZCL':5, 'uZCL':2} def normalize_version(v): return [int(x) for x in re.sub(r'(\.0+)*$','', v).split(".")] @@ -313,7 +313,7 @@ def android_data_dir(): return PythonActivity.mActivity.getFilesDir().getPath() + '/data' def android_headers_dir(): - d = android_ext_dir() + '/cash.z.electrum.electrum_zcash' + d = android_ext_dir() + '/cash.z.electrum.electrum_zclassic' if not os.path.exists(d): os.mkdir(d) return d @@ -322,7 +322,7 @@ def android_check_data_dir(): """ if needed, move old directory to sandbox """ ext_dir = android_ext_dir() data_dir = android_data_dir() - old_electrum_dir = ext_dir + '/electrum-zcash' + old_electrum_dir = ext_dir + '/electrum-zclassic' if not os.path.exists(data_dir) and os.path.exists(old_electrum_dir): import shutil new_headers_path = android_headers_dir() + '/blockchain_headers' @@ -403,11 +403,11 @@ def user_dir(): if 'ANDROID_DATA' in os.environ: return android_check_data_dir() elif os.name == 'posix': - return os.path.join(os.environ["HOME"], ".electrum-zcash") + return os.path.join(os.environ["HOME"], ".electrum-zclassic") elif "APPDATA" in os.environ: - return os.path.join(os.environ["APPDATA"], "Electrum-Zcash") + return os.path.join(os.environ["APPDATA"], "Electrum-Zclassic") elif "LOCALAPPDATA" in os.environ: - return os.path.join(os.environ["LOCALAPPDATA"], "Electrum-Zcash") + return os.path.join(os.environ["LOCALAPPDATA"], "Electrum-Zclassic") else: #raise Exception("No home directory found in environment variables.") return @@ -506,7 +506,7 @@ def time_difference(distance_in_time, include_seconds): return "over %d years" % (round(distance_in_minutes / 525600)) mainnet_block_explorers = { - 'blockexplorer.com': ('https://zcash.blockexplorer.com/blocks/', + 'blockexplorer.com': ('https://zclassic.blockexplorer.com/blocks/', {'tx': 'transactions/', 'addr': 'addresses/'}), 'system default': ('blockchain:/', {'tx': 'tx/', 'addr': 'address/'}), @@ -549,12 +549,12 @@ def parse_URI(uri, on_pr=None): if ':' not in uri: if not bitcoin.is_address(uri): - raise Exception("Not a Zcash address") + raise Exception("Not a Zclassic address") return {'address': uri} u = urllib.parse.urlparse(uri) - if u.scheme != 'zcash': - raise Exception("Not a Zcash URI") + if u.scheme != 'zclassic': + raise Exception("Not a Zclassic URI") address = u.path # python for android fails to parse query @@ -571,7 +571,7 @@ def parse_URI(uri, on_pr=None): out = {k: v[0] for k, v in pq.items()} if address: if not bitcoin.is_address(address): - raise Exception("Invalid Zcash address:" + address) + raise Exception("Invalid Zclassic address:" + address) out['address'] = address if 'amount' in out: am = out['amount'] @@ -621,7 +621,7 @@ def create_URI(addr, amount, message): query.append('amount=%s'%format_satoshis_plain(amount)) if message: query.append('message=%s'%urllib.parse.quote(message)) - p = urllib.parse.ParseResult(scheme='zcash', netloc='', path=addr, params='', query='&'.join(query), fragment='') + p = urllib.parse.ParseResult(scheme='zclassic', netloc='', path=addr, params='', query='&'.join(query), fragment='') return urllib.parse.urlunparse(p) diff --git a/lib/wallet.py b/lib/wallet.py index 982d1a09..0d24eb3a 100644 --- a/lib/wallet.py +++ b/lib/wallet.py @@ -350,7 +350,7 @@ class Abstract_Wallet(PrintError): addrs = self.get_receiving_addresses() if len(addrs) > 0: if not bitcoin.is_address(addrs[0]): - raise WalletFileException('The addresses in this wallet are not Zcash addresses.') + raise WalletFileException('The addresses in this wallet are not Zclassic addresses.') def synchronize(self): pass @@ -1198,7 +1198,7 @@ class Abstract_Wallet(PrintError): _type, data, value = o if _type == TYPE_ADDRESS: if not is_address(data): - raise Exception("Invalid Zcash address: {}".format(data)) + raise Exception("Invalid Zclassic address: {}".format(data)) if value == '!': if i_max is not None: raise Exception("More than one output set to spend max") @@ -1478,7 +1478,7 @@ class Abstract_Wallet(PrintError): if not r: return out = copy.copy(r) - out['URI'] = 'zcash:' + addr + '?amount=' + format_satoshis(out.get('amount')) + out['URI'] = 'zclassic:' + addr + '?amount=' + format_satoshis(out.get('amount')) status, conf = self.get_request_status(addr) out['status'] = status if conf is not None: @@ -1555,7 +1555,7 @@ class Abstract_Wallet(PrintError): def add_payment_request(self, req, config): addr = req['address'] if not bitcoin.is_address(addr): - raise Exception(_('Invalid Zcash address.')) + raise Exception(_('Invalid Zclassic address.')) if not self.is_mine(addr): raise Exception(_('Address not in wallet.')) diff --git a/plugins/audio_modem/__init__.py b/plugins/audio_modem/__init__.py index 96f71e21..4eaa0262 100644 --- a/plugins/audio_modem/__init__.py +++ b/plugins/audio_modem/__init__.py @@ -1,4 +1,4 @@ -from electrum_zcash.i18n import _ +from electrum_zclassic.i18n import _ fullname = _('Audio MODEM') description = _('Provides support for air-gapped transaction signing.') diff --git a/plugins/audio_modem/qt.py b/plugins/audio_modem/qt.py index b2d951db..f546d023 100644 --- a/plugins/audio_modem/qt.py +++ b/plugins/audio_modem/qt.py @@ -5,10 +5,10 @@ from io import BytesIO import sys import platform -from electrum_zcash.plugins import BasePlugin, hook -from electrum_zcash_gui.qt.util import WaitingDialog, EnterButton, WindowModalDialog -from electrum_zcash.util import print_msg, print_error -from electrum_zcash.i18n import _ +from electrum_zclassic.plugins import BasePlugin, hook +from electrum_zclassic_gui.qt.util import WaitingDialog, EnterButton, WindowModalDialog +from electrum_zclassic.util import print_msg, print_error +from electrum_zclassic.i18n import _ from PyQt5.QtGui import * from PyQt5.QtCore import * diff --git a/plugins/cosigner_pool/__init__.py b/plugins/cosigner_pool/__init__.py index 8180654b..927b27a8 100644 --- a/plugins/cosigner_pool/__init__.py +++ b/plugins/cosigner_pool/__init__.py @@ -1,4 +1,4 @@ -from electrum_zcash.i18n import _ +from electrum_zclassic.i18n import _ fullname = _('Cosigner Pool') description = ' '.join([ _("This plugin facilitates the use of multi-signatures wallets."), diff --git a/plugins/cosigner_pool/qt.py b/plugins/cosigner_pool/qt.py index 790e3b9c..0579549b 100644 --- a/plugins/cosigner_pool/qt.py +++ b/plugins/cosigner_pool/qt.py @@ -30,14 +30,14 @@ from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWidgets import QPushButton -from electrum_zcash import bitcoin, util -from electrum_zcash import transaction -from electrum_zcash.plugins import BasePlugin, hook -from electrum_zcash.i18n import _ -from electrum_zcash.wallet import Multisig_Wallet -from electrum_zcash.util import bh2u, bfh +from electrum_zclassic import bitcoin, util +from electrum_zclassic import transaction +from electrum_zclassic.plugins import BasePlugin, hook +from electrum_zclassic.i18n import _ +from electrum_zclassic.wallet import Multisig_Wallet +from electrum_zclassic.util import bh2u, bfh -from electrum_zcash_gui.qt.transaction_dialog import show_transaction +from electrum_zclassic_gui.qt.transaction_dialog import show_transaction import sys import traceback @@ -160,7 +160,7 @@ class Plugin(BasePlugin): d.cosigner_send_button.hide() def cosigner_can_sign(self, tx, cosigner_xpub): - from electrum_zcash.keystore import is_xpubkey, parse_xpubkey + from electrum_zclassic.keystore import is_xpubkey, parse_xpubkey xpub_set = set([]) for txin in tx.inputs(): for x_pubkey in txin['x_pubkeys']: diff --git a/plugins/digitalbitbox/__init__.py b/plugins/digitalbitbox/__init__.py index 6bf59b38..bac5a454 100644 --- a/plugins/digitalbitbox/__init__.py +++ b/plugins/digitalbitbox/__init__.py @@ -1,4 +1,4 @@ -from electrum_zcash.i18n import _ +from electrum_zclassic.i18n import _ fullname = 'Digital Bitbox' description = _('Provides support for Digital Bitbox hardware wallet') diff --git a/plugins/digitalbitbox/cmdline.py b/plugins/digitalbitbox/cmdline.py index 16556c3f..73b70a8a 100644 --- a/plugins/digitalbitbox/cmdline.py +++ b/plugins/digitalbitbox/cmdline.py @@ -1,4 +1,4 @@ -from electrum_zcash.plugins import hook +from electrum_zclassic.plugins import hook from .digitalbitbox import DigitalBitboxPlugin from ..hw_wallet import CmdLineHandler diff --git a/plugins/digitalbitbox/digitalbitbox.py b/plugins/digitalbitbox/digitalbitbox.py index 77b3fb90..21ef9e55 100644 --- a/plugins/digitalbitbox/digitalbitbox.py +++ b/plugins/digitalbitbox/digitalbitbox.py @@ -4,16 +4,16 @@ # try: - import electrum_zcash - from electrum_zcash.bitcoin import TYPE_ADDRESS, push_script, var_int, msg_magic, Hash, verify_message, pubkey_from_signature, point_to_ser, public_key_to_p2pkh, EncodeAES, DecodeAES, MyVerifyingKey - from electrum_zcash.bitcoin import serialize_xpub, deserialize_xpub - from electrum_zcash import constants - from electrum_zcash.transaction import Transaction - from electrum_zcash.i18n import _ - from electrum_zcash.keystore import Hardware_KeyStore + import electrum_zclassic + from electrum_zclassic.bitcoin import TYPE_ADDRESS, push_script, var_int, msg_magic, Hash, verify_message, pubkey_from_signature, point_to_ser, public_key_to_p2pkh, EncodeAES, DecodeAES, MyVerifyingKey + from electrum_zclassic.bitcoin import serialize_xpub, deserialize_xpub + from electrum_zclassic import constants + from electrum_zclassic.transaction import Transaction + from electrum_zclassic.i18n import _ + from electrum_zclassic.keystore import Hardware_KeyStore from ..hw_wallet import HW_PluginBase - from electrum_zcash.util import print_error, to_string, UserCancelled - from electrum_zcash.base_wizard import ScriptTypeNotSupported, HWD_SETUP_NEW_WALLET + from electrum_zclassic.util import print_error, to_string, UserCancelled + from electrum_zclassic.base_wizard import ScriptTypeNotSupported, HWD_SETUP_NEW_WALLET import time import hid @@ -289,8 +289,8 @@ class DigitalBitbox_Client(): def dbb_generate_wallet(self): key = self.stretch_key(self.password) - filename = ("Electrum-Zcash-" + time.strftime("%Y-%m-%d-%H-%M-%S") + ".pdf") - msg = ('{"seed":{"source": "create", "key": "%s", "filename": "%s", "entropy": "%s"}}' % (key, filename, 'Digital Bitbox Electrum-Zcash Plugin')).encode('utf8') + filename = ("Electrum-Zclassic-" + time.strftime("%Y-%m-%d-%H-%M-%S") + ".pdf") + msg = ('{"seed":{"source": "create", "key": "%s", "filename": "%s", "entropy": "%s"}}' % (key, filename, 'Digital Bitbox Electrum-Zclassic Plugin')).encode('utf8') reply = self.hid_send_encrypt(msg) if 'error' in reply: raise Exception(reply['error']['message']) diff --git a/plugins/digitalbitbox/qt.py b/plugins/digitalbitbox/qt.py index bc3a18f8..e037ba08 100644 --- a/plugins/digitalbitbox/qt.py +++ b/plugins/digitalbitbox/qt.py @@ -3,9 +3,9 @@ from functools import partial from ..hw_wallet.qt import QtHandlerBase, QtPluginBase from .digitalbitbox import DigitalBitboxPlugin -from electrum_zcash.i18n import _ -from electrum_zcash.plugins import hook -from electrum_zcash.wallet import Standard_Wallet +from electrum_zclassic.i18n import _ +from electrum_zclassic.plugins import hook +from electrum_zclassic.wallet import Standard_Wallet class Plugin(DigitalBitboxPlugin, QtPluginBase): diff --git a/plugins/email_requests/__init__.py b/plugins/email_requests/__init__.py index f55b337c..674d38de 100644 --- a/plugins/email_requests/__init__.py +++ b/plugins/email_requests/__init__.py @@ -1,4 +1,4 @@ -from electrum_zcash.i18n import _ +from electrum_zclassic.i18n import _ fullname = _('Email') description = _("Send and receive payment request with an email account") diff --git a/plugins/email_requests/qt.py b/plugins/email_requests/qt.py index 8f5a41df..ba0fc86d 100644 --- a/plugins/email_requests/qt.py +++ b/plugins/email_requests/qt.py @@ -42,11 +42,11 @@ from PyQt5.QtCore import * from PyQt5.QtWidgets import (QVBoxLayout, QLabel, QGridLayout, QLineEdit, QInputDialog) -from electrum_zcash.plugins import BasePlugin, hook -from electrum_zcash.paymentrequest import PaymentRequest -from electrum_zcash.i18n import _ -from electrum_zcash.util import PrintError -from electrum_zcash_gui.qt.util import (EnterButton, Buttons, CloseButton, OkButton, +from electrum_zclassic.plugins import BasePlugin, hook +from electrum_zclassic.paymentrequest import PaymentRequest +from electrum_zclassic.i18n import _ +from electrum_zclassic.util import PrintError +from electrum_zclassic_gui.qt.util import (EnterButton, Buttons, CloseButton, OkButton, WindowModalDialog, get_parent_main_window) @@ -77,7 +77,7 @@ class Processor(threading.Thread, PrintError): p = [p] continue for item in p: - if item.get_content_type() == "application/zcash-paymentrequest": + if item.get_content_type() == "application/zclassic-paymentrequest": pr_str = item.get_payload() pr_str = base64.b64decode(pr_str) self.on_receive(pr_str) @@ -101,10 +101,10 @@ class Processor(threading.Thread, PrintError): msg['Subject'] = message msg['To'] = recipient msg['From'] = self.username - part = MIMEBase('application', "zcash-paymentrequest") + part = MIMEBase('application', "zclassic-paymentrequest") part.set_payload(payment_request) encode_base64(part) - part.add_header('Content-Disposition', 'attachment; filename="payreq.zec"') + part.add_header('Content-Disposition', 'attachment; filename="payreq.zcl"') msg.attach(part) try: s = smtplib.SMTP_SSL(self.imap_server, timeout=2) @@ -166,7 +166,7 @@ class Plugin(BasePlugin): menu.addAction(_("Send via e-mail"), lambda: self.send(window, addr)) def send(self, window, addr): - from electrum_zcash import paymentrequest + from electrum_zclassic import paymentrequest r = window.wallet.receive_requests.get(addr) message = r.get('memo', '') if r.get('signature'): diff --git a/plugins/hw_wallet/cmdline.py b/plugins/hw_wallet/cmdline.py index fc3f698f..a6a309fb 100644 --- a/plugins/hw_wallet/cmdline.py +++ b/plugins/hw_wallet/cmdline.py @@ -1,4 +1,4 @@ -from electrum_zcash.util import print_msg, print_error, raw_input +from electrum_zclassic.util import print_msg, print_error, raw_input class CmdLineHandler: diff --git a/plugins/hw_wallet/plugin.py b/plugins/hw_wallet/plugin.py index 6f623035..06684661 100644 --- a/plugins/hw_wallet/plugin.py +++ b/plugins/hw_wallet/plugin.py @@ -24,8 +24,8 @@ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -from electrum_zcash.plugins import BasePlugin, hook -from electrum_zcash.i18n import _ +from electrum_zclassic.plugins import BasePlugin, hook +from electrum_zclassic.i18n import _ class HW_PluginBase(BasePlugin): diff --git a/plugins/hw_wallet/qt.py b/plugins/hw_wallet/qt.py index 0eaf6ef7..507fa0bd 100644 --- a/plugins/hw_wallet/qt.py +++ b/plugins/hw_wallet/qt.py @@ -27,11 +27,11 @@ import threading from PyQt5.Qt import QVBoxLayout, QLabel -from electrum_zcash_gui.qt.password_dialog import PasswordDialog, PW_PASSPHRASE -from electrum_zcash_gui.qt.util import * +from electrum_zclassic_gui.qt.password_dialog import PasswordDialog, PW_PASSPHRASE +from electrum_zclassic_gui.qt.util import * -from electrum_zcash.i18n import _ -from electrum_zcash.util import PrintError +from electrum_zclassic.i18n import _ +from electrum_zclassic.util import PrintError # The trickiest thing about this handler was getting windows properly # parented on macOS. @@ -172,9 +172,9 @@ class QtHandlerBase(QObject, PrintError): -from electrum_zcash.plugins import hook -from electrum_zcash.util import UserCancelled -from electrum_zcash_gui.qt.main_window import StatusBarButton +from electrum_zclassic.plugins import hook +from electrum_zclassic.util import UserCancelled +from electrum_zclassic_gui.qt.main_window import StatusBarButton class QtPluginBase(object): diff --git a/plugins/keepkey/__init__.py b/plugins/keepkey/__init__.py index c807c28e..516f6923 100644 --- a/plugins/keepkey/__init__.py +++ b/plugins/keepkey/__init__.py @@ -1,4 +1,4 @@ -from electrum_zcash.i18n import _ +from electrum_zclassic.i18n import _ fullname = 'KeepKey' description = _('Provides support for KeepKey hardware wallet') diff --git a/plugins/keepkey/clientbase.py b/plugins/keepkey/clientbase.py index 4c46eb99..be07a77f 100644 --- a/plugins/keepkey/clientbase.py +++ b/plugins/keepkey/clientbase.py @@ -1,10 +1,10 @@ import time from struct import pack -from electrum_zcash.i18n import _ -from electrum_zcash.util import PrintError, UserCancelled -from electrum_zcash.keystore import bip39_normalize_passphrase -from electrum_zcash.bitcoin import serialize_xpub +from electrum_zclassic.i18n import _ +from electrum_zclassic.util import PrintError, UserCancelled +from electrum_zclassic.keystore import bip39_normalize_passphrase +from electrum_zclassic.bitcoin import serialize_xpub class GuiMixin(object): @@ -62,7 +62,7 @@ class GuiMixin(object): msg = _("Enter a passphrase to generate this wallet. Each time " "you use this wallet your {} will prompt you for the " "passphrase. If you forget the passphrase you cannot " - "access the Zcash coins in the wallet.").format(self.device) + "access the Zclassic coins in the wallet.").format(self.device) else: msg = _("Enter the passphrase to unlock this wallet:") passphrase = self.handler.get_passphrase(msg, self.creating_wallet) @@ -121,8 +121,8 @@ class KeepKeyClientBase(GuiMixin, PrintError): def has_usable_connection_with_device(self): try: - res = self.ping("electrum-zcash pinging device") - assert res == "electrum-zcash pinging device" + res = self.ping("electrum-zclassic pinging device") + assert res == "electrum-zclassic pinging device" except BaseException: return False return True diff --git a/plugins/keepkey/cmdline.py b/plugins/keepkey/cmdline.py index 69854e61..a24d0958 100644 --- a/plugins/keepkey/cmdline.py +++ b/plugins/keepkey/cmdline.py @@ -1,4 +1,4 @@ -from electrum_zcash.plugins import hook +from electrum_zclassic.plugins import hook from .keepkey import KeepKeyPlugin from ..hw_wallet import CmdLineHandler diff --git a/plugins/keepkey/plugin.py b/plugins/keepkey/plugin.py index 6c9a97c4..26ca5c71 100644 --- a/plugins/keepkey/plugin.py +++ b/plugins/keepkey/plugin.py @@ -1,14 +1,14 @@ from binascii import hexlify, unhexlify -from electrum_zcash.util import bfh, bh2u -from electrum_zcash.bitcoin import (b58_address_to_hash160, xpub_from_pubkey, +from electrum_zclassic.util import bfh, bh2u +from electrum_zclassic.bitcoin import (b58_address_to_hash160, xpub_from_pubkey, TYPE_ADDRESS, TYPE_SCRIPT) -from electrum_zcash import constants -from electrum_zcash.i18n import _ -from electrum_zcash.plugins import BasePlugin -from electrum_zcash.transaction import deserialize, Transaction -from electrum_zcash.keystore import Hardware_KeyStore, is_xpubkey, parse_xpubkey -from electrum_zcash.base_wizard import ScriptTypeNotSupported +from electrum_zclassic import constants +from electrum_zclassic.i18n import _ +from electrum_zclassic.plugins import BasePlugin +from electrum_zclassic.transaction import deserialize, Transaction +from electrum_zclassic.keystore import Hardware_KeyStore, is_xpubkey, parse_xpubkey +from electrum_zclassic.base_wizard import ScriptTypeNotSupported from ..hw_wallet import HW_PluginBase @@ -134,7 +134,7 @@ class KeepKeyCompatiblePlugin(HW_PluginBase): return client def get_coin_name(self): - return "ZcashTestnet" if constants.net.TESTNET else "Zcash" + return "ZclassicTestnet" if constants.net.TESTNET else "Zclassic" def initialize_device(self, device_id, wizard, handler): # Initialization method diff --git a/plugins/keepkey/qt_generic.py b/plugins/keepkey/qt_generic.py index 0cb88379..b60f1a69 100644 --- a/plugins/keepkey/qt_generic.py +++ b/plugins/keepkey/qt_generic.py @@ -4,29 +4,29 @@ import threading from PyQt5.Qt import Qt from PyQt5.Qt import QGridLayout, QInputDialog, QPushButton from PyQt5.Qt import QVBoxLayout, QLabel -from electrum_zcash_gui.qt.util import * +from electrum_zclassic_gui.qt.util import * from .plugin import TIM_NEW, TIM_RECOVER, TIM_MNEMONIC from ..hw_wallet.qt import QtHandlerBase, QtPluginBase -from electrum_zcash.i18n import _ -from electrum_zcash.plugins import hook, DeviceMgr -from electrum_zcash.util import PrintError, UserCancelled, bh2u -from electrum_zcash.wallet import Wallet, Standard_Wallet +from electrum_zclassic.i18n import _ +from electrum_zclassic.plugins import hook, DeviceMgr +from electrum_zclassic.util import PrintError, UserCancelled, bh2u +from electrum_zclassic.wallet import Wallet, Standard_Wallet PASSPHRASE_HELP_SHORT =_( "Passphrases allow you to access new wallets, each " "hidden behind a particular case-sensitive passphrase.") PASSPHRASE_HELP = PASSPHRASE_HELP_SHORT + " " + _( - "You need to create a separate Electrum-Zcash wallet for each passphrase " + "You need to create a separate Electrum-Zclassic wallet for each passphrase " "you use as they each generate different addresses. Changing " "your passphrase does not lose other wallets, each is still " "accessible behind its own passphrase.") RECOMMEND_PIN = _( "You should enable PIN protection. Your PIN is the only protection " - "for your Zcash coins if your device is lost or stolen.") + "for your Zclassic coins if your device is lost or stolen.") PASSPHRASE_NOT_PIN = _( "If you forget a passphrase you will be unable to access any " - "Zcash coins in the wallet behind it. A passphrase is not a PIN. " + "Zclassic coins in the wallet behind it. A passphrase is not a PIN. " "Only change this if you are sure you understand it.") CHARACTER_RECOVERY = ( "Use the recovery cipher shown on your device to input your seed words. " @@ -242,7 +242,7 @@ class QtPlugin(QtPluginBase): else: msg = _("Enter the master private key beginning with xprv:") def set_enabled(): - from electrum_zcash.keystore import is_xprv + from electrum_zclassic.keystore import is_xprv wizard.next_button.setEnabled(is_xprv(clean_text(text))) text.textChanged.connect(set_enabled) next_enabled = False @@ -359,13 +359,13 @@ class SettingsDialog(WindowModalDialog): currently_enabled = self.features.passphrase_protection if currently_enabled: msg = _("After disabling passphrases, you can only pair this " - "Electrum-Zcash wallet if it had an empty passphrase. " + "Electrum-Zclassic wallet if it had an empty passphrase. " "If its passphrase was not empty, you will need to " "create a new wallet with the install wizard. You " "can use this wallet again at any time by re-enabling " "passphrases and entering its passphrase.") else: - msg = _("Your current Electrum-Zcash wallet can only be used with " + msg = _("Your current Electrum-Zclassic wallet can only be used with " "an empty passphrase. You must create a separate " "wallet with the install wizard for other passphrases " "as each one generates a new set of addresses.") @@ -406,7 +406,7 @@ class SettingsDialog(WindowModalDialog): if wallet and sum(wallet.get_balance()): title = _("Confirm Device Wipe") msg = _("Are you SURE you want to wipe the device?\n" - "Your wallet still has Zcash coins in it!") + "Your wallet still has Zclassic coins in it!") if not self.question(msg, title=title, icon=QMessageBox.Critical): return @@ -481,7 +481,7 @@ class SettingsDialog(WindowModalDialog): settings_glayout.addWidget(pin_button, 2, 1) pin_msg = QLabel(_("PIN protection is strongly recommended. " "A PIN is your only protection against someone " - "stealing your Zcash coins if they obtain physical " + "stealing your Zclassic coins if they obtain physical " "access to your {}.").format(plugin.device)) pin_msg.setWordWrap(True) pin_msg.setStyleSheet("color: red") @@ -541,7 +541,7 @@ class SettingsDialog(WindowModalDialog): clear_pin_button.clicked.connect(clear_pin) clear_pin_warning = QLabel( _("If you disable your PIN, anyone with physical access to your " - "{} device can spend your Zcash coins.").format(plugin.device)) + "{} device can spend your Zclassic coins.").format(plugin.device)) clear_pin_warning.setWordWrap(True) clear_pin_warning.setStyleSheet("color: red") advanced_glayout.addWidget(clear_pin_button, 0, 2) @@ -566,7 +566,7 @@ class SettingsDialog(WindowModalDialog): wipe_device_msg.setWordWrap(True) wipe_device_warning = QLabel( _("Only wipe a device if you have the recovery seed written down " - "and the device wallet(s) are empty, otherwise the Zcash coins " + "and the device wallet(s) are empty, otherwise the Zclassic coins " "will be lost forever.")) wipe_device_warning.setWordWrap(True) wipe_device_warning.setStyleSheet("color: red") diff --git a/plugins/labels/__init__.py b/plugins/labels/__init__.py index d441e707..4f1540ab 100644 --- a/plugins/labels/__init__.py +++ b/plugins/labels/__init__.py @@ -1,4 +1,4 @@ -from electrum_zcash.i18n import _ +from electrum_zclassic.i18n import _ fullname = _('LabelSync') description = ' '.join([ diff --git a/plugins/labels/kivy.py b/plugins/labels/kivy.py index 4ac7779c..4224f19c 100644 --- a/plugins/labels/kivy.py +++ b/plugins/labels/kivy.py @@ -1,5 +1,5 @@ from .labels import LabelsPlugin -from electrum_zcash.plugins import hook +from electrum_zclassic.plugins import hook class Plugin(LabelsPlugin): diff --git a/plugins/labels/labels.py b/plugins/labels/labels.py index dcea310e..0af408a6 100644 --- a/plugins/labels/labels.py +++ b/plugins/labels/labels.py @@ -7,9 +7,9 @@ import traceback import base64 -import electrum_zcash -from electrum_zcash.plugins import BasePlugin, hook -from electrum_zcash.i18n import _ +import electrum_zclassic +from electrum_zclassic.plugins import BasePlugin, hook +from electrum_zclassic.i18n import _ class LabelsPlugin(BasePlugin): @@ -21,14 +21,14 @@ class LabelsPlugin(BasePlugin): def encode(self, wallet, msg): password, iv, wallet_id = self.wallets[wallet] - encrypted = electrum_zcash.bitcoin.aes_encrypt_with_iv(password, iv, + encrypted = electrum_zclassic.bitcoin.aes_encrypt_with_iv(password, iv, msg.encode('utf8')) return base64.b64encode(encrypted).decode() def decode(self, wallet, message): password, iv, wallet_id = self.wallets[wallet] decoded = base64.b64decode(message) - decrypted = electrum_zcash.bitcoin.aes_decrypt_with_iv(password, iv, decoded) + decrypted = electrum_zclassic.bitcoin.aes_decrypt_with_iv(password, iv, decoded) return decrypted.decode('utf8') def get_nonce(self, wallet): diff --git a/plugins/labels/qt.py b/plugins/labels/qt.py index 7440be28..96768325 100644 --- a/plugins/labels/qt.py +++ b/plugins/labels/qt.py @@ -6,11 +6,11 @@ from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWidgets import (QHBoxLayout, QLabel, QVBoxLayout) -from electrum_zcash.plugins import hook -from electrum_zcash.i18n import _ -from electrum_zcash_gui.qt import EnterButton -from electrum_zcash_gui.qt.util import ThreadedButton, Buttons -from electrum_zcash_gui.qt.util import WindowModalDialog, OkButton +from electrum_zclassic.plugins import hook +from electrum_zclassic.i18n import _ +from electrum_zclassic_gui.qt import EnterButton +from electrum_zclassic_gui.qt.util import ThreadedButton, Buttons +from electrum_zclassic_gui.qt.util import WindowModalDialog, OkButton from .labels import LabelsPlugin diff --git a/plugins/ledger/__init__.py b/plugins/ledger/__init__.py index e7dfc16e..bd56b00b 100644 --- a/plugins/ledger/__init__.py +++ b/plugins/ledger/__init__.py @@ -1,4 +1,4 @@ -from electrum_zcash.i18n import _ +from electrum_zclassic.i18n import _ fullname = 'Ledger Wallet' description = 'Provides support for Ledger hardware wallet' diff --git a/plugins/ledger/auth2fa.py b/plugins/ledger/auth2fa.py index 8525f236..30aad114 100644 --- a/plugins/ledger/auth2fa.py +++ b/plugins/ledger/auth2fa.py @@ -13,11 +13,11 @@ from PyQt5.QtWidgets import * from btchip.btchip import * -from electrum_zcash.i18n import _ -from electrum_zcash_gui.qt.util import * -from electrum_zcash.util import print_msg -from electrum_zcash import constants, bitcoin -from electrum_zcash_gui.qt.qrcodewidget import QRCodeWidget +from electrum_zclassic.i18n import _ +from electrum_zclassic_gui.qt.util import * +from electrum_zclassic.util import print_msg +from electrum_zclassic import constants, bitcoin +from electrum_zclassic_gui.qt.qrcodewidget import QRCodeWidget DEBUG = False @@ -32,7 +32,7 @@ helpTxt = [_("Your Ledger Wallet wants to tell you a one-time PIN code.

    " _("Waiting for authentication on your mobile phone"), _("Transaction accepted by mobile phone. Waiting for confirmation."), _("Click Pair button to begin pairing a mobile phone."), - _("Scan this QR code with your Ledger Wallet phone app to pair it with this Ledger device.
    " + _("Scan this QR code with your Ledger Wallet phone app to pair it with this Ledger device.
    " "To complete pairing you will need your security card to answer a challenge." ) ] @@ -51,14 +51,14 @@ class LedgerAuthDialog(QDialog): self.dongle = self.handler.win.wallet.get_keystore().get_client().dongle self.ws = None self.pin = '' - + self.devmode = self.getDevice2FAMode() if self.devmode == 0x11 or self.txdata['confirmationType'] == 1: self.cfg['mode'] = 0 - + vbox = QVBoxLayout() self.setLayout(vbox) - + def on_change_mode(idx): if idx < 2 and self.ws: self.ws.stop() @@ -73,11 +73,11 @@ class LedgerAuthDialog(QDialog): def add_pairing(): self.do_pairing() def return_pin(): - self.pin = self.pintxt.text() if self.txdata['confirmationType'] == 1 else self.cardtxt.text() + self.pin = self.pintxt.text() if self.txdata['confirmationType'] == 1 else self.cardtxt.text() if self.cfg['mode'] == 1: self.pin = ''.join(chr(int(str(i),16)) for i in self.pin) self.accept() - + self.modebox = QWidget() modelayout = QHBoxLayout() self.modebox.setLayout(modelayout) @@ -90,16 +90,16 @@ class LedgerAuthDialog(QDialog): modelayout.addStretch(1) self.modebox.setMaximumHeight(50) vbox.addWidget(self.modebox) - + self.populate_modes() self.modes.currentIndexChanged.connect(on_change_mode) self.addPair.clicked.connect(add_pairing) - + self.helpmsg = QTextEdit() self.helpmsg.setStyleSheet("QTextEdit { background-color: lightgray; }") self.helpmsg.setReadOnly(True) vbox.addWidget(self.helpmsg) - + self.pinbox = QWidget() pinlayout = QHBoxLayout() self.pinbox.setLayout(pinlayout) @@ -113,7 +113,7 @@ class LedgerAuthDialog(QDialog): pinlayout.addStretch(1) self.pinbox.setVisible(self.cfg['mode'] == 0) vbox.addWidget(self.pinbox) - + self.cardbox = QWidget() card = QVBoxLayout() self.cardbox.setLayout(card) @@ -122,7 +122,7 @@ class LedgerAuthDialog(QDialog): self.addrtext.setReadOnly(True) self.addrtext.setMaximumHeight(130) card.addWidget(self.addrtext) - + def pin_changed(s): if len(s) < len(self.idxs): i = self.idxs[len(s)] @@ -137,8 +137,8 @@ class LedgerAuthDialog(QDialog): self.addrtext.setHtml(str(text)) else: self.addrtext.setHtml(_("Press Enter")) - - pin_changed('') + + pin_changed('') cardpin = QHBoxLayout() cardpin.addWidget(QLabel(_("Enter PIN:"))) self.cardtxt = QLineEdit() @@ -152,7 +152,7 @@ class LedgerAuthDialog(QDialog): card.addLayout(cardpin) self.cardbox.setVisible(self.cfg['mode'] == 1) vbox.addWidget(self.cardbox) - + self.pairbox = QWidget() pairlayout = QVBoxLayout() self.pairbox.setLayout(pairlayout) @@ -165,10 +165,10 @@ class LedgerAuthDialog(QDialog): self.pairbox.setVisible(False) vbox.addWidget(self.pairbox) self.update_dlg() - + if self.cfg['mode'] > 1 and not self.ws: self.req_validation() - + def populate_modes(self): self.modes.blockSignals(True) self.modes.clear() @@ -176,11 +176,11 @@ class LedgerAuthDialog(QDialog): if self.txdata['confirmationType'] > 1: self.modes.addItem(_("Security Card Challenge")) if not self.cfg['pair']: - self.modes.addItem(_("Mobile - Not paired")) + self.modes.addItem(_("Mobile - Not paired")) else: self.modes.addItem(_("Mobile - {}").format(self.cfg['pair'][1])) self.modes.blockSignals(False) - + def update_dlg(self): self.modes.setCurrentIndex(self.cfg['mode']) self.modebox.setVisible(True) @@ -209,8 +209,8 @@ class LedgerAuthDialog(QDialog): self.ws.stop() self.ws = LedgerWebSocket(self, pairID) self.ws.pairing_done.connect(self.pairing_done) - self.ws.start() - + self.ws.start() + def pairing_done(self, data): if data is not None: self.cfg['pair'] = [ data['pairid'], data['name'], data['platform'] ] @@ -219,7 +219,7 @@ class LedgerAuthDialog(QDialog): self.handler.win.wallet.save_keystore() self.pin = 'paired' self.accept() - + def req_validation(self): if self.cfg['pair'] and 'secureScreenData' in self.txdata: if self.ws: @@ -227,14 +227,14 @@ class LedgerAuthDialog(QDialog): self.ws = LedgerWebSocket(self, self.cfg['pair'][0], self.txdata) self.ws.req_updated.connect(self.req_updated) self.ws.start() - + def req_updated(self, pin): if pin == 'accepted': self.helpmsg.setText(helpTxt[3]) else: self.pin = str(pin) self.accept() - + def getDevice2FAMode(self): apdu = [0xe0, 0x24, 0x01, 0x00, 0x00, 0x01] # get 2fa mode try: @@ -243,7 +243,7 @@ class LedgerAuthDialog(QDialog): except BTChipException as e: debug_msg('Device getMode Failed') return 0x11 - + def closeEvent(self, evnt): debug_msg("CLOSE - Stop WS") if self.ws: @@ -255,7 +255,7 @@ class LedgerAuthDialog(QDialog): class LedgerWebSocket(QThread): pairing_done = pyqtSignal(object) req_updated = pyqtSignal(str) - + def __init__(self, dlg, pairID, txdata=None): QThread.__init__(self) self.stopping = False @@ -264,13 +264,13 @@ class LedgerWebSocket(QThread): self.dlg = dlg self.dongle = self.dlg.dongle self.data = None - + #websocket.enableTrace(True) logging.basicConfig(level=logging.INFO) - self.ws = websocket.WebSocketApp('wss://ws.ledgerwallet.com/2fa/channels', + self.ws = websocket.WebSocketApp('wss://ws.ledgerwallet.com/2fa/channels', on_message = self.on_message, on_error = self.on_error, on_close = self.on_close, on_open = self.on_open) - + def run(self): while not self.stopping: self.ws.run_forever() @@ -291,7 +291,7 @@ class LedgerWebSocket(QThread): self.data = data except BTChipException as e: debug_msg('Identify Failed') - + if data['type'] == 'challenge': debug_msg('Challenge') apdu = [0xe0, 0x12, 0x02, 0x00, 0x10] # confirm pairing @@ -304,12 +304,12 @@ class LedgerWebSocket(QThread): self.pairing_done.emit(self.data) except BTChipException as e: debug_msg('Pairing Failed') - ws.send( '{"type":"pairing","is_successful":"false"}' ) + ws.send( '{"type":"pairing","is_successful":"false"}' ) self.pairing_done.emit(None) ws.send( '{"type":"disconnect"}' ) self.stopping = True ws.close() - + if data['type'] == 'accept': debug_msg('Accepted') self.req_updated.emit('accepted') @@ -319,7 +319,7 @@ class LedgerWebSocket(QThread): self.txreq = None self.stopping = True ws.close() - + if data['type'] == 'repeat': debug_msg('Repeat') if self.txreq: @@ -333,16 +333,16 @@ class LedgerWebSocket(QThread): if data['type'] == 'disconnect': debug_msg('Disconnected') ws.close() - + def on_error(self, ws, error): message = getattr(error, 'strerror', '') if not message: message = getattr(error, 'message', '') debug_msg("WS: %s" % message) - + def on_close(self, ws): debug_msg("WS: ### socket closed ###") - + def on_open(self, ws): debug_msg("WS: ### socket open ###") debug_msg("Joining with pairing ID", self.pairID) @@ -355,4 +355,4 @@ class LedgerWebSocket(QThread): def debug_msg(*args): if DEBUG: - print_msg(*args) + print_msg(*args) diff --git a/plugins/ledger/cmdline.py b/plugins/ledger/cmdline.py index 2167e85b..21e6f53b 100644 --- a/plugins/ledger/cmdline.py +++ b/plugins/ledger/cmdline.py @@ -1,4 +1,4 @@ -from electrum_zcash.plugins import hook +from electrum_zclassic.plugins import hook from .ledger import LedgerPlugin from ..hw_wallet import CmdLineHandler diff --git a/plugins/ledger/ledger.py b/plugins/ledger/ledger.py index c5b2a241..5432583f 100644 --- a/plugins/ledger/ledger.py +++ b/plugins/ledger/ledger.py @@ -3,17 +3,17 @@ import hashlib import sys import traceback -from electrum_zcash import bitcoin -from electrum_zcash import constants -from electrum_zcash.bitcoin import (TYPE_ADDRESS, int_to_hex, var_int, +from electrum_zclassic import bitcoin +from electrum_zclassic import constants +from electrum_zclassic.bitcoin import (TYPE_ADDRESS, int_to_hex, var_int, b58_address_to_hash160, hash160_to_b58_address) -from electrum_zcash.i18n import _ -from electrum_zcash.plugins import BasePlugin -from electrum_zcash.keystore import Hardware_KeyStore -from electrum_zcash.transaction import Transaction +from electrum_zclassic.i18n import _ +from electrum_zclassic.plugins import BasePlugin +from electrum_zclassic.keystore import Hardware_KeyStore +from electrum_zclassic.transaction import Transaction from ..hw_wallet import HW_PluginBase -from electrum_zcash.util import print_error, is_verbose, bfh, bh2u, versiontuple +from electrum_zclassic.util import print_error, is_verbose, bfh, bh2u, versiontuple def setAlternateCoinVersions(self, regular, p2sh): @@ -187,7 +187,7 @@ class Ledger_Client(): self.perform_hw1_preflight() except BTChipException as e: if (e.sw == 0x6d00 or e.sw == 0x6700): - raise Exception(_("Device not in Zcash mode")) from e + raise Exception(_("Device not in Zclassic mode")) from e raise e self.preflightDone = True diff --git a/plugins/ledger/qt.py b/plugins/ledger/qt.py index 5d49a4b7..302a5385 100644 --- a/plugins/ledger/qt.py +++ b/plugins/ledger/qt.py @@ -1,9 +1,9 @@ #from btchip.btchipPersoWizard import StartBTChipPersoDialog -from electrum_zcash.i18n import _ -from electrum_zcash.plugins import hook -from electrum_zcash.wallet import Standard_Wallet -from electrum_zcash_gui.qt.util import * +from electrum_zclassic.i18n import _ +from electrum_zclassic.plugins import hook +from electrum_zclassic.wallet import Standard_Wallet +from electrum_zclassic_gui.qt.util import * from .ledger import LedgerPlugin from ..hw_wallet.qt import QtHandlerBase, QtPluginBase @@ -42,7 +42,7 @@ class Ledger_Handler(QtHandlerBase): else: self.word = str(response[0]) self.done.set() - + def message_dialog(self, msg): self.clear_dialog() self.dialog = dialog = WindowModalDialog(self.top_level_window(), _("Ledger Status")) @@ -61,19 +61,19 @@ class Ledger_Handler(QtHandlerBase): dialog.exec_() self.word = dialog.pin self.done.set() - + def get_auth(self, data): self.done.clear() self.auth_signal.emit(data) self.done.wait() return self.word - + def get_setup(self): self.done.clear() self.setup_signal.emit() self.done.wait() - return - + return + def setup_dialog(self): self.show_error(_('Initialization of Ledger HW devices is currently disabled.')) return diff --git a/plugins/trezor/__init__.py b/plugins/trezor/__init__.py index 9bc5db26..56bb4dd0 100644 --- a/plugins/trezor/__init__.py +++ b/plugins/trezor/__init__.py @@ -1,4 +1,4 @@ -from electrum_zcash.i18n import _ +from electrum_zclassic.i18n import _ fullname = 'TREZOR Wallet' description = _('Provides support for TREZOR hardware wallet') diff --git a/plugins/trezor/clientbase.py b/plugins/trezor/clientbase.py index 5a847de4..5a2f058a 100644 --- a/plugins/trezor/clientbase.py +++ b/plugins/trezor/clientbase.py @@ -1,10 +1,10 @@ import time from struct import pack -from electrum_zcash.i18n import _ -from electrum_zcash.util import PrintError, UserCancelled -from electrum_zcash.keystore import bip39_normalize_passphrase -from electrum_zcash.bitcoin import serialize_xpub +from electrum_zclassic.i18n import _ +from electrum_zclassic.util import PrintError, UserCancelled +from electrum_zclassic.keystore import bip39_normalize_passphrase +from electrum_zclassic.bitcoin import serialize_xpub class GuiMixin(object): @@ -65,7 +65,7 @@ class GuiMixin(object): msg = _("Enter a passphrase to generate this wallet. Each time " "you use this wallet your {} will prompt you for the " "passphrase. If you forget the passphrase you cannot " - "access the Zcash coins in the wallet.").format(self.device) + "access the Zclassic coins in the wallet.").format(self.device) else: msg = _("Enter the passphrase to unlock this wallet:") passphrase = self.handler.get_passphrase(msg, self.creating_wallet) @@ -127,8 +127,8 @@ class TrezorClientBase(GuiMixin, PrintError): def has_usable_connection_with_device(self): try: - res = self.ping("electrum-zcash pinging device") - assert res == "electrum-zcash pinging device" + res = self.ping("electrum-zclassic pinging device") + assert res == "electrum-zclassic pinging device" except BaseException: return False return True diff --git a/plugins/trezor/cmdline.py b/plugins/trezor/cmdline.py index 5beafa8a..a832db06 100644 --- a/plugins/trezor/cmdline.py +++ b/plugins/trezor/cmdline.py @@ -1,4 +1,4 @@ -from electrum_zcash.plugins import hook +from electrum_zclassic.plugins import hook from .trezor import TrezorPlugin from ..hw_wallet import CmdLineHandler diff --git a/plugins/trezor/qt_generic.py b/plugins/trezor/qt_generic.py index b8210991..636c5276 100644 --- a/plugins/trezor/qt_generic.py +++ b/plugins/trezor/qt_generic.py @@ -4,29 +4,29 @@ import threading from PyQt5.Qt import Qt from PyQt5.Qt import QGridLayout, QInputDialog, QPushButton from PyQt5.Qt import QVBoxLayout, QLabel -from electrum_zcash_gui.qt.util import * +from electrum_zclassic_gui.qt.util import * from .trezor import TIM_NEW, TIM_RECOVER, TIM_MNEMONIC from ..hw_wallet.qt import QtHandlerBase, QtPluginBase -from electrum_zcash.i18n import _ -from electrum_zcash.plugins import hook, DeviceMgr -from electrum_zcash.util import PrintError, UserCancelled, bh2u -from electrum_zcash.wallet import Wallet, Standard_Wallet +from electrum_zclassic.i18n import _ +from electrum_zclassic.plugins import hook, DeviceMgr +from electrum_zclassic.util import PrintError, UserCancelled, bh2u +from electrum_zclassic.wallet import Wallet, Standard_Wallet PASSPHRASE_HELP_SHORT =_( "Passphrases allow you to access new wallets, each " "hidden behind a particular case-sensitive passphrase.") PASSPHRASE_HELP = PASSPHRASE_HELP_SHORT + " " + _( - "You need to create a separate Electrum-Zcash wallet for each passphrase " + "You need to create a separate Electrum-Zclassic wallet for each passphrase " "you use as they each generate different addresses. Changing " "your passphrase does not lose other wallets, each is still " "accessible behind its own passphrase.") RECOMMEND_PIN = _( "You should enable PIN protection. Your PIN is the only protection " - "for your Zcash coins if your device is lost or stolen.") + "for your Zclassic coins if your device is lost or stolen.") PASSPHRASE_NOT_PIN = _( "If you forget a passphrase you will be unable to access any " - "Zcash coins in the wallet behind it. A passphrase is not a PIN. " + "Zclassic coins in the wallet behind it. A passphrase is not a PIN. " "Only change this if you are sure you understand it.") CHARACTER_RECOVERY = ( "Use the recovery cipher shown on your device to input your seed words. " @@ -243,7 +243,7 @@ class QtPlugin(QtPluginBase): else: msg = _("Enter the master private key beginning with xprv:") def set_enabled(): - from electrum_zcash.keystore import is_xprv + from electrum_zclassic.keystore import is_xprv wizard.next_button.setEnabled(is_xprv(clean_text(text))) text.textChanged.connect(set_enabled) next_enabled = False @@ -363,13 +363,13 @@ class SettingsDialog(WindowModalDialog): currently_enabled = self.features.passphrase_protection if currently_enabled: msg = _("After disabling passphrases, you can only pair this " - "Electrum-Zcash wallet if it had an empty passphrase. " + "Electrum-Zclassic wallet if it had an empty passphrase. " "If its passphrase was not empty, you will need to " "create a new wallet with the install wizard. You " "can use this wallet again at any time by re-enabling " "passphrases and entering its passphrase.") else: - msg = _("Your current Electrum-Zcash wallet can only be used with " + msg = _("Your current Electrum-Zclassic wallet can only be used with " "an empty passphrase. You must create a separate " "wallet with the install wizard for other passphrases " "as each one generates a new set of addresses.") @@ -416,7 +416,7 @@ class SettingsDialog(WindowModalDialog): if wallet and sum(wallet.get_balance()): title = _("Confirm Device Wipe") msg = _("Are you SURE you want to wipe the device?\n" - "Your wallet still has Zcash coins in it!") + "Your wallet still has Zclassic coins in it!") if not self.question(msg, title=title, icon=QMessageBox.Critical): return @@ -491,7 +491,7 @@ class SettingsDialog(WindowModalDialog): settings_glayout.addWidget(pin_button, 2, 1) pin_msg = QLabel(_("PIN protection is strongly recommended. " "A PIN is your only protection against someone " - "stealing your Zcash coins if they obtain physical " + "stealing your Zclassic coins if they obtain physical " "access to your {}.").format(plugin.device)) pin_msg.setWordWrap(True) pin_msg.setStyleSheet("color: red") @@ -551,7 +551,7 @@ class SettingsDialog(WindowModalDialog): clear_pin_button.clicked.connect(clear_pin) clear_pin_warning = QLabel( _("If you disable your PIN, anyone with physical access to your " - "{} device can spend your Zcash coins.").format(plugin.device)) + "{} device can spend your Zclassic coins.").format(plugin.device)) clear_pin_warning.setWordWrap(True) clear_pin_warning.setStyleSheet("color: red") advanced_glayout.addWidget(clear_pin_button, 0, 2) @@ -576,7 +576,7 @@ class SettingsDialog(WindowModalDialog): wipe_device_msg.setWordWrap(True) wipe_device_warning = QLabel( _("Only wipe a device if you have the recovery seed written down " - "and the device wallet(s) are empty, otherwise the Zcash coins " + "and the device wallet(s) are empty, otherwise the Zclassic coins " "will be lost forever.")) wipe_device_warning.setWordWrap(True) wipe_device_warning.setStyleSheet("color: red") diff --git a/plugins/trezor/transport.py b/plugins/trezor/transport.py index 24e272b0..e57f207b 100644 --- a/plugins/trezor/transport.py +++ b/plugins/trezor/transport.py @@ -1,4 +1,4 @@ -from electrum_zcash.util import PrintError +from electrum_zclassic.util import PrintError class TrezorTransport(PrintError): diff --git a/plugins/trezor/trezor.py b/plugins/trezor/trezor.py index a7bd0cb0..14949e27 100644 --- a/plugins/trezor/trezor.py +++ b/plugins/trezor/trezor.py @@ -1,13 +1,13 @@ from binascii import hexlify, unhexlify -from electrum_zcash.util import bfh, bh2u, versiontuple -from electrum_zcash.bitcoin import (b58_address_to_hash160, xpub_from_pubkey, +from electrum_zclassic.util import bfh, bh2u, versiontuple +from electrum_zclassic.bitcoin import (b58_address_to_hash160, xpub_from_pubkey, TYPE_ADDRESS, TYPE_SCRIPT) -from electrum_zcash import constants -from electrum_zcash.i18n import _ -from electrum_zcash.plugins import BasePlugin, Device -from electrum_zcash.transaction import deserialize, Transaction -from electrum_zcash.keystore import Hardware_KeyStore, is_xpubkey, parse_xpubkey +from electrum_zclassic import constants +from electrum_zclassic.i18n import _ +from electrum_zclassic.plugins import BasePlugin, Device +from electrum_zclassic.transaction import deserialize, Transaction +from electrum_zclassic.keystore import Hardware_KeyStore, is_xpubkey, parse_xpubkey from ..hw_wallet import HW_PluginBase @@ -163,7 +163,7 @@ class TrezorPlugin(HW_PluginBase): return client def get_coin_name(self): - return "ZcashTestnet" if constants.net.TESTNET else "Zcash" + return "ZclassicTestnet" if constants.net.TESTNET else "Zclassic" def initialize_device(self, device_id, wizard, handler): # Initialization method diff --git a/plugins/virtualkeyboard/__init__.py b/plugins/virtualkeyboard/__init__.py index ce302211..56b3e7e0 100644 --- a/plugins/virtualkeyboard/__init__.py +++ b/plugins/virtualkeyboard/__init__.py @@ -1,4 +1,4 @@ -from electrum_zcash.i18n import _ +from electrum_zclassic.i18n import _ fullname = 'Virtual Keyboard' description = '%s\n%s' % (_("Add an optional virtual keyboard to the password dialog."), _("Warning: do not use this if it makes you pick a weaker password.")) diff --git a/plugins/virtualkeyboard/qt.py b/plugins/virtualkeyboard/qt.py index a73f2c6f..cd255c5a 100644 --- a/plugins/virtualkeyboard/qt.py +++ b/plugins/virtualkeyboard/qt.py @@ -1,7 +1,7 @@ from PyQt5.QtGui import * from PyQt5.QtWidgets import (QVBoxLayout, QGridLayout, QPushButton) -from electrum_zcash.plugins import BasePlugin, hook -from electrum_zcash.i18n import _ +from electrum_zclassic.plugins import BasePlugin, hook +from electrum_zclassic.i18n import _ import random diff --git a/setup.py b/setup.py index 4305bc14..b5d52741 100755 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ with open('contrib/requirements/requirements-hw.txt') as f: version = imp.load_source('version', 'lib/version.py') if sys.version_info[:3] < (3, 4, 0): - sys.exit("Error: Electrum-Zcash requires Python version >= 3.4.0...") + sys.exit("Error: Electrum-Zclassic requires Python version >= 3.4.0...") data_files = [] @@ -36,40 +36,40 @@ if platform.system() in ['Linux', 'FreeBSD', 'DragonFly']: else: usr_share = os.path.expanduser('~/.local/share') data_files += [ - (os.path.join(usr_share, 'applications/'), ['electrum-zcash.desktop']), - (os.path.join(usr_share, icons_dirname), ['icons/electrum-zcash.png']) + (os.path.join(usr_share, 'applications/'), ['electrum-zclassic.desktop']), + (os.path.join(usr_share, icons_dirname), ['icons/electrum-zclassic.png']) ] setup( - name="Electrum-Zcash", + name="Electrum-Zclassic", version=version.ELECTRUM_VERSION, install_requires=requirements, extras_require={ 'full': requirements_hw + ['pycryptodomex'], }, packages=[ - 'electrum_zcash', - 'electrum_zcash_gui', - 'electrum_zcash_gui.qt', - 'electrum_zcash_plugins', - 'electrum_zcash_plugins.audio_modem', - 'electrum_zcash_plugins.cosigner_pool', - 'electrum_zcash_plugins.email_requests', - 'electrum_zcash_plugins.hw_wallet', - 'electrum_zcash_plugins.keepkey', - 'electrum_zcash_plugins.labels', - 'electrum_zcash_plugins.ledger', - 'electrum_zcash_plugins.trezor', - 'electrum_zcash_plugins.digitalbitbox', - 'electrum_zcash_plugins.virtualkeyboard', + 'electrum_zclassic', + 'electrum_zclassic_gui', + 'electrum_zclassic_gui.qt', + 'electrum_zclassic_plugins', + 'electrum_zclassic_plugins.audio_modem', + 'electrum_zclassic_plugins.cosigner_pool', + 'electrum_zclassic_plugins.email_requests', + 'electrum_zclassic_plugins.hw_wallet', + 'electrum_zclassic_plugins.keepkey', + 'electrum_zclassic_plugins.labels', + 'electrum_zclassic_plugins.ledger', + 'electrum_zclassic_plugins.trezor', + 'electrum_zclassic_plugins.digitalbitbox', + 'electrum_zclassic_plugins.virtualkeyboard', ], package_dir={ - 'electrum_zcash': 'lib', - 'electrum_zcash_gui': 'gui', - 'electrum_zcash_plugins': 'plugins', + 'electrum_zclassic': 'lib', + 'electrum_zclassic_gui': 'gui', + 'electrum_zclassic_plugins': 'plugins', }, package_data={ - 'electrum_zcash': [ + 'electrum_zclassic': [ 'servers.json', 'servers_testnet.json', 'servers_regtest.json', @@ -78,12 +78,12 @@ setup( 'locale/*/LC_MESSAGES/electrum.mo', ] }, - scripts=['electrum-zcash'], + scripts=['electrum-zclassic'], data_files=data_files, - description="Lightweight Zcash Wallet", + description="Lightweight Zclassic Wallet", author="Thomas Voegtlin", author_email="thomasv@electrum.org", license="MIT License", - url="https://github.com/zebra-lucky/electrum-zcash", - long_description="""Lightweight Zcash Wallet""" + url="https://github.com/zebra-lucky/electrum-zclassic", + long_description="""Lightweight Zclassic Wallet""" )