Skip to content

Commit ef96384

Browse files
committed
Minor fixes;
1 parent 8b29300 commit ef96384

File tree

5 files changed

+104
-100
lines changed

5 files changed

+104
-100
lines changed

.jsbeautifyrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"brace_style": "collapse,preserve-inline",
33
"indent_with_tabs": true,
44
"end_with_newline": true,
5-
"keep_array_indentation": true
5+
"keep_array_indentation": true,
6+
"space_after_anon_function": false
67
}

package.json

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,55 @@
11
{
2-
"name": "mom-client",
3-
"version": "0.5.6",
4-
"description": "MOM (My Own Messages) client is a ÐApp to share and notarize messages with Ethereum and IPFS using the MOM standard. You can give voice to your smart contract, send messages to the world, create a certified blog with your ideas, and so on.",
5-
"private": true,
6-
"scripts": {
7-
"test": "echo \"Warning: no test specified\" && exit 0",
8-
"start": "node --inspect node_modules/webpack-dev-server/bin/webpack-dev-server.js --config webpack.dev.js",
9-
"start-paused": "node --inspect --inspect-brk node_modules/webpack-dev-server/bin/webpack-dev-server.js --config webpack.dev.js",
10-
"start-no-inspect": "webpack-dev-server --config webpack.dev.js",
11-
"build": "webpack --config webpack.prod.js"
12-
},
13-
"sideEffects": [
14-
"*.css"
15-
],
16-
"author": "Neurone <bertone.giuseppe@gmail.com>",
17-
"license": "MIT",
18-
"dependencies": {
19-
"@internetofpeers/mom-js": "^1.0.5",
20-
"bootstrap": "^4.6.0",
21-
"easymde": "^2.14.0",
22-
"ethers": "^4.0.48",
23-
"hash.js": "^1.1.7",
24-
"ipfs-http-client": "^49.0.2",
25-
"jquery": "^3.5.1",
26-
"knockout": "^3.5.1",
27-
"lodash": "^4.17.20",
28-
"loglevel": "^1.7.1",
29-
"multihashes": "^4.0.2",
30-
"popper.js": "^1.16.1"
31-
},
32-
"devDependencies": {
33-
"@fortawesome/fontawesome-free": "^5.15.2",
34-
"autoprefixer": "^9.8.6",
35-
"clean-webpack-plugin": "^0.1.19",
36-
"css-loader": "^1.0.1",
37-
"eslint": "^5.16.0",
38-
"eslint-config-google": "^0.10.0",
39-
"exports-loader": "^0.7.0",
40-
"file-loader": "^2.0.0",
41-
"font-awesome": "^4.7.0",
42-
"font-awesome-loader": "^1.0.2",
43-
"html-webpack-plugin": "^3.2.0",
44-
"image-webpack-loader": "^4.6.0",
45-
"node-sass": "^4.13.0",
46-
"postcss-loader": "^3.0.0",
47-
"sass-loader": "^7.3.1",
48-
"style-loader": "^0.23.1",
49-
"url-loader": "^1.1.2",
50-
"webpack": "^4.46.0",
51-
"webpack-cli": "^3.3.12",
52-
"webpack-dev-server": "^3.11.2",
53-
"webpack-merge": "^4.2.2"
54-
}
2+
"name": "mom-client",
3+
"version": "0.5.6",
4+
"description": "MOM (My Own Messages) client is a ÐApp to share and notarize messages with Ethereum and IPFS using the MOM standard. You can give voice to your smart contract, send messages to the world, create a certified blog with your ideas, and so on.",
5+
"private": true,
6+
"scripts": {
7+
"test": "echo \"Warning: no test specified\" && exit 0",
8+
"start": "node --inspect node_modules/webpack-dev-server/bin/webpack-dev-server.js --config webpack.dev.js",
9+
"start-paused": "node --inspect --inspect-brk node_modules/webpack-dev-server/bin/webpack-dev-server.js --config webpack.dev.js",
10+
"start-no-inspect": "webpack-dev-server --config webpack.dev.js",
11+
"build": "webpack --config webpack.prod.js"
12+
},
13+
"sideEffects": [
14+
"*.css"
15+
],
16+
"author": "Neurone <bertone.giuseppe@gmail.com>",
17+
"license": "MIT",
18+
"dependencies": {
19+
"@internetofpeers/mom-js": "^1.0.5",
20+
"bootstrap": "^4.6.0",
21+
"easymde": "^2.14.0",
22+
"ethers": "^4.0.48",
23+
"hash.js": "^1.1.7",
24+
"ipfs-http-client": "^49.0.2",
25+
"jquery": "^3.5.1",
26+
"knockout": "^3.5.1",
27+
"lodash": "^4.17.20",
28+
"loglevel": "^1.7.1",
29+
"multihashes": "^4.0.2",
30+
"popper.js": "^1.16.1"
31+
},
32+
"devDependencies": {
33+
"@fortawesome/fontawesome-free": "^5.15.2",
34+
"autoprefixer": "^9.8.6",
35+
"clean-webpack-plugin": "^0.1.19",
36+
"css-loader": "^1.0.1",
37+
"eslint": "^5.16.0",
38+
"eslint-config-google": "^0.10.0",
39+
"exports-loader": "^0.7.0",
40+
"file-loader": "^2.0.0",
41+
"font-awesome": "^4.7.0",
42+
"font-awesome-loader": "^1.0.2",
43+
"html-webpack-plugin": "^3.2.0",
44+
"image-webpack-loader": "^4.6.0",
45+
"node-sass": "^4.13.0",
46+
"postcss-loader": "^3.0.0",
47+
"sass-loader": "^7.3.1",
48+
"style-loader": "^0.23.1",
49+
"url-loader": "^1.1.2",
50+
"webpack": "^4.46.0",
51+
"webpack-cli": "^3.3.12",
52+
"webpack-dev-server": "^3.11.2",
53+
"webpack-merge": "^4.2.2"
54+
}
5555
}

src/assets/css/editor.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
.messageBox {}
1+
.messageBox {
2+
/* override already defined class */
3+
color: black;
4+
}

src/index.js

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ let updateMessageList = function(changes) {
103103

104104
let initMessageList = function() {
105105
let tempMessageList = [];
106-
// Set array in covenient order
106+
// Set array in convenient order
107107
let operations = model.operationListSorted().sort((left, right) => (left.nonce - right.nonce));
108108
operations.forEach(op => {
109109
// Apply operations
@@ -125,7 +125,7 @@ let initMessageList = function() {
125125
tempMessageList[op.secondCID] = op;
126126
break;
127127
case mom.operations.DELETE:
128-
// deleta a message
128+
// delete a message
129129
delete tempMessageList[op.firstCID];
130130
break;
131131
default:
@@ -162,14 +162,14 @@ let editMessage = async function(cid) {
162162
model.lastEditCID(cid);
163163
editMessageEditor.value(new TextDecoder("utf-8").decode(block.data));
164164
$("#edit-message-tab").tab("show");
165-
setTimeout(refreshEditor, 150); // a bit diry hack, but without it you need to click the editor to see the updated content
165+
setTimeout(refreshEditor, 150); // a bit dirty hack, but without it you need to click the editor to see the updated content
166166
});
167167
};
168168

169169
let fetchMessage = async function(cid) {
170170
await ipfs.block.get(cid).then(function(block) {
171171
editMessageEditor.value(new TextDecoder("utf-8").decode(block.data));
172-
setTimeout(refreshEditor, 150); // a bit diry hack, but without it you need to click the editor to see the updated content
172+
setTimeout(refreshEditor, 150); // a bit dirty hack, but without it you need to click the editor to see the updated content
173173
});
174174
};
175175

@@ -244,7 +244,7 @@ function defaultViewModel() {
244244
publishToIPFS(editMessageEditor.value(), ipfs, successfulUpdate);
245245
};
246246
self.comment = function(message) {
247-
// TODO
247+
//TODO:
248248
log.debug(message);
249249
};
250250
}
@@ -416,8 +416,8 @@ function Operation(operation, firstCID, secondCID, tx) {
416416
*/
417417
let sendAddMessage = function(multihash, provider) {
418418
log.debug(multihash.toString("hex"), multihashes.toB58String(multihash));
419-
let addTransacion = mom.createAddTransaction(model.ethAddress(), Buffer.from(multihash));
420-
sendTransaction(addTransacion, provider);
419+
let addTransaction = mom.createAddTransaction(model.ethAddress(), Buffer.from(multihash));
420+
sendTransaction(addTransaction, provider);
421421
};
422422

423423
/**
@@ -437,8 +437,8 @@ let sendUpdateMessage = function(originalMultihash, updatedMultihash, provider)
437437
*/
438438
let sendDeleteMessage = function(multihash, provider) {
439439
log.debug(multihash.toString("hex"), multihashes.toB58String(multihash));
440-
let deleteTransacion = mom.createDeleteTransaction(model.ethAddress(), Buffer.from(multihash));
441-
sendTransaction(deleteTransacion, provider);
440+
let deleteTransaction = mom.createDeleteTransaction(model.ethAddress(), Buffer.from(multihash));
441+
sendTransaction(deleteTransaction, provider);
442442
};
443443

444444

@@ -587,40 +587,40 @@ window.addEventListener("load", async () => {
587587
/*
588588
Transaction Response
589589
{
590-
// Only available for mined transactions
591-
blockHash: "0x7f20ef60e9f91896b7ebb0962a18b8defb5e9074e62e1b6cde992648fe78794b",
592-
blockNumber: 3346463,
593-
timestamp: 1489440489,
594-
595-
// Exactly one of these will be present (send vs. deploy contract)
596-
// They will always be a properly formatted checksum address
597-
creates: null,
598-
to: "0xc149Be1bcDFa69a94384b46A1F91350E5f81c1AB",
599-
600-
// The transaction hash
601-
hash: "0xf517872f3c466c2e1520e35ad943d833fdca5a6739cfea9e686c4c1b3ab1022e",
602-
603-
// See above "Transaction Requests" for details
604-
data: "0x",
605-
from: "0xEA674fdDe714fd979de3EdF0F56AA9716B898ec8",
606-
gasLimit: utils.bigNumberify("90000"),
607-
gasPrice: utils.bigNumberify("21488430592"),
608-
nonce: 0,
609-
value: utils.parseEther(1.0017071732629267),
610-
611-
// The chain ID; 0 indicates replay-attack vulnerable
612-
// (eg. 1 = Homestead mainnet, 3 = Ropsten testnet)
613-
chainId: 1,
614-
615-
// The signature of the transaction (TestRPC may fail to include these)
616-
r: "0x5b13ef45ce3faf69d1f40f9d15b0070cc9e2c92f3df79ad46d5b3226d7f3d1e8",
617-
s: "0x535236e497c59e3fba93b78e124305c7c9b20db0f8531b015066725e4bb31de6",
618-
v: 37,
619-
620-
// The raw transaction (TestRPC may be missing this)
621-
raw: "0xf87083154262850500cf6e0083015f9094c149be1bcdfa69a94384b46a1f913" +
622-
"50e5f81c1ab880de6c75de74c236c8025a05b13ef45ce3faf69d1f40f9d15b0" +
623-
"070cc9e2c92f3df79ad46d5b3226d7f3d1e8a0535236e497c59e3fba93b78e1" +
624-
"24305c7c9b20db0f8531b015066725e4bb31de6"
590+
// Only available for mined transactions
591+
blockHash: "0x7f20ef60e9f91896b7ebb0962a18b8defb5e9074e62e1b6cde992648fe78794b",
592+
blockNumber: 3346463,
593+
timestamp: 1489440489,
594+
595+
// Exactly one of these will be present (send vs. deploy contract)
596+
// They will always be a properly formatted checksum address
597+
creates: null,
598+
to: "0xc149Be1bcDFa69a94384b46A1F91350E5f81c1AB",
599+
600+
// The transaction hash
601+
hash: "0xf517872f3c466c2e1520e35ad943d833fdca5a6739cfea9e686c4c1b3ab1022e",
602+
603+
// See above "Transaction Requests" for details
604+
data: "0x",
605+
from: "0xEA674fdDe714fd979de3EdF0F56AA9716B898ec8",
606+
gasLimit: utils.bigNumberify("90000"),
607+
gasPrice: utils.bigNumberify("21488430592"),
608+
nonce: 0,
609+
value: utils.parseEther(1.0017071732629267),
610+
611+
// The chain ID; 0 indicates replay-attack vulnerable
612+
// (eg. 1 = Homestead mainnet, 3 = Ropsten testnet)
613+
chainId: 1,
614+
615+
// The signature of the transaction (TestRPC may fail to include these)
616+
r: "0x5b13ef45ce3faf69d1f40f9d15b0070cc9e2c92f3df79ad46d5b3226d7f3d1e8",
617+
s: "0x535236e497c59e3fba93b78e124305c7c9b20db0f8531b015066725e4bb31de6",
618+
v: 37,
619+
620+
// The raw transaction (TestRPC may be missing this)
621+
raw: "0xf87083154262850500cf6e0083015f9094c149be1bcdfa69a94384b46a1f913" +
622+
"50e5f81c1ab880de6c75de74c236c8025a05b13ef45ce3faf69d1f40f9d15b0" +
623+
"070cc9e2c92f3df79ad46d5b3226d7f3d1e8a0535236e497c59e3fba93b78e1" +
624+
"24305c7c9b20db0f8531b015066725e4bb31de6"
625625
}
626626
*/

webpack.common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ module.exports = {
3535
}, {
3636
loader: "postcss-loader", // Run post css actions
3737
options: {
38-
plugins: function () { // post css plugins, can be exported to postcss.config.js
38+
plugins: function() { // post css plugins, can be exported to postcss.config.js
3939
return [
4040
require("autoprefixer")
4141
];

0 commit comments

Comments
 (0)