Skip to content

Commit

Permalink
deposit disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisbontje committed Jun 10, 2016
1 parent 9b7a744 commit d5f6abe
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
4 changes: 2 additions & 2 deletions frontend/client/templates/ethtokens.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ <h2>
</th>
<td>
<div class="radio">
<label><input type="radio" value="deposit" {{b "group: type"}}> Deposit</label>
<label><input type="radio" value="withdraw" {{b "group: type"}}> Withdraw</label>
<label><input type="radio" value="deposit" {{b "group: type"}} disabled> Deposit</label>
<label><input type="radio" value="withdraw" {{b "group: type"}} selected> Withdraw</label>
</div>
</td>
</tr>
Expand Down
35 changes: 18 additions & 17 deletions frontend/client/templates/ethtokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,24 @@ Template.ethtokens.viewmodel({
_this.lastError('')

if (_this.type() === 'deposit') {
var options = {
gas: DEPOSIT_GAS,
value: web3.toWei(_this.amount())
}
Dapple['makerjs'].getToken('ETH', function (error, token) {
if (!error) {
token.deposit(options, function (error, tx) {
if (!error) {
Transactions.add(TRANSACTION_TYPE, tx, { type: 'deposit', amount: _this.amount() })
} else {
_this.lastError(error.toString())
}
})
} else {
_this.lastError(error.toString())
}
})
console.log('ETH deposit disabled')
// var options = {
// gas: DEPOSIT_GAS,
// value: web3.toWei(_this.amount())
// }
// Dapple['makerjs'].getToken('ETH', function (error, token) {
// if (!error) {
// token.deposit(options, function (error, tx) {
// if (!error) {
// Transactions.add(TRANSACTION_TYPE, tx, { type: 'deposit', amount: _this.amount() })
// } else {
// _this.lastError(error.toString())
// }
// })
// } else {
// _this.lastError(error.toString())
// }
// })
} else {
Dapple['makerjs'].getToken('ETH', function (error, token) {
if (!error) {
Expand Down

0 comments on commit d5f6abe

Please sign in to comment.