-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
chore(bitcoin): add bitcoin build feature + disable it temporarily #30477
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
fe5243d
to
7f1b273
Compare
Builds ready [7f1b273]
Page Load Metrics (1671 ± 67 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
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.
What about setting the E2E test to runnable only if bitcoin is enable ? Is it possible ?
@GuillaumeRx I wanted to do something like this yes, having like a conditional From what I've read, there's not builtin support for this, and you need to use trick like: const itif = (condition) => condition ? it : it.skip;
describe('suite name', () => {
itif(true)('test name', async () => {
// Your test
});
}); See: https://stackoverflow.com/a/60438234 But So I ended up, not doing anything for this. Also, the plan is to fully re-enable Bitcoin once we have catch up with the new APIs, so it's only a temporary solution IMO. Another option could be to tweak the test launcher (in EDIT: Forgot to add the stackoverflow references |
@@ -64,6 +64,7 @@ buildTypes: | |||
features: | |||
- build-flask | |||
- keyring-snaps | |||
# - bitcoin |
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.
Why have we decided to leave this in place and comment on it rather than removing it ?
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.
My initial idea was to comment it out with a description so people can easily add it back (like in most configuration files).
I can remove it if you prefer.
@@ -5,7 +5,7 @@ import BitcoinHomepage from '../../page-objects/pages/home/bitcoin-homepage'; | |||
import { withBtcAccountSnap } from './common-btc'; | |||
|
|||
describe('BTC Account - Overview', function (this: Suite) { | |||
it('has balance displayed and has portfolio button enabled for BTC accounts', async function () { | |||
it.skip('has balance displayed and has portfolio button enabled for BTC accounts', async function () { |
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.
maybe i miss some context here , but can you help me to understand why we are not doing something like:
// function to check if bitcoin is supported based on the state
if (!getIsBitcoinSupportEnabled()) {
return;
}
rather than skip, on the e2e tests ?
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.
We cannot use those kind of selector in e2e tests. And most of the Bitcoin e2e test are actually mocking "enabling" this flag with some fixtures.
Like here: https://github.com/MetaMask/metamask-extension/blob/main/test/e2e/flask/btc/common-btc.ts#L223
Also, we cannot use code-fence in e2e tests (at least, to my knowledge), so we would need to find a trick (using a test build)
Unless there are some known tricks to do this?
This needs to go 1st #30484 |
Description
Temporarily disable Bitcoin support until we finalize the new Snap version with the latest updated architecture.
Important
Once this PR is merged, existing Bitcoin accounts might still be showing on your extension.
You might see some error messages on the console, but nothing should break. You can remove those
accounts, and the errors will be be gone.
Related issues
N/A
Manual testing steps
yarn start:flask
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist