Skip to content
This repository has been archived by the owner on May 28, 2021. It is now read-only.

one-liner default options #739

Merged
merged 12 commits into from
Jan 20, 2020
Merged

one-liner default options #739

merged 12 commits into from
Jan 20, 2020

Conversation

pedrouid
Copy link
Contributor

@pedrouid pedrouid commented Jan 15, 2020

Allowing clients to be instantiated with default options using our hosted hub by passing a network string as either rinkeby or mainnet (using mnemonic)

Rinkeby

import * as connext from "@connext/client"

const channel = await connext.connect("rinkeby")

Mainnet

import * as connext from "@connext/client"

const channel = await connext.connect("mainnet", { mnemonic })

@pedrouid
Copy link
Contributor Author

pedrouid commented Jan 15, 2020

NOTE: Don't merge this PR without consolidating with #738

@pedrouid
Copy link
Contributor Author

Blocked by #742 to support testing

@todo-tracker
Copy link

todo-tracker bot commented Jan 16, 2020

Hey, pedrouid

We noticed you made changes to a file with a TODO on it.
These are set to make sure potential Technical Debt doesn't get forgotten.
While you're here take a shot at turning a listed TODO into a TODONE!

Id Name File Priority
71 merge: modules/client/src/node.ts Normal
78 why is it sometimes data vs data.data? modules/client/src/controllers/AbstractController.ts Normal
83 should add once to top level client modules/test-runner/src/util/helpers/fundChannel.ts Normal
84 Currently, this test always fails because when promise is never rejected when modules/test-runner/src/swap/swap.test.ts Normal
85 events for withdrawal commitments! issue 698 modules/test-runner/src/withdraw/withdraw.test.ts Normal

button

@pedrouid
Copy link
Contributor Author

Requires #754 and it should have tests of itself too

@todo-tracker
Copy link

todo-tracker bot commented Jan 18, 2020

Hey, pedrouid

It looks like you made some changes to this pull request!
These changes included files that have a TODO linked to them.
Click the button below to view details on all the TODO for this pull request, and while you're here take a shot at turning a TODO into a TODONE!

Id Name File Priority
86 clean up types from restore, without the any typing things modules/client/src/channelProvider.ts Normal
87 remove when using only store package modules/client/src/channelProvider.ts Normal
88 Currently the implementation implies that the backup service modules/test-runner/src/util/helpers/backupService.ts Normal

button

@pedrouid pedrouid marked this pull request as ready for review January 18, 2020 13:50
Comment on lines 13 to +16
describe("Create Channel", () => {
it("Happy case: user creates channel with mainnet network string", async () => {
const clientA: IConnextClient = await createDefaultClient("mainnet");
expect(clientA.multisigAddress).to.be.ok;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should also add a test that if you instantiate the default client and a client with client opts you get the same multisig address

@LayneHaber LayneHaber merged commit dca7b2a into staging Jan 20, 2020
@pedrouid pedrouid deleted the one-liner branch January 24, 2020 14:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants