Commit 72b96877 authored by Hayden Adams's avatar Hayden Adams

display user balances, minor changes

parent 93ab10c9
...@@ -1267,11 +1267,12 @@ ...@@ -1267,11 +1267,12 @@
"integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=" "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU="
}, },
"bl": { "bl": {
"version": "1.2.1", "version": "1.2.2",
"resolved": "https://registry.npmjs.org/bl/-/bl-1.2.1.tgz", "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz",
"integrity": "sha1-ysMo977kVzDUBLaSID/LWQ4XLV4=", "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==",
"requires": { "requires": {
"readable-stream": "2.3.5" "readable-stream": "2.3.5",
"safe-buffer": "5.1.1"
} }
}, },
"block-stream": { "block-stream": {
...@@ -11408,7 +11409,7 @@ ...@@ -11408,7 +11409,7 @@
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.5.5.tgz", "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.5.5.tgz",
"integrity": "sha512-mQdgLPc/Vjfr3VWqWbfxW8yQNiJCbAZ+Gf6GDu1Cy0bdb33ofyiNGBtAY96jHFhDuivCwgW1H9DgTON+INiXgg==", "integrity": "sha512-mQdgLPc/Vjfr3VWqWbfxW8yQNiJCbAZ+Gf6GDu1Cy0bdb33ofyiNGBtAY96jHFhDuivCwgW1H9DgTON+INiXgg==",
"requires": { "requires": {
"bl": "1.2.1", "bl": "1.2.2",
"end-of-stream": "1.4.1", "end-of-stream": "1.4.1",
"readable-stream": "2.3.5", "readable-stream": "2.3.5",
"xtend": "4.0.1" "xtend": "4.0.1"
...@@ -12159,23 +12160,23 @@ ...@@ -12159,23 +12160,23 @@
} }
}, },
"web3": { "web3": {
"version": "1.0.0-beta.22", "version": "1.0.0-beta.33",
"resolved": "https://registry.npmjs.org/web3/-/web3-1.0.0-beta.22.tgz", "resolved": "https://registry.npmjs.org/web3/-/web3-1.0.0-beta.33.tgz",
"integrity": "sha1-lu7zfn4BfUvu3u/5G6M0Por3qf8=", "integrity": "sha1-xgIbV2mSdyY3HBhLhoRFMRsTkpU=",
"requires": { "requires": {
"web3-bzz": "1.0.0-beta.30", "web3-bzz": "1.0.0-beta.33",
"web3-core": "1.0.0-beta.30", "web3-core": "1.0.0-beta.33",
"web3-eth": "1.0.0-beta.30", "web3-eth": "1.0.0-beta.33",
"web3-eth-personal": "1.0.0-beta.30", "web3-eth-personal": "1.0.0-beta.33",
"web3-net": "1.0.0-beta.30", "web3-net": "1.0.0-beta.33",
"web3-shh": "1.0.0-beta.30", "web3-shh": "1.0.0-beta.33",
"web3-utils": "1.0.0-beta.30" "web3-utils": "1.0.0-beta.33"
} }
}, },
"web3-bzz": { "web3-bzz": {
"version": "1.0.0-beta.30", "version": "1.0.0-beta.33",
"resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.0.0-beta.30.tgz", "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.0.0-beta.33.tgz",
"integrity": "sha1-JDTaGDwjmqqlwBP2IwdCnqkd1wY=", "integrity": "sha1-MVAPaZt+cO31FJDFXv+0J7+7OwE=",
"requires": { "requires": {
"got": "7.1.0", "got": "7.1.0",
"swarm-js": "0.1.37", "swarm-js": "0.1.37",
...@@ -12206,52 +12207,47 @@ ...@@ -12206,52 +12207,47 @@
} }
}, },
"web3-core": { "web3-core": {
"version": "1.0.0-beta.30", "version": "1.0.0-beta.33",
"resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.0.0-beta.30.tgz", "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.0.0-beta.33.tgz",
"integrity": "sha1-919NO4W+dMdnRjeSHD4BO8XSdnk=", "integrity": "sha1-+C7VJfW2auzale7O08rSvWlfeDk=",
"requires": { "requires": {
"web3-core-helpers": "1.0.0-beta.30", "web3-core-helpers": "1.0.0-beta.33",
"web3-core-method": "1.0.0-beta.30", "web3-core-method": "1.0.0-beta.33",
"web3-core-requestmanager": "1.0.0-beta.30", "web3-core-requestmanager": "1.0.0-beta.33",
"web3-utils": "1.0.0-beta.30" "web3-utils": "1.0.0-beta.33"
} }
}, },
"web3-core-helpers": { "web3-core-helpers": {
"version": "1.0.0-beta.30", "version": "1.0.0-beta.33",
"resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.0.0-beta.30.tgz", "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.0.0-beta.33.tgz",
"integrity": "sha1-oADO4/CgnuoT10tXMDNdRjX+Hy8=", "integrity": "sha1-Kvcz5QTbBefDZIwdrPV3sOwV3EM=",
"requires": { "requires": {
"underscore": "1.8.3", "underscore": "1.8.3",
"web3-eth-iban": "1.0.0-beta.30", "web3-eth-iban": "1.0.0-beta.33",
"web3-utils": "1.0.0-beta.30" "web3-utils": "1.0.0-beta.33"
} }
}, },
"web3-core-method": { "web3-core-method": {
"version": "1.0.0-beta.30", "version": "1.0.0-beta.33",
"resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.0.0-beta.30.tgz", "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.0.0-beta.33.tgz",
"integrity": "sha1-jdb/eJ6NFWO4eG0Tp4x/rO+uRxw=", "integrity": "sha1-7Y7ExK+rIdwJid41g2hEZlIrboY=",
"requires": { "requires": {
"underscore": "1.8.3", "underscore": "1.8.3",
"web3-core-helpers": "1.0.0-beta.30", "web3-core-helpers": "1.0.0-beta.33",
"web3-core-promievent": "1.0.0-beta.30", "web3-core-promievent": "1.0.0-beta.33",
"web3-core-subscriptions": "1.0.0-beta.30", "web3-core-subscriptions": "1.0.0-beta.33",
"web3-utils": "1.0.0-beta.30" "web3-utils": "1.0.0-beta.33"
} }
}, },
"web3-core-promievent": { "web3-core-promievent": {
"version": "1.0.0-beta.30", "version": "1.0.0-beta.33",
"resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.0.0-beta.30.tgz", "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.0.0-beta.33.tgz",
"integrity": "sha1-YgUZK/sJdEETIialk57FrtOoopE=", "integrity": "sha1-0fXrtgFSfdSWViw2IXblWNly01g=",
"requires": { "requires": {
"bluebird": "3.3.1", "any-promise": "1.3.0",
"eventemitter3": "1.1.1" "eventemitter3": "1.1.1"
}, },
"dependencies": { "dependencies": {
"bluebird": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.3.1.tgz",
"integrity": "sha1-+Xrhlw9B2FF3KDBT6aEgFg5mxh0="
},
"eventemitter3": { "eventemitter3": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-1.1.1.tgz", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-1.1.1.tgz",
...@@ -12260,25 +12256,25 @@ ...@@ -12260,25 +12256,25 @@
} }
}, },
"web3-core-requestmanager": { "web3-core-requestmanager": {
"version": "1.0.0-beta.30", "version": "1.0.0-beta.33",
"resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.0.0-beta.30.tgz", "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.0.0-beta.33.tgz",
"integrity": "sha1-buVvuKbLhf0BswgIVPUNZOUiQMY=", "integrity": "sha1-ejbEA1QALfsXnKLb22pgEsn3Ges=",
"requires": { "requires": {
"underscore": "1.8.3", "underscore": "1.8.3",
"web3-core-helpers": "1.0.0-beta.30", "web3-core-helpers": "1.0.0-beta.33",
"web3-providers-http": "1.0.0-beta.30", "web3-providers-http": "1.0.0-beta.33",
"web3-providers-ipc": "1.0.0-beta.30", "web3-providers-ipc": "1.0.0-beta.33",
"web3-providers-ws": "1.0.0-beta.30" "web3-providers-ws": "1.0.0-beta.33"
} }
}, },
"web3-core-subscriptions": { "web3-core-subscriptions": {
"version": "1.0.0-beta.30", "version": "1.0.0-beta.33",
"resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.0.0-beta.30.tgz", "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.0.0-beta.33.tgz",
"integrity": "sha1-MWUsdTVsP2floZzRS40xS61OISc=", "integrity": "sha1-YCh1yfTV9NDhYhRitfwewZs1veM=",
"requires": { "requires": {
"eventemitter3": "1.1.1", "eventemitter3": "1.1.1",
"underscore": "1.8.3", "underscore": "1.8.3",
"web3-core-helpers": "1.0.0-beta.30" "web3-core-helpers": "1.0.0-beta.33"
}, },
"dependencies": { "dependencies": {
"eventemitter3": { "eventemitter3": {
...@@ -12289,33 +12285,33 @@ ...@@ -12289,33 +12285,33 @@
} }
}, },
"web3-eth": { "web3-eth": {
"version": "1.0.0-beta.30", "version": "1.0.0-beta.33",
"resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.0.0-beta.30.tgz", "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.0.0-beta.33.tgz",
"integrity": "sha1-ApsV4Uy2CLnP4CYDtQTWUYcPBQE=", "integrity": "sha1-hKn5TallUnyS2DitTlcN8CWJhJ8=",
"requires": { "requires": {
"underscore": "1.8.3", "underscore": "1.8.3",
"web3-core": "1.0.0-beta.30", "web3-core": "1.0.0-beta.33",
"web3-core-helpers": "1.0.0-beta.30", "web3-core-helpers": "1.0.0-beta.33",
"web3-core-method": "1.0.0-beta.30", "web3-core-method": "1.0.0-beta.33",
"web3-core-subscriptions": "1.0.0-beta.30", "web3-core-subscriptions": "1.0.0-beta.33",
"web3-eth-abi": "1.0.0-beta.30", "web3-eth-abi": "1.0.0-beta.33",
"web3-eth-accounts": "1.0.0-beta.30", "web3-eth-accounts": "1.0.0-beta.33",
"web3-eth-contract": "1.0.0-beta.30", "web3-eth-contract": "1.0.0-beta.33",
"web3-eth-iban": "1.0.0-beta.30", "web3-eth-iban": "1.0.0-beta.33",
"web3-eth-personal": "1.0.0-beta.30", "web3-eth-personal": "1.0.0-beta.33",
"web3-net": "1.0.0-beta.30", "web3-net": "1.0.0-beta.33",
"web3-utils": "1.0.0-beta.30" "web3-utils": "1.0.0-beta.33"
} }
}, },
"web3-eth-abi": { "web3-eth-abi": {
"version": "1.0.0-beta.30", "version": "1.0.0-beta.33",
"resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.0.0-beta.30.tgz", "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.0.0-beta.33.tgz",
"integrity": "sha1-bqUsmZqFBbR8L4i6YdKmgKEGZAk=", "integrity": "sha1-IiH3FRZDZgAypN80D2EjSRaMgko=",
"requires": { "requires": {
"bn.js": "4.11.6", "bn.js": "4.11.6",
"underscore": "1.8.3", "underscore": "1.8.3",
"web3-core-helpers": "1.0.0-beta.30", "web3-core-helpers": "1.0.0-beta.33",
"web3-utils": "1.0.0-beta.30" "web3-utils": "1.0.0-beta.33"
}, },
"dependencies": { "dependencies": {
"bn.js": { "bn.js": {
...@@ -12326,27 +12322,22 @@ ...@@ -12326,27 +12322,22 @@
} }
}, },
"web3-eth-accounts": { "web3-eth-accounts": {
"version": "1.0.0-beta.30", "version": "1.0.0-beta.33",
"resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.0.0-beta.30.tgz", "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.0.0-beta.33.tgz",
"integrity": "sha1-jwobNCxCg4EjciQqbi3yaIh7O3A=", "integrity": "sha1-JajX9OWOHpk7kvBpVILMzckhL5E=",
"requires": { "requires": {
"bluebird": "3.3.1", "any-promise": "1.3.0",
"crypto-browserify": "3.12.0", "crypto-browserify": "3.12.0",
"eth-lib": "0.2.7", "eth-lib": "0.2.7",
"scrypt.js": "0.2.0", "scrypt.js": "0.2.0",
"underscore": "1.8.3", "underscore": "1.8.3",
"uuid": "2.0.1", "uuid": "2.0.1",
"web3-core": "1.0.0-beta.30", "web3-core": "1.0.0-beta.33",
"web3-core-helpers": "1.0.0-beta.30", "web3-core-helpers": "1.0.0-beta.33",
"web3-core-method": "1.0.0-beta.30", "web3-core-method": "1.0.0-beta.33",
"web3-utils": "1.0.0-beta.30" "web3-utils": "1.0.0-beta.33"
}, },
"dependencies": { "dependencies": {
"bluebird": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.3.1.tgz",
"integrity": "sha1-+Xrhlw9B2FF3KDBT6aEgFg5mxh0="
},
"eth-lib": { "eth-lib": {
"version": "0.2.7", "version": "0.2.7",
"resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz",
...@@ -12365,95 +12356,121 @@ ...@@ -12365,95 +12356,121 @@
} }
}, },
"web3-eth-contract": { "web3-eth-contract": {
"version": "1.0.0-beta.30", "version": "1.0.0-beta.33",
"resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.0.0-beta.30.tgz", "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.0.0-beta.33.tgz",
"integrity": "sha1-1+uiOFCE3/PHWqxII1ryyNLWolg=", "integrity": "sha1-nlkZ8pF6PGe0+2Vp1JxeMDiSW84=",
"requires": { "requires": {
"underscore": "1.8.3", "underscore": "1.8.3",
"web3-core": "1.0.0-beta.30", "web3-core": "1.0.0-beta.33",
"web3-core-helpers": "1.0.0-beta.30", "web3-core-helpers": "1.0.0-beta.33",
"web3-core-method": "1.0.0-beta.30", "web3-core-method": "1.0.0-beta.33",
"web3-core-promievent": "1.0.0-beta.30", "web3-core-promievent": "1.0.0-beta.33",
"web3-core-subscriptions": "1.0.0-beta.30", "web3-core-subscriptions": "1.0.0-beta.33",
"web3-eth-abi": "1.0.0-beta.30", "web3-eth-abi": "1.0.0-beta.33",
"web3-utils": "1.0.0-beta.30" "web3-utils": "1.0.0-beta.33"
} }
}, },
"web3-eth-iban": { "web3-eth-iban": {
"version": "1.0.0-beta.30", "version": "1.0.0-beta.33",
"resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.0.0-beta.30.tgz", "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.0.0-beta.33.tgz",
"integrity": "sha1-OwgKXE2h+jdHexfkyQB4G5IVBkU=", "integrity": "sha1-HXPQxSiKRWWxdUp1tfs+oLd6Uy8=",
"requires": { "requires": {
"bn.js": "4.11.8", "bn.js": "4.11.6",
"web3-utils": "1.0.0-beta.30" "web3-utils": "1.0.0-beta.33"
},
"dependencies": {
"bn.js": {
"version": "4.11.6",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz",
"integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU="
}
} }
}, },
"web3-eth-personal": { "web3-eth-personal": {
"version": "1.0.0-beta.30", "version": "1.0.0-beta.33",
"resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.0.0-beta.30.tgz", "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.0.0-beta.33.tgz",
"integrity": "sha1-i9TvQLO1+EHdOouXhz2dx5HK90g=", "integrity": "sha1-tOSFh8xOfrAY2ib947Tzul+bmO8=",
"requires": { "requires": {
"web3-core": "1.0.0-beta.30", "web3-core": "1.0.0-beta.33",
"web3-core-helpers": "1.0.0-beta.30", "web3-core-helpers": "1.0.0-beta.33",
"web3-core-method": "1.0.0-beta.30", "web3-core-method": "1.0.0-beta.33",
"web3-net": "1.0.0-beta.30", "web3-net": "1.0.0-beta.33",
"web3-utils": "1.0.0-beta.30" "web3-utils": "1.0.0-beta.33"
} }
}, },
"web3-net": { "web3-net": {
"version": "1.0.0-beta.30", "version": "1.0.0-beta.33",
"resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.0.0-beta.30.tgz", "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.0.0-beta.33.tgz",
"integrity": "sha1-CjUu3ilubUt/iLZ6pHTklwPec78=", "integrity": "sha1-tskNGg4WJuquiz2SKsFTZy/VZEU=",
"requires": { "requires": {
"web3-core": "1.0.0-beta.30", "web3-core": "1.0.0-beta.33",
"web3-core-method": "1.0.0-beta.30", "web3-core-method": "1.0.0-beta.33",
"web3-utils": "1.0.0-beta.30" "web3-utils": "1.0.0-beta.33"
} }
}, },
"web3-providers-http": { "web3-providers-http": {
"version": "1.0.0-beta.30", "version": "1.0.0-beta.33",
"resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.0.0-beta.30.tgz", "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.0.0-beta.33.tgz",
"integrity": "sha1-zajZEzxvMdGoEtxaQq8Ay+qYzYY=", "integrity": "sha1-OzWuAO599blrSTSWKtSobypVmcE=",
"requires": { "requires": {
"web3-core-helpers": "1.0.0-beta.30", "web3-core-helpers": "1.0.0-beta.33",
"xhr2": "0.1.4" "xhr2": "0.1.4"
} }
}, },
"web3-providers-ipc": { "web3-providers-ipc": {
"version": "1.0.0-beta.30", "version": "1.0.0-beta.33",
"resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.0.0-beta.30.tgz", "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.0.0-beta.33.tgz",
"integrity": "sha1-7i2NGKPxILd3BEpW5n4K7iCFRYc=", "integrity": "sha1-Twrcmv6dEsBm5L5cPFNvUHPLB8Y=",
"requires": { "requires": {
"oboe": "2.1.3", "oboe": "2.1.3",
"underscore": "1.8.3", "underscore": "1.8.3",
"web3-core-helpers": "1.0.0-beta.30" "web3-core-helpers": "1.0.0-beta.33"
} }
}, },
"web3-providers-ws": { "web3-providers-ws": {
"version": "1.0.0-beta.30", "version": "1.0.0-beta.33",
"resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.0.0-beta.30.tgz", "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.0.0-beta.33.tgz",
"integrity": "sha1-muaanq2Kh2H4Y3n6NHttta5EsS0=", "integrity": "sha1-j93qQuGbvyUh7IeVRkV6Yjqdye8=",
"requires": { "requires": {
"underscore": "1.8.3", "underscore": "1.8.3",
"web3-core-helpers": "1.0.0-beta.30", "web3-core-helpers": "1.0.0-beta.33",
"websocket": "git://github.com/frozeman/WebSocket-Node.git#7004c39c42ac98875ab61126e5b4a925430f592c" "websocket": "git://github.com/frozeman/WebSocket-Node.git#7004c39c42ac98875ab61126e5b4a925430f592c"
},
"dependencies": {
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"requires": {
"ms": "2.0.0"
}
},
"websocket": {
"version": "git://github.com/frozeman/WebSocket-Node.git#7004c39c42ac98875ab61126e5b4a925430f592c",
"requires": {
"debug": "2.6.9",
"nan": "2.9.2",
"typedarray-to-buffer": "3.1.2",
"yaeti": "0.0.6"
}
}
} }
}, },
"web3-shh": { "web3-shh": {
"version": "1.0.0-beta.30", "version": "1.0.0-beta.33",
"resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.0.0-beta.30.tgz", "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.0.0-beta.33.tgz",
"integrity": "sha1-K/4yINlY/0ylkgF3kIUrxXt7DKc=", "integrity": "sha1-+Z4mVz9uCZMhrw2fK/z+Pe01UKE=",
"requires": { "requires": {
"web3-core": "1.0.0-beta.30", "web3-core": "1.0.0-beta.33",
"web3-core-method": "1.0.0-beta.30", "web3-core-method": "1.0.0-beta.33",
"web3-core-subscriptions": "1.0.0-beta.30", "web3-core-subscriptions": "1.0.0-beta.33",
"web3-net": "1.0.0-beta.30" "web3-net": "1.0.0-beta.33"
} }
}, },
"web3-utils": { "web3-utils": {
"version": "1.0.0-beta.30", "version": "1.0.0-beta.33",
"resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.0.0-beta.30.tgz", "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.0.0-beta.33.tgz",
"integrity": "sha1-6uQIzI1tb+zI1Ql8/q1Rdz8jH/k=", "integrity": "sha1-4JG3mU8JtxSwGYpAV9OtLrjL4jg=",
"requires": { "requires": {
"bn.js": "4.11.6", "bn.js": "4.11.6",
"eth-lib": "0.1.27", "eth-lib": "0.1.27",
...@@ -12866,25 +12883,6 @@ ...@@ -12866,25 +12883,6 @@
"source-map": "0.6.1" "source-map": "0.6.1"
} }
}, },
"websocket": {
"version": "git://github.com/frozeman/WebSocket-Node.git#7004c39c42ac98875ab61126e5b4a925430f592c",
"requires": {
"debug": "2.6.9",
"nan": "2.9.2",
"typedarray-to-buffer": "3.1.2",
"yaeti": "0.0.6"
},
"dependencies": {
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"requires": {
"ms": "2.0.0"
}
}
}
},
"websocket-driver": { "websocket-driver": {
"version": "0.7.0", "version": "0.7.0",
"resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz", "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz",
...@@ -13058,7 +13056,7 @@ ...@@ -13058,7 +13056,7 @@
"requires": { "requires": {
"buffer-to-arraybuffer": "0.0.5", "buffer-to-arraybuffer": "0.0.5",
"object-assign": "4.1.1", "object-assign": "4.1.1",
"query-string": "5.1.0", "query-string": "5.1.1",
"simple-get": "2.7.0", "simple-get": "2.7.0",
"timed-out": "4.0.1", "timed-out": "4.0.1",
"url-set-query": "1.0.0", "url-set-query": "1.0.0",
...@@ -13066,9 +13064,9 @@ ...@@ -13066,9 +13064,9 @@
}, },
"dependencies": { "dependencies": {
"query-string": { "query-string": {
"version": "5.1.0", "version": "5.1.1",
"resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.0.tgz", "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz",
"integrity": "sha512-F3DkxxlY0AqD/rwe4YAwjRE2HjOkKW7TxsuteyrS/Jbwrxw887PqYBL4sWUJ9D/V1hmFns0SCD6FDyvlwo9RCQ==", "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==",
"requires": { "requires": {
"decode-uri-component": "0.2.0", "decode-uri-component": "0.2.0",
"object-assign": "4.1.1", "object-assign": "4.1.1",
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
"redux": "^3.7.2", "redux": "^3.7.2",
"redux-subscriber": "^1.1.0", "redux-subscriber": "^1.1.0",
"redux-thunk": "^2.2.0", "redux-thunk": "^2.2.0",
"web3": "1.0.0-beta.22" "web3": "1.0.0-beta.33"
}, },
"scripts": { "scripts": {
"start": "react-scripts start", "start": "react-scripts start",
......
...@@ -52,7 +52,7 @@ class App extends Component { ...@@ -52,7 +52,7 @@ class App extends Component {
// TODO: get rid of redundant localweb3 === 'undefined' checks in componentWill/DidMount // TODO: get rid of redundant localweb3 === 'undefined' checks in componentWill/DidMount
// STATUS: kind of done // STATUS: kind of done
componentWillMount() { componentWillMount() {
console.log('props', this.props); //console.log('props', this.props);
if(localweb3 === 'undefined') { if(localweb3 === 'undefined') {
this.props.setWeb3ConnectionStatus(false); this.props.setWeb3ConnectionStatus(false);
} else { } else {
...@@ -73,7 +73,7 @@ class App extends Component { ...@@ -73,7 +73,7 @@ class App extends Component {
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
const web3Subscriber = subscribe('web3Store.connected', state => { const web3Subscriber = subscribe('web3Store.connected', state => {
if(state.web3Store.connected === true && !state.web3Store.metamaskLocked) { if(state.web3Store.connected === true && !state.web3Store.metamaskLocked) {
console.log('successfully connected to metamask', state.web3Store.currentMaskAddress); //console.log('successfully connected to metamask', state.web3Store.currentMaskAddress);
this.marketInterval = setInterval(this.getMarketInfo, 15000); this.marketInterval = setInterval(this.getMarketInfo, 15000);
this.accountInterval = setInterval(this.getAccountInfo, 15000); this.accountInterval = setInterval(this.getAccountInfo, 15000);
this.userInterval = setInterval(this.getUserAddress, 500); this.userInterval = setInterval(this.getUserAddress, 500);
...@@ -128,6 +128,10 @@ class App extends Component { ...@@ -128,6 +128,10 @@ class App extends Component {
// could possibly use refactoring // could possibly use refactoring
getContracts = () => { getContracts = () => {
const factoryAddress = this.props.web3Store.factoryAddress;
const factoryContract = new localweb3.eth.Contract(factoryABI, factoryAddress);
this.props.factoryContractReady(factoryContract);
this.props.web3Store.exchangeAddresses.addresses.map(async exchangeAddress => { this.props.web3Store.exchangeAddresses.addresses.map(async exchangeAddress => {
// receive the exchange address, create the exchange contract // receive the exchange address, create the exchange contract
let exchangeContract = await new localweb3.eth.Contract(exchangeABI, exchangeAddress[1]); let exchangeContract = await new localweb3.eth.Contract(exchangeABI, exchangeAddress[1]);
...@@ -142,11 +146,6 @@ class App extends Component { ...@@ -142,11 +146,6 @@ class App extends Component {
await this.props.tokenContractReady(tokenAddress[0], tokenContract); await this.props.tokenContractReady(tokenAddress[0], tokenContract);
}) })
// happens only once
const factoryAddress = this.props.web3Store.factoryAddress;
const factoryContract = new localweb3.eth.Contract(factoryABI, factoryAddress);
this.props.factoryContractReady(factoryContract);
// this.getAccountInfo(); // this.getAccountInfo();
// this.getMarketInfo(); // this.getMarketInfo();
} }
...@@ -212,9 +211,18 @@ class App extends Component { ...@@ -212,9 +211,18 @@ class App extends Component {
this.getTokenBalance('output'); this.getTokenBalance('output');
this.getAllowance(); this.getAllowance();
break; break;
case 'ETH to ETH':
this.getEthBalance('input');
this.getEthBalance('output');
break;
case 'Token to itself':
this.getTokenBalance('input');
this.getTokenBalance('output');
this.getAllowance();
break;
default: default:
} }
console.log("Getting account info"); // console.log("Getting account info");
} }
getExchangeState = (type) => { getExchangeState = (type) => {
...@@ -321,11 +329,26 @@ class App extends Component { ...@@ -321,11 +329,26 @@ class App extends Component {
} }
tokenToExchangeFactoryLookup = (tokenAddress) => { tokenToExchangeFactoryLookup = (tokenAddress) => {
this.props.web3Store.factoryContract.methods.tokenToExchangeLookup(tokenAddress).call((error, exchangeAddress) => { console.log('looking up exchange for token: ', tokenAddress)
console.log(exchangeAddress) this.props.web3Store.factoryContract.methods.tokenToExchangeLookup(tokenAddress).call().then((result, error) => {
if(error) {
console.log(error);
} else {
console.log('exchange address: ', result);
}
}); });
} }
launchExchange = (tokenAddress) => {
this.props.web3Store.factoryContract.methods.launchExchange(tokenAddress).send({from: this.props.web3Store.currentMaskAddress})
.on('transactionHash', console.log('Transaction Hash created'))
.on('receipt', (receipt) => {
console.log(receipt)
}) //Transaction Submitted to blockchain
.on('confirmation', (confirmationNumber, receipt) => {console.log("Block Confirmations: " + confirmationNumber)}) //Transaction Mined
.on('error', console.error);
}
onCloseHelper = () => { onCloseHelper = () => {
if(this.props.exchange.outputToken.value === 'UNI'){ if(this.props.exchange.outputToken.value === 'UNI'){
this.setState({ uniAdded: true }) // cookie stuff this.setState({ uniAdded: true }) // cookie stuff
......
...@@ -39,7 +39,7 @@ class Exchange extends Component { ...@@ -39,7 +39,7 @@ class Exchange extends Component {
var inputValue = this.props.exchange.inputValue; var inputValue = this.props.exchange.inputValue;
console.log(inputValue, 'from setExchangeOutput') console.log(inputValue, 'from setExchangeOutput')
console.log('outputToken', this.props.exchange.outputToken); console.log('outputToken', this.props.exchange.outputToken);
if (this.props.web3Store.exchangeType === 'Invalid'){ if (this.props.web3Store.exchangeType === 'ETH to ETH' || this.props.web3Store.exchangeType === 'Token to itself'){
this.props.setExchangeOutputValue(0); this.props.setExchangeOutputValue(0);
this.props.setInteractionState('error1'); this.props.setInteractionState('error1');
} else if(inputValue && inputValue !== 0 && inputValue !== '0'){ } else if(inputValue && inputValue !== 0 && inputValue !== '0'){
...@@ -55,9 +55,11 @@ class Exchange extends Component { ...@@ -55,9 +55,11 @@ class Exchange extends Component {
// TODO: change this to use the redux-subscribe pattern // TODO: change this to use the redux-subscribe pattern
getMarketType = () => { getMarketType = () => {
var marketType = ''; var marketType = '';
if (this.props.exchange.inputToken.value === this.props.exchange.outputToken.value) { if (this.props.exchange.inputToken.value === 'ETH' && this.props.exchange.outputToken.value === 'ETH') {
marketType = 'Invalid'; marketType = 'ETH to ETH';
this.props.setInteractionState('error1'); this.props.setInteractionState('error1');
} else if (this.props.exchange.inputToken.value === this.props.exchange.outputToken.value){
marketType = 'Token to itself';
} else if (this.props.exchange.inputToken.value === 'ETH'){ } else if (this.props.exchange.inputToken.value === 'ETH'){
marketType = 'ETH to Token'; marketType = 'ETH to Token';
} else if (this.props.exchange.outputToken.value === 'ETH'){ } else if (this.props.exchange.outputToken.value === 'ETH'){
......
...@@ -9,7 +9,7 @@ class NetworkStatus extends Component { ...@@ -9,7 +9,7 @@ class NetworkStatus extends Component {
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
const interactionStateSubscriber = subscribe('web3Store.currentMaskAddress', state => { const interactionStateSubscriber = subscribe('web3Store.currentMaskAddress', state => {
if (state.web3Store.currentMaskAddress !== undefined) { if (state.web3Store.currentMaskAddress !== undefined) {
console.log('METAMASK UNLOCKED FROM NETWORK STATUS') // console.log('METAMASK UNLOCKED FROM NETWORK STATUS')
this.checkNetwork(); this.checkNetwork();
} else { console.log('METAMASK LOCKED FROM NETWORK STATUS') } } else { console.log('METAMASK LOCKED FROM NETWORK STATUS') }
}) })
...@@ -31,6 +31,8 @@ class NetworkStatus extends Component { ...@@ -31,6 +31,8 @@ class NetworkStatus extends Component {
return ( return (
<div className="connection border pa2 green"> <div className="connection border pa2 green">
<a target="_blank" rel="noopener noreferrer" href={'https://rinkeby.etherscan.io/search?q=' + this.props.web3Store.currentMaskAddress}>{this.props.web3Store.currentMaskAddress}</a> <a target="_blank" rel="noopener noreferrer" href={'https://rinkeby.etherscan.io/search?q=' + this.props.web3Store.currentMaskAddress}>{this.props.web3Store.currentMaskAddress}</a>
<p>{this.props.exchange.inputToken.value + ": " + (this.props.exchange.inputBalance/10**18).toFixed(2)}</p>
<p>{this.props.exchange.outputToken.value + ": " + (this.props.exchange.outputBalance/10**18).toFixed(2)}</p>
<p></p> <p></p>
</div> </div>
) )
......
...@@ -18,8 +18,8 @@ class Purchase extends Component { ...@@ -18,8 +18,8 @@ class Purchase extends Component {
ethToTokenPurchase = () => { ethToTokenPurchase = () => {
var exchange = this.props.symbolToExchangeContract(this.props.exchange.outputToken.value); var exchange = this.props.symbolToExchangeContract(this.props.exchange.outputToken.value);
var minTokens = (this.props.exchange.outputValue/10**18).toString(); var minTokens = this.props.exchange.outputValue.toString();
var minTokensInt = this.props.web3Store.web3.utils.toWei(minTokens); var minTokensInt = parseInt(minTokens, 10).toString();
var ethSold = this.props.exchange.inputValue; var ethSold = this.props.exchange.inputValue;
var weiSold = this.props.web3Store.web3.utils.toWei(ethSold); var weiSold = this.props.web3Store.web3.utils.toWei(ethSold);
var timeout = this.props.web3Store.blockTimestamp + 300; //current block time + 5mins var timeout = this.props.web3Store.blockTimestamp + 300; //current block time + 5mins
...@@ -42,19 +42,20 @@ class Purchase extends Component { ...@@ -42,19 +42,20 @@ class Purchase extends Component {
console.log(receipt) console.log(receipt)
}) //Transaction Submitted to blockchain }) //Transaction Submitted to blockchain
.on('confirmation', (confirmationNumber, receipt) => { .on('confirmation', (confirmationNumber, receipt) => {
console.log("Block Confirmations: " + confirmationNumber) console.log("Block Confirmations: " + confirmationNumber);
if(confirmationNumber === 1) { // if(confirmationNumber === 1) {
this.getAccountInfo(); // this.getAccountInfo();
} // }
}) //Transaction Mined }) //Transaction Mined
.on('error', console.error); .on('error', console.error);
} }
tokenToEthPurchase = () => { tokenToEthPurchase = () => {
var exchange = this.props.symbolToExchangeContract(this.props.exchange.inputToken.value); var exchange = this.props.symbolToExchangeContract(this.props.exchange.inputToken.value);
var minEth = (this.props.exchange.outputValue/10**18).toString(); var minEth = this.props.exchange.outputValue.toString();
var minEthInt = this.props.web3Store.web3.utils.toWei(minEth); var minEthInt = parseInt(minEth, 10).toString();
var tokensSold = this.props.exchange.inputValue; var tokensSold = this.props.exchange.inputValue;
// toWei needs to be replaced with *decimals
var tokensSoldInt = this.props.web3Store.web3.utils.toWei(tokensSold); var tokensSoldInt = this.props.web3Store.web3.utils.toWei(tokensSold);
var timeout = this.props.web3Store.blockTimestamp + 300; //current block time + 5mins var timeout = this.props.web3Store.blockTimestamp + 300; //current block time + 5mins
...@@ -77,15 +78,15 @@ class Purchase extends Component { ...@@ -77,15 +78,15 @@ class Purchase extends Component {
tokenToTokenPurchase = () => { tokenToTokenPurchase = () => {
var exchange = this.props.symbolToExchangeContract(this.props.exchange.inputToken.value); var exchange = this.props.symbolToExchangeContract(this.props.exchange.inputToken.value);
var tokenOutAddress = this.props.symbolToTokenAddress(this.props.exchange.outputToken.value); var tokenOutAddress = this.props.symbolToTokenAddress(this.props.exchange.outputToken.value);
var minTokens = (this.props.exchange.outputValue/10**18).toString(); var minTokens = this.props.exchange.outputValue.toString();
var minTokensInt = this.props.web3Store.web3.utils.toWei(minTokens); var minTokensInt = parseInt(minTokens, 10).toString();
var tokensSold = this.props.exchange.inputValue; var tokensSold = this.props.exchange.inputValue;
var tokensSoldInt = this.props.web3Store.web3.utils.toWei(tokensSold); var tokensSoldInt = this.props.web3Store.web3.utils.toWei(tokensSold);
var timeout = this.props.web3Store.blockTimestamp + 300; //current block time + 5mins var timeout = this.props.web3Store.blockTimestamp + 300; //current block time + 5mins
console.log('tokenOutAddress', tokenOutAddress); // console.log('tokenOutAddress', tokenOutAddress);
console.log('minTokensInt', minTokensInt); // console.log('minTokensInt', minTokensInt);
console.log('tokensSoldInt', tokensSoldInt); // console.log('tokensSoldInt', tokensSoldInt);
console.log('timeout', timeout); // console.log('timeout', timeout);
exchange.methods.tokenToTokenSwap(tokenOutAddress, tokensSoldInt, minTokensInt, timeout).send({from: this.props.web3Store.currentMaskAddress}) exchange.methods.tokenToTokenSwap(tokenOutAddress, tokensSoldInt, minTokensInt, timeout).send({from: this.props.web3Store.currentMaskAddress})
.on('transactionHash', (result) => { .on('transactionHash', (result) => {
......
module.exports.factoryABI = module.exports.factoryABI =
[{"constant":true,"inputs":[],"name":"getExchangeCount","outputs":[{"name":"exchangeCount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"}],"name":"launchExchange","outputs":[{"name":"exchange","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"tokenList","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_token","type":"address"}],"name":"tokenToExchangeLookup","outputs":[{"name":"exchange","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_exchange","type":"address"}],"name":"exchangeToTokenLookup","outputs":[{"name":"token","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"exchange","type":"address"},{"indexed":true,"name":"token","type":"address"}],"name":"ExchangeLaunch","type":"event"}] [
{
"constant": true,
"inputs": [],
"name": "getExchangeCount",
"outputs": [
{
"name": "exchangeCount",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_token",
"type": "address"
}
],
"name": "launchExchange",
"outputs": [
{
"name": "exchange",
"type": "address"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "uint256"
}
],
"name": "tokenList",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_token",
"type": "address"
}
],
"name": "tokenToExchangeLookup",
"outputs": [
{
"name": "exchange",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_exchange",
"type": "address"
}
],
"name": "exchangeToTokenLookup",
"outputs": [
{
"name": "token",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "exchange",
"type": "address"
},
{
"indexed": true,
"name": "token",
"type": "address"
}
],
"name": "ExchangeLaunch",
"type": "event"
}
]
...@@ -7,7 +7,7 @@ export default { ...@@ -7,7 +7,7 @@ export default {
metamaskLocked: true, metamaskLocked: true,
interaction: '', interaction: '',
networkMessage: '', networkMessage: '',
factoryAddress: '0xD6D22d102A4237F3D35361BC022a78789E6174Aa', factoryAddress: '0x1dCcdeD9c35C0dd22dfC644BC17011Eb8e61ad91',
factoryContract: '', factoryContract: '',
blockTimestamp: '', blockTimestamp: '',
exchangeType: 'ETH to Token', exchangeType: 'ETH to Token',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment