Skip to content
This repository was archived by the owner on May 21, 2025. It is now read-only.

Commit fa256d7

Browse files
committed
Merge branch 'develop'
2 parents 0716f83 + 2a73ba1 commit fa256d7

19 files changed

+3155
-2121
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ ppa/metronome-desktop-walle*
3232
.eslintcache
3333

3434
# Certificates
35-
*.p12
35+
*.p12

appveyor.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,5 @@ for:
3434
build_script:
3535
- npm run env
3636
- npm run release
37+
38+
skip_tags: true

package-lock.json

Lines changed: 2975 additions & 2058 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "metronome-desktop-wallet",
3-
"version": "1.3.0",
3+
"version": "1.4.0",
44
"author": {
55
"name": "Autonomous Software",
66
"email": "info@autonomous.sh",
@@ -20,6 +20,7 @@
2020
"env:win32": ".\\scripts\\env.bat",
2121
"env:darwin:linux": "./scripts/env.sh",
2222
"ppa": "./scripts/ppa.sh",
23+
"postinstall": "electron-rebuild",
2324
"prepare": "patch-package",
2425
"release": "npm run dist -- --publish always"
2526
},
@@ -30,24 +31,25 @@
3031
"chalk": "2.4.2",
3132
"credential-plus": "2.0.7",
3233
"credential-plus-pbkdf2": "2.0.4",
33-
"cuid": "2.1.4",
34+
"cuid": "2.1.6",
3435
"dotenv": "5.0.1",
35-
"electron-context-menu": "0.9.1",
36-
"electron-debug": "1.5.0",
37-
"electron-is-dev": "0.3.0",
38-
"electron-log": "3.0.1",
36+
"electron-context-menu": "0.11.0",
37+
"electron-debug": "2.1.0",
38+
"electron-is-dev": "1.0.1",
39+
"electron-log": "3.0.5",
3940
"electron-settings": "3.2.0",
40-
"electron-unhandled": "1.1.0",
41-
"electron-updater": "2.23.3",
41+
"electron-unhandled": "2.1.0",
42+
"electron-updater": "4.0.6",
4243
"electron-window-state": "5.0.3",
43-
"fast-password-entropy": "1.1.0",
44+
"fast-password-entropy": "1.1.1",
4445
"json-stringify-safe": "5.0.1",
4546
"lodash": "4.17.11",
46-
"metronome-contracts": "2.0.0",
47-
"metronome-wallet-core": "2.0.2",
48-
"metronome-wallet-ui-logic": "3.2.0",
47+
"metronome-contracts": "2.4.0",
48+
"metronome-wallet-core": "2.4.3",
49+
"metronome-wallet-ui-logic": "3.5.0",
4950
"nedb": "1.8.0",
5051
"p-timeout": "2.0.1",
52+
"patch-package": "5.1.1",
5153
"qrcode.react": "0.7.2",
5254
"raven": "2.6.4",
5355
"raven-js": "3.27.0",
@@ -68,25 +70,25 @@
6870
"devDependencies": {
6971
"concurrently": "3.6.0",
7072
"devtron": "1.4.0",
71-
"electron": "1.8.8",
72-
"electron-builder": "20.22.0",
73+
"electron": "4.0.5",
74+
"electron-builder": "20.38.5",
7375
"electron-devtools-installer": "2.2.4",
76+
"electron-rebuild": "1.8.4",
7477
"eslint": "5.6.0",
75-
"eslint-config-bloq": "1.3.0",
76-
"eslint-config-prettier": "2.9.0",
78+
"eslint-config-bloq": "2.1.0",
79+
"eslint-config-prettier": "4.1.0",
7780
"eslint-config-standard": "12.0.0",
78-
"eslint-plugin-import": "2.14.0",
79-
"eslint-plugin-jsdoc": "3.15.1",
80-
"eslint-plugin-mocha": "5.2.1",
81+
"eslint-plugin-import": "2.17.2",
82+
"eslint-plugin-jsdoc": "4.8.3",
83+
"eslint-plugin-mocha": "5.3.0",
8184
"eslint-plugin-node": "8.0.1",
82-
"eslint-plugin-prefer-arrow": "1.1.3",
83-
"eslint-plugin-promise": "4.0.1",
85+
"eslint-plugin-prefer-arrow": "1.1.5",
86+
"eslint-plugin-promise": "4.1.1",
87+
"eslint-plugin-require-path-exists": "1.1.9",
8488
"eslint-plugin-standard": "4.0.0",
8589
"expect": "22.4.3",
8690
"husky": "1.3.1",
8791
"lint-staged": "8.1.0",
88-
"merkletreejs": "0.0.20",
89-
"patch-package": "5.1.1",
9092
"prettier": "1.15.3",
9193
"proxyquire": "1.8.0",
9294
"react-testing-library": "1.10.0",
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
patch-package
2+
--- a/node_modules/web3-eth/src/index.js
3+
+++ b/node_modules/web3-eth/src/index.js
4+
@@ -368,6 +368,12 @@ var Eth = function Eth() {
5+
inputFormatter: [formatter.inputLogFormatter],
6+
outputFormatter: formatter.outputLogFormatter
7+
}),
8+
+ new Method({
9+
+ name: 'getChainId',
10+
+ call: 'eth_chainId',
11+
+ params: 0,
12+
+ outputFormatter: utils.hexToNumber
13+
+ }),
14+
15+
// subscriptions
16+
new Subscriptions({
Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,34 @@
11
patch-package
2+
--- a/node_modules/web3-eth-accounts/node_modules/eth-lib/lib/bytes.js
3+
+++ b/node_modules/web3-eth-accounts/node_modules/eth-lib/lib/bytes.js
4+
@@ -6,7 +6,7 @@ var at = function at(bytes, index) {
5+
6+
var random = function random(bytes) {
7+
var rnd = void 0;
8+
- if (typeof window !== "undefined" && window.crypto && window.crypto.getRandomValues) rnd = window.crypto.getRandomValues(new Uint8Array(bytes));else if (typeof require !== "undefined") rnd = require("c" + "rypto").randomBytes(bytes);else throw "Safe random numbers not available.";
9+
+ if (typeof window !== "undefined" && window.crypto && window.crypto.getRandomValues) rnd = window.crypto.getRandomValues(new Uint8Array(bytes));else if (typeof require !== "undefined") rnd = require("crypto").randomBytes(bytes);else throw "Safe random numbers not available.";
10+
var hex = "0x";
11+
for (var i = 0; i < bytes; ++i) {
12+
hex += ("00" + rnd[i].toString(16)).slice(-2);
213
--- a/node_modules/web3-eth-accounts/src/index.js
314
+++ b/node_modules/web3-eth-accounts/src/index.js
4-
@@ -69,7 +69,7 @@ var Accounts = function Accounts() {
15+
@@ -68,8 +68,8 @@ var Accounts = function Accounts() {
16+
517
var _ethereumCall = [
618
new Method({
7-
name: 'getId',
19+
- name: 'getId',
820
- call: 'net_version',
21+
+ name: 'getChainId',
922
+ call: 'eth_chainId',
1023
params: 0,
1124
outputFormatter: utils.hexToNumber
1225
}),
26+
@@ -220,7 +220,7 @@ Accounts.prototype.signTransaction = function signTransaction(tx, privateKey, ca
27+
28+
// Otherwise, get the missing info from the Ethereum Node
29+
return Promise.all([
30+
- isNot(tx.chainId) ? _this._ethereumCall.getId() : tx.chainId,
31+
+ isNot(tx.chainId) ? _this._ethereumCall.getChainId() : tx.chainId,
32+
isNot(tx.gasPrice) ? _this._ethereumCall.getGasPrice() : tx.gasPrice,
33+
isNot(tx.nonce) ? _this._ethereumCall.getTransactionCount(_this.privateKeyToAccount(privateKey).address) : tx.nonce
34+
]).then(function (args) {
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
patch-package
2+
--- a/node_modules/web3-utils/src/index.js
3+
+++ b/node_modules/web3-utils/src/index.js
4+
@@ -225,7 +225,7 @@ var getUnitValue = function (unit) {
5+
*
6+
* @method fromWei
7+
* @param {Number|String} number can be a number, number string or a HEX of a decimal
8+
- * @param {String} unit the unit to convert to, default ether
9+
+ * @param {String} [unit] the unit to convert to, default ether
10+
* @return {String|Object} When given a BN object it returns one as well, otherwise a number
11+
*/
12+
var fromWei = function(number, unit) {
13+
@@ -257,7 +257,7 @@ var fromWei = function(number, unit) {
14+
*
15+
* @method toWei
16+
* @param {Number|String|BN} number can be a number, number string or a HEX of a decimal
17+
- * @param {String} unit the unit to convert from, default ether
18+
+ * @param {String} [unit] the unit to convert from, default ether
19+
* @return {String|Object} When given a BN object it returns one as well, otherwise a number
20+
*/
21+
var toWei = function(number, unit) {
22+
--- a/node_modules/web3-utils/src/utils.js
23+
+++ b/node_modules/web3-utils/src/utils.js
24+
@@ -320,7 +320,7 @@ var hexToBytes = function(hex) {
25+
*
26+
* @method toHex
27+
* @param {String|Number|BN|Object} value
28+
- * @param {Boolean} returnType
29+
+ * @param {Boolean} [returnType]
30+
* @return {String}
31+
*/
32+
var toHex = function (value, returnType) {

public/config/etcMainnet.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
'use strict'
2+
3+
const MetronomeContracts = require('metronome-contracts')
4+
const contracts = MetronomeContracts['classic']
5+
6+
module.exports = {
7+
displayName: 'Ethereum Classic',
8+
chainId: 61,
9+
symbol: 'ETC',
10+
11+
// contracts addresses
12+
tokenPorterAddress: contracts.TokenPorter.address,
13+
converterAddress: contracts.AutonomousConverter.address,
14+
validatorAddress: contracts.Validator.address,
15+
metTokenAddress: contracts.METToken.address,
16+
auctionAddress: contracts.Auctions.address,
17+
18+
// urls
19+
explorerUrl: 'https://blockscout.com/etc/mainnet/tx/{{hash}}/internal_transactions',
20+
indexerUrl: 'https://etc.indexer.metronome.io',
21+
metApiUrl: 'https://etc.api.metronome.io/',
22+
wsApiUrl: 'wss://etc.wallet.metronome.io:8546',
23+
24+
// defauls
25+
coinDefaultGasLimit: '21000',
26+
metDefaultGasLimit: '250000',
27+
defaultGasPrice: '10000000000',
28+
maxGasPrice: '200000000000000000'
29+
}

public/config/etcMordenLocal.js renamed to public/config/etcMorden.js

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
'use strict'
22

33
const MetronomeContracts = require('metronome-contracts')
4-
const contracts = MetronomeContracts.morden
4+
const contracts = MetronomeContracts['morden']
5+
6+
const indexerUrl = process.env.MORDEN_INDEXER_URL || 'http://localhost:3015'
7+
const metApiUrl = process.env.MORDEN_API_URL || 'http://localhost:3012/'
8+
const wsApiUrl = process.env.MORDEN_NODE_URL || 'ws://localhost:8556'
59

610
module.exports = {
7-
displayName: 'Morden (Local)',
8-
chainId: 2,
11+
displayName: 'Morden',
12+
chainId: 62,
913
symbol: 'ETC',
1014

1115
// contracts addresses
@@ -16,10 +20,10 @@ module.exports = {
1620
auctionAddress: contracts.Auctions.address,
1721

1822
// urls
19-
explorerUrl: 'https://mordenexplorer.ethertrack.io/tx/{{hash}}',
20-
indexerUrl: 'http://localhost:3015',
21-
metApiUrl: 'http://localhost:3012/',
22-
wsApiUrl: 'ws://localhost:8556',
23+
explorerUrl: 'https://mordenexplorer.ethernode.io/tx/{{hash}}',
24+
indexerUrl,
25+
metApiUrl,
26+
wsApiUrl,
2327

2428
// defauls
2529
coinDefaultGasLimit: '21000',

public/config/ethMainnet.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict'
22

33
const MetronomeContracts = require('metronome-contracts')
4-
const contracts = MetronomeContracts.mainnet
4+
const contracts = MetronomeContracts['mainnet']
55

66
module.exports = {
77
displayName: 'Ethereum',

0 commit comments

Comments
 (0)