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

feat: configure the plugin, add first method addEthereumChain #2

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

krzysu
Copy link
Contributor

@krzysu krzysu commented Oct 22, 2024

No description provided.

@krzysu krzysu changed the title configure the plugin, add first method addEthereumChain feat: configure the plugin, add first method addEthereumChain Oct 22, 2024
@luu-alex
Copy link

luu-alex commented Oct 23, 2024

https://github.com/web3/web3-wallet-rpc-utils/blob/main/package.json#L39
The dependency of web3js needs to be bumped to current version otherwise build issues happen.
Created an issue for this that needs to update the template
web3/web3.js-plugin-template#10

@luu-alex
Copy link

Looks good!

Copy link
Contributor

@danforbes danforbes left a comment

Choose a reason for hiding this comment

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

No blockers from me. Looks great!

Comment on lines +5 to +11
- wallet_addEthereumChain (EIP-3085)
- wallet_updateEthereumChain (EIP-2015)
- wallet_switchEthereumChain (EIP-3326)
- wallet_getOwnedAssets (EIP-2256)
- wallet_watchAsset (EIP-747)
- wallet_requestPermissions (EIP-2255)
- wallet_getPermissions (EIP-2255)
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like this PR only adds support for one of these methods. It may be a good idea to note that the other methods are not yet supported.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, this is WIP, I'll add them all before the plugin is ready for release

package.json Outdated Show resolved Hide resolved
super();
}

public async addEthereumChain(param: AddEthereumChainRequest): Promise<null> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Documentation comments here would be nice

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is coming in the next PR

import { Web3PluginBase, utils } from "web3";
import { AddEthereumChainRequest } from "./types";

type WalletRpcApi = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why isn't this defined in types.ts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

all types from types.ts are exported from the plugin package to use outside of it, this one is for internal use only.

"extends": "./tsconfig.json",
"include": ["src"]
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why has the exclude property been removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I understand that include is enough if we want to build only src folder, using both doesn't change anything and I find it even more confusing, as exclude didn't mention all other folders in the repo anyway.

@danforbes
Copy link
Contributor

I just noticed that there is no LICENSE file in this repository.

@krzysu
Copy link
Contributor Author

krzysu commented Oct 24, 2024

Noted:

  • upgrade dependencies, specifically web3js
  • add LICENSE file

@krzysu krzysu force-pushed the feat-init-setup branch 4 times, most recently from 0bd6f66 to e62782d Compare October 24, 2024 12:32
@krzysu krzysu merged commit d00496e into main Oct 24, 2024
3 checks passed
@krzysu krzysu deleted the feat-init-setup branch October 24, 2024 12:39
This was referenced Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants