Skip to content

Commit

Permalink
Merge pull request #403 from ZencashOfficial/development
Browse files Browse the repository at this point in the history
Release 1.2.2
  • Loading branch information
cronicc authored Apr 2, 2019
2 parents 803a0ee + ef59440 commit 3c8f518
Show file tree
Hide file tree
Showing 4 changed files with 282 additions and 325 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
[![Code Climate][codeclimate-img]][codeclimate-url]

# User Manuals
- v1.2.1: [Arizen v1.2.1 Wallet User Manual.pdf](https://github.com/ZencashOfficial/arizen/releases/download/v1.2.1/Arizen.v1.2.1.Wallet.User.Manual.pdf)
- v1.2.0: [Arizen v1.2.0 Wallet User Manual.pdf](https://github.com/ZencashOfficial/arizen/releases/download/v1.2.0/Arizen.v1.2.0.Wallet.User.Manual.pdf)
- v1.1.8: [Arizen v1.1.8 Wallet User Manual.pdf](https://github.com/ZencashOfficial/arizen/releases/download/v1.1.8/Arizen.v1.1.8.Wallet.User.Manual.pdf)
- v1.1.7: [Arizen v1.1.7 Wallet User Manual.pdf](https://github.com/ZencashOfficial/arizen/releases/download/v1.1.7/Arizen.v1.1.7.Wallet.User.Manual.pdf)
Expand All @@ -17,6 +16,12 @@

# Version History

## v1.2.2

- [x] Fix: Add Async to vout array manipulation to improve performance
- [x] Package updates based on results of yarn audit
- [x] Removal of non functional import tool from main application menu

## v1.2.1
- [x] FIX: issue in Batch Split when are more addresses than you can divide into
- [x] Small visual GUI changes
Expand Down
37 changes: 19 additions & 18 deletions app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ const defaultSettings = {
autoLogOffTimeout: 60,
explorerUrl: "https://explorer.horizen.global",
apiUrls: [
"https://explorer.horizen.global/api",
"https://explorer.zen-solutions.io/api"
"https://explorer.horizen.global/api",
"https://explorer.zen-solutions.io/api"
],
secureNodeFQDN: "",
secureNodePort: 18231,
Expand Down Expand Up @@ -441,8 +441,8 @@ function setSettings(newSettings) {
});
}
else {
var apiUrl = settings.apiUrls[0];
console.log("Current API URL: " + apiUrl);
const apiUrl = settings.apiUrls[0];
console.log("Current API URL: " + apiUrl);
axiosApi = axios.create({
baseURL: apiUrl,
timeout: 30000,
Expand Down Expand Up @@ -602,11 +602,23 @@ async function apiGet(url) {
}

async function apiPost(url, form) {
const resp = await axiosApi.post(url, querystring.stringify(form));
const resp = await axiosApi.post(url, querystring.stringify(form));
await sleep(parseFloat(settings.refreshIntervalAPI));
return resp.data;
}

/**
* @param {Set} address
* @param {object[]} originalVout
*/
function getFilteredVout(address, originalVout) {
return new Promise(resolve => {
resolve(originalVout.filter(vout => {
return address.has(vout.scriptPubKey.addresses[0]);
}));
});
}

async function fetchTransactions(txIds, myAddrs) {
const txs = [];
const myAddrSet = new Set(myAddrs);
Expand All @@ -621,6 +633,8 @@ async function fetchTransactions(txIds, myAddrs) {
// Address field in transaction rows is meaningless. Pick something sane.
let firstMyAddr;

info.vout = await getFilteredVout(myAddrSet, info.vout);

for (const vout of info.vout) {
// XXX can it be something else?
if (!vout.scriptPubKey) {
Expand Down Expand Up @@ -987,19 +1001,6 @@ function updateMenuAtLogin() {
}
},
{type: "separator"},
{
label: tr("menu.importEncrypted", "Import ENCRYPTED Arizen wallet"),
click() {
importWalletArizen("awd", true);
}
},
{
label: tr("menu.importUnencrypted", "Import UNENCRYPTED Arizen wallet"),
click() {
importWalletArizen("uawd", false);
}
},
{type: "separator"},
{
label: tr("menu.exportPrivateKeys", "Export private keys"),
click: function () {
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Arizen",
"version": "1.2.1",
"version": "1.2.2",
"description": "Arizen is light API wallet for Horizen with localy stored and encrypted files.",
"main": "app/main.js",
"scripts": {
Expand Down Expand Up @@ -97,7 +97,7 @@
"delay": "^4.1.0",
"electron-debug": "^2.1.0",
"electron-download": "^4.1.1",
"electron-packager": "^13.0.1",
"electron-packager": "^13.1.1",
"electron-tabs": "^0.9.5",
"errors": "^0.3.0",
"fs-extra": "^7.0.1",
Expand All @@ -117,19 +117,19 @@
"devDependencies": {
"ajv": "^6.9.1",
"ajv-keywords": "^3.4.0",
"coveralls": "^3.0.2",
"coveralls": "^3.0.3",
"deepmerge": "^2.2.1",
"devtron": "^1.4.0",
"electron": "^2.0.17",
"electron-builder": "^20.38.5",
"electron-builder-squirrel-windows": "^20.38.5",
"electron-builder": "^20.39.0",
"electron-builder-squirrel-windows": "^20.39.0",
"flow-bin": "^0.80.0",
"json-file-plus": "^3.3.1",
"yargs": "^12.0.5"
},
"optionalDependencies": {
"electron-installer-debian": "^1.1.0",
"electron-installer-debian": "^1.1.1",
"electron-installer-dmg": "^2.0.0",
"electron-installer-windows": "^1.1.0"
"electron-installer-windows": "^1.1.1"
}
}
Loading

0 comments on commit 3c8f518

Please sign in to comment.