Skip to content

Commit

Permalink
Fix: Cannot read property 'Eth' of undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
martinlowinski committed Apr 23, 2019
1 parent 5068a62 commit caeaded
Show file tree
Hide file tree
Showing 3 changed files with 251 additions and 12 deletions.
15 changes: 10 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
'use strict'

const {
AssetUnit,
convert,
eth,
gwei,
} = require('@kava-labs/crypto-rate-utils')
const { randomBytes, createHmac } = require('crypto')
const inquirer = require('inquirer')
const { convert, Unit } = require('ilp-plugin-ethereum/build/account')
const connectorList = require('./connector_list.json')
const parentBtpHmacKey = 'parent_btp_uri'

Expand Down Expand Up @@ -57,14 +62,14 @@ async function configure ({ testnet, advanced }) {
ethereumPrivateKey: res.privateKey,
ethereumProvider,
// Open channels for ~$2 by default
outgoingChannelAmount: convert('0.01', Unit.Eth, Unit.Gwei),
outgoingChannelAmount: convert(gwei(10000000), eth()),
balance: {
// Fulfill up to ~$1 without receiving money
maximum: convert('0.01', Unit.Eth, Unit.Gwei),
maximum: convert(gwei(5000000), eth()),
// Stay prefunded by ~40¢
settleTo: convert('0.004', Unit.Eth, Unit.Gwei),
settleTo: convert(gwei(2000000), eth()),
// Settle up on every packet
settleThreshold: convert('0.004', Unit.Eth, Unit.Gwei)
settleThreshold: convert(gwei(2000000), eth())
},
server: btpServer
}
Expand Down
Loading

0 comments on commit caeaded

Please sign in to comment.