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

select network param for Fortmatic #34

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
2 participants
@crisgarner
Copy link
Member

commented Jul 5, 2019

you can now provide an optional parameter for Fortmatic which allows developers to select the network if no param is provided mainnet is selected

}

const ConnectToFortmatic = async (opts: IFortmaticConnectorOptions) => {
if (opts && opts.key) {
try {
const key = opts.key;
const fm = new Fortmatic(key);
const fortmaticNetwork = opts.network ? opts.network : "mainnet";

This comment has been minimized.

Copy link
@pedrouid

pedrouid Jul 5, 2019

Member

simpler this way

const fortmaticNetwork = opts.network || "mainnet";
@pedrouid

This comment has been minimized.

Copy link
Member

commented Jul 5, 2019

Also we need to look into our prettier configs because this PR was supposed to be like 3-4 lines and its over 70

@crisgarner

This comment has been minimized.

Copy link
Member Author

commented Jul 6, 2019

Also we need to look into our prettier configs because this PR was supposed to be like 3-4 lines and its over 70

Yes, I noticed that. I'm pretty much just using the default Prettier configuration for VS Code. Maybe you can you send me your config to add it.

@pedrouid

This comment has been minimized.

Copy link
Member

commented Jul 7, 2019

I have this setting on my VS Code that adapts the Prettier rules to the project's Eslint rules

// settings.json
{
    "prettier.eslintIntegration": true,
}

This is a Typescript project however so it uses Tslint instead. Do you know if it's possible to add .prettierrc config file that simply follows the Eslint or Tslint rules instead of the default?

@pedrouid

This comment has been minimized.

Copy link
Member

commented Jul 7, 2019

Hmm it doesn't seem like it's possible according to this issue.

prettier/prettier-vscode#292

I will investigate a bit further

@pedrouid

This comment has been minimized.

Copy link
Member

commented Jul 7, 2019

It looks like the solution might be to use tslint-config-prettier:
https://github.com/prettier/tslint-config-prettier

@pedrouid

This comment has been minimized.

Copy link
Member

commented Jul 7, 2019

Just tested a prettier configuration to fix this @crisgarner, could you test the prettier-config branch on your side?

@pedrouid

This comment has been minimized.

Copy link
Member

commented Jul 7, 2019

Fixed on commit fdcdc69

@pedrouid pedrouid closed this Jul 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.