Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Cannot read property 'Eth' of undefined #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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