Skip to content

Commit

Permalink
Fixed eth wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardonunesp committed Aug 31, 2018
1 parent 9f8d994 commit 8b5e136
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion truffle-ethereum/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"ganache-cli:dev": "scripts/ganache-cli.sh"
},
"dependencies": {
"ganache-cli": "^6.1.6",
"ganache-cli": "^6.1.8",
"loom-truffle-provider": "^0.5.0",
"openzeppelin-solidity": "1.10.0",
"truffle": "^4.1.13",
Expand Down
6 changes: 3 additions & 3 deletions truffle-ethereum/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1778,9 +1778,9 @@ functional-red-black-tree@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"

ganache-cli@^6.1.6:
version "6.1.6"
resolved "https://registry.yarnpkg.com/ganache-cli/-/ganache-cli-6.1.6.tgz#99b500a25f571271a6978ef3f9c9c53e1a3854f0"
ganache-cli@^6.1.8:
version "6.1.8"
resolved "https://registry.yarnpkg.com/ganache-cli/-/ganache-cli-6.1.8.tgz#49a8a331683a9652183f82ef1378d17e1814fcd3"
dependencies:
source-map-support "^0.5.3"

Expand Down
2 changes: 1 addition & 1 deletion webclient/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
<script src="/bundle.js"></script>
</body>

</html>
</html>
4 changes: 3 additions & 1 deletion webclient/src/components/gateway_tokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ export default class GatewayTokens extends React.Component {
const tokenOwner = data.tokenOwner.local.toString()
const signature = CryptoUtils.bytesToHexAddr(data.oracleSignature)

console.log(data, tokenOwner, signature)

try {
await this.props.ethGatewayManager.withdrawEthAsync(tokenOwner, amount, signature)

Expand Down Expand Up @@ -175,7 +177,7 @@ export default class GatewayTokens extends React.Component {
<div>
<h2>Ethereum Network Gateway Tokens</h2>
<div className="container">
<div>{ethWallet}</div>
<div>{viewEth}</div>
<div>{viewTokens}</div>
<div>{viewCards}</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion webclient/src/dc_managers/dc_gateway_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default class DAppChainGatewayManager {
new BN(amount),
new Address(
this._client.chainId,
LocalAddress.fromHexString('0xC5d1847a03dA59407F27f8FE7981D240bff2dfD3')
LocalAddress.fromHexString('0xf5cAD0DB6415a71a5BC67403c87B56b629b4DdaA')
)
)
}
Expand Down
2 changes: 2 additions & 0 deletions webclient/src/eth_managers/eth_gateway_manager.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Web3 from 'web3'
import BN from 'bn.js'

export default class EthGatewayManager {
static async createAsync() {
Expand Down Expand Up @@ -37,6 +38,7 @@ export default class EthGatewayManager {
}

async withdrawEthAsync(address, amount, sig) {
console.log(this._contract.options.address)
return await this._contract.methods
.withdrawETH(amount, sig)
.send({ from: address, gas: '489362' })
Expand Down

0 comments on commit 8b5e136

Please sign in to comment.