Skip to content

Commit

Permalink
fix(Methods): Alphabetical order for Functions, Variables and Events ,C…
Browse files Browse the repository at this point in the history
…loses #19
  • Loading branch information
ravidsrk committed Sep 27, 2018
1 parent 4d6d122 commit 346a940
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
26 changes: 21 additions & 5 deletions controllers/contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,26 @@ exports.show = (req, res) => {
return abi.constant;
});
var [events, variables, methods, init] = [
abiGroup.event,
functions[0],
functions[1],
abiGroup.constructor
_.sortBy(abiGroup.event, [
function(o) {
return o.name;
}
]),
_.sortBy(functions[0], [
function(o) {
return o.name;
}
]),
_.sortBy(functions[1], [
function(o) {
return o.name;
}
]),
_.sortBy(abiGroup.constructor, [
function(o) {
return o.name;
}
])
];

return res.render("contracts/show", {
Expand Down Expand Up @@ -148,7 +164,7 @@ exports.showTransaction = (req, res) => {
web3.eth.getBlock(transactionResult.blockNumber),
web3.eth.getTransactionReceipt(hash)
]).then(function(result) {
return res.render("transactions/transaction",{
return res.render("transactions/transaction", {
decodedInput: abiDecoder.decodeMethod(transactionResult.input),
transaction: transactionResult,
transactionBlock: result[0],
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"popper.js": "^1.14.4",
"pug": "^2.0.3",
"request": "^2.88.0",
"typedarray-to-buffer": "^3.1.5",
"validator": "^10.8.0",
"web3": "^1.0.0-beta.36"
},
Expand Down

0 comments on commit 346a940

Please sign in to comment.