Skip to content

Commit

Permalink
Merge pull request #456 from HorizenOfficial/updatedeps
Browse files Browse the repository at this point in the history
Update dependencies, add testnet, minor fixes
  • Loading branch information
cronicc authored Nov 22, 2021
2 parents 761cbf4 + 9d1244e commit 4e3aafa
Show file tree
Hide file tree
Showing 36 changed files with 2,583 additions and 4,789 deletions.
9 changes: 7 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,26 @@ branches:
env:
global:
- PROJECT_NAME=arizen
- HOMEBREW_NO_AUTO_UPDATE=1
- USE_HARD_LINKS=false

addons:
homebrew:
update: false
packages:
- gnupg
apt:
packages:
- gpg
- python3-pip
- python3-setuptools

jobs:
include:
- os: osx
osx_image: xcode10.2
language: node_js
node_js: lts/erbium
node_js: lts/fermium
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
Expand All @@ -56,7 +61,7 @@ before_cache:
- rm -rf $HOME/.cache/electron-builder/wine

after_success:
- sudo pip install --upgrade b2
- sudo pip3 install --upgrade b2
- ./ci/after_success.sh

deploy:
Expand Down
25 changes: 15 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
[![Dependency status][david-img]][david-url]
[![License][license-img]][license-url]
[![Build status][travis-img]][travis-url]
[![Code Climate][codeclimate-img]][codeclimate-url]

<p align="center"><img src="https://www.horizen.global/assets/img/icons/page_media/logo_no_tagline.svg" width="600"></p>

# User Manuals
- v1.2.5: [Arizen v1.2.5 Wallet User Manual](https://horizenofficial.atlassian.net/wiki/spaces/ZEN/pages/665354259/Arizen+User+Manual)
- v1.3.0: [Arizen v1.3.0 Wallet User Manual](https://horizenofficial.atlassian.net/wiki/spaces/ZEN/pages/665354259/Arizen+User+Manual)

# Notes
- To upgrade to v1.2.5 on Windows, please uninstall any previous version of Arizen before installing v1.2.5. This is needed because the installer works differently in v1.2.5. As always please make sure you create regular [backups](https://horizenofficial.atlassian.net/wiki/spaces/ZEN/pages/666009654/1.4+-+Manual+Backup) of your awd files.
- To upgrade to v1.3.0 on Windows, please uninstall any previous version of Arizen older than v1.2.5. This is needed because the installer works differently in v1.2.5+. As always please make sure you create regular [backups](https://horizenofficial.atlassian.net/wiki/spaces/ZEN/pages/666009654/1.4+-+Manual+Backup) of your awd files.

# Version History

## v1.3.0-beta
- [x] Update of dependencies, switch out unsupported dependencies
- [x] Modify to support new versions of dependencies
- [x] Add ability to run on testnet (using `npm run testnet` in cloned repo)
- [x] Test compatibility with zen v3.0.0
- [x] Add Content Security Policy for additional security
- [x] Fixed missing cursor on login after creating a new wallet

## v1.2.5
- [x] Update of dependencies, removal of unused dependencies
- [x] Switch to NSIS Windows installer
Expand Down Expand Up @@ -172,7 +179,7 @@ printed. This created address can by included to your Arizen or not.
## Development

### How to create distribution
git clone https://github.com/ZencashOfficial/arizen
git clone https://github.com/HorizenOfficial/arizen
git checkout master
npm install
npm run dist
Expand Down Expand Up @@ -203,11 +210,9 @@ printed. This created address can by included to your Arizen or not.
![Notification](https://i.imgur.com/WdW0WMK.png)


[david-img]: https://david-dm.org/ZencashOfficial/arizen.svg?style=flat-square
[david-url]: https://david-dm.org/ZencashOfficial/arizen
[david-img]: https://david-dm.org/HorizenOfficial/arizen.svg?style=flat-square
[david-url]: https://david-dm.org/HorizenOfficial/arizen
[license-img]: https://img.shields.io/badge/license-MIT-green.svg?style=flat-square
[license-url]: LICENSE
[travis-img]: https://img.shields.io/travis/ZencashOfficial/arizen.svg?style=flat-square
[travis-url]: https://travis-ci.org/ZencashOfficial/arizen.svg?branch=master
[codeclimate-img]: https://codeclimate.com/github/ZencashOfficial/arizen/badges/gpa.svg?style=flat-square
[codeclimate-url]: https://codeclimate.com/github/ZencashOfficial/arizen
[travis-img]: https://img.shields.io/travis/HorizenOfficial/arizen.svg?style=flat-square
[travis-url]: https://travis-ci.org/HorizenOfficial/arizen.svg?branch=master
14 changes: 14 additions & 0 deletions app/create_wallet.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Security-Policy"
content="default-src 'self';
connect-src 'self' https: wss:;
script-src 'self' 'unsafe-inline';
style-src 'self' 'unsafe-inline';
img-src 'self' 'unsafe-eval' 'unsafe-inline';
font-src 'self';
media-src 'self' blob:;
child-src 'self';
object-src 'none';"
>
<title>Arizen: Create Wallet</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

Expand Down Expand Up @@ -97,6 +108,9 @@ <h4 data-tr=createWallet.errorCreationFailed>Wallet creation failed</h4>
<li id="wallet_creation_info" class="invalid"/>
</ul>
</div>
<div id="testnet" style="color:darkred; margin-top:26px; text-align:center; display:none">
<div><strong>TESTNET</strong></div>
</div>
</div>
</body>
</html>
17 changes: 11 additions & 6 deletions app/create_wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ let num = false;
let ide = false;
let spec = false;

const userWarningCreateWallet = "To make sure that you will never lose your wallet make sure to keep backup of your wallet(s) file. (.uawd or .awd + username + password). If you are not sure please refer to the Arizen manual for further information. By pressing 'I understand' you declare that you understand this. For further information please refer to the help menu of Arizen.";


function checkLoginInfo() {
document.getElementById("btSubmit").disabled = !(usr && len && lett && capl && num && ide && spec);
}
Expand All @@ -41,16 +38,24 @@ ipcRenderer.on("write-login-response", function (event, resp) {
let data = JSON.parse(resp);

if (data.response === "OK") {
location.href = "./login.html";
console.log("Wallet creation was successful - redirecting to login.html");
alert(userWarningCreateWallet);
console.log("Wallet creation was successful - prompt for warning confirmation");
ipcRenderer.send("new-wallet-warning", '')
} else {
console.log("Wallet creation failed");
document.getElementById("wallet_creation_info").innerHTML = data.msg;
document.getElementById("wallet_creation_info_area").style.display = "block";
}
});

ipcRenderer.on("new-wallet-response", function (event) {
console.log("Wallet warning confirmed - redirecting to login.html");
location.href = "./login.html";
});

ipcRenderer.on("testnet", function(){
document.getElementById("testnet").style.display = "block";
})

function changeClass(objectid, newClass, oldClass) {
/* FIXME: use classList.replace when electron uses chrome 61 */
document.getElementById(objectid).classList.add(newClass);
Expand Down
23 changes: 20 additions & 3 deletions app/login.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Security-Policy"
content="default-src 'self';
connect-src 'self' https: wss:;
script-src 'self' 'unsafe-inline';
style-src 'self' 'unsafe-inline' 'unsafe-eval';
img-src 'self' 'unsafe-eval' 'unsafe-inline';
font-src 'self';
media-src 'self' blob:;
child-src 'self';
object-src 'none';"
>
<title data-tr=login.title>Arizen: Login</title>
<link rel="stylesheet" href="resources/login_styles.css">
<script src="login.js"></script>
</head>

<body>
<div style="display:none">
<img src="resources/invalid.png">
</div>
<div id="topHeader" class="topHeader" style="text-align:center; margin:auto; vertical-align: middle;">
<!-- same as in create_wallet.html -->
<img src="resources/zen_icon.png" width="40px">
Expand All @@ -25,7 +38,7 @@
</li>
<li>
<!-- type has to be "submit" -- ENTER doesnt work with button -->
<input id="btSubmit" class="buttons" name="btSubmit" type="submit" data-tr=login.loginButton value="Login" onclick="doLogin();" tabindex="3">
<input id="btSubmit" class="buttons" name="btSubmit" type="submit" data-tr=login.loginButton value="Login" tabindex="3">
</li>
</ul>
<div class="right">
Expand All @@ -47,7 +60,11 @@
<li class="invalid">Wallet with this name <strong>does NOT exist</strong></li>
</ul>
</div>
<div id="testnet" style="color:darkred; margin-top:26px; text-align:center; display:none">
<div><strong>TESTNET</strong></div>
</div>
</div>

<script src="login.js"></script>
</body>
</html>
</html>
12 changes: 12 additions & 0 deletions app/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,21 @@ ipcRenderer.on("verify-login-response", function (event, resp) {
console.log("Login was successful - redirecting to wallet.html");
} else if (data.response === "ERR_corrupted_file") {
document.getElementById("login_corrupted_file").style.display = "block";
document.getElementById("login_wrong_credentials").style.display = "none";
document.getElementById("login_nonexistent_wallet_name").style.display = "none";
} else if (data.response === "ERR_wrong_credentials") {
document.getElementById("login_wrong_credentials").style.display = "block";
document.getElementById("login_corrupted_file").style.display = "none";
document.getElementById("login_nonexistent_wallet_name").style.display = "none";
} else if (data.response === "ERR_nonexistent_wallet_name") {
document.getElementById("login_nonexistent_wallet_name").style.display = "block";
document.getElementById("login_wrong_credentials").style.display = "none";
document.getElementById("login_corrupted_file").style.display = "none";
}
});

ipcRenderer.on("testnet", function(){
document.getElementById("testnet").style.display = "block";
})

document.getElementById ("btSubmit"). addEventListener ('click', function (e) { e.preventDefault(); doLogin() }, false);
Loading

0 comments on commit 4e3aafa

Please sign in to comment.