-
Notifications
You must be signed in to change notification settings - Fork 43
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: migrate EVM Connector #17
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Coverage Report for Fuel Wallet (./packages/fuel-wallet)
File CoverageNo changed files found. |
Coverage Report for Fuel Development Wallet (./packages/fuel-development-wallet)
File CoverageNo changed files found. |
Coverage Report for Fuelet Wallet (./packages/fuelet-wallet)
File CoverageNo changed files found. |
Resolved by commit 2ed27de |
import path from 'node:path'; | ||
import { fileURLToPath } from 'node:url'; | ||
|
||
export default defineConfig({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it doesn't look we're using any vite app around this PR, did I miss something?
could we delete this file and vite package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this file the beforeAll
in the test file times out due to __dirname
being undefined.
Additionally, as I understand it the following provides access to window
:
test: {
environment: 'jsdom',
},
Is there another file where I should be doing this instead?
this.predicate = predicates['verification-predicate']; | ||
this.installed = true; | ||
this.config = Object.assign(config, { | ||
fuelProvider: 'https://beta-5.fuel.network/graphql', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we keep this hard-coded on this package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have changed this to:
this.config = Object.assign(config, {
fuelProvider: config.fuelProvider || BETA_5_URL,
ethProvider: config.ethProvider || window.ethereum,
});
The reason for the hardcoding was to allow the connector to be instantiated in the same way as the other connectors, with no params needed:
const fuel = new Fuel({
connectors: [
new FuelWalletConnector(),
new EVMWalletConnector(),
],
});
In which case the EVMWalletConnector
defaults to beta-5.
I'm open to suggestions on if this should be changed
"vite": "^5.0.10", | ||
"vite-plugin-dts": "^3.6.4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"vite": "^5.0.10", | |
"vite-plugin-dts": "^3.6.4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linked to the above comment about the vite.config.ts file: #17 (comment)
…/migrate-metamask
Closed by #28 |
This PR migrates the
evm-connector
package from it's old repo.The package has been refactored to achieve the following:
evm-connector
.connectors
.Closes #12
Additional notes and open questions:
evm-connector
package's tests to pass when run from the repo's root I had to manually declare theprocess.env.GENESIS_SECRET = ...
within the test file. There is probably a better solution.defaultConnectors
.pnpm fuels-forc
is set to version0.74.0
, this is to useforc 0.50.0
.forc 0.51.1
introduces an issue whereEvmAddress
cannot be initialised as a configureable.