-
Notifications
You must be signed in to change notification settings - Fork 345
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
[LIVE-8890] remove ethereum family code #4336
[LIVE-8890] remove ethereum family code #4336
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
|
1dac527
to
c9fff1a
Compare
transactionHash: operation.hash, | ||
}), | ||
); | ||
// dispatch( |
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.
There's an other draft PR with edit evm transaction right ? If yes we can delete this instead of commenting
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.
There is indeed a draft attempt to port this feature to evm here -> #4217
But since the changes commented out as part of this commit b9a7b56 are not necessarily ethereum
(or evm
) specific (because present in non ethereum
/ evm
family folders) I decided to only comment them as part of this PR.
Because these changes present in non family specific folders might not be present in the draft PR above (that only port the ethereum
family logic to evm
).
We could decide to remove all of the speed up / cancel tx code for now, until it's added back again in the evm family, but it should be done in it's own dedicated PR to allow easier revert and since it's outside the scope of this one (and also to avoid growing this already massive PR with even more code removal).
But removing all this code might not be strategically wise since the work to integrate speed up / cancel tx to evm should be (will be) done juste after this evm / ethereum family migration.
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.
Description updated 👍
@@ -125,16 +125,15 @@ const baseMockTransaction: Transaction = { | |||
recipient: "", |
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.
Not related to PR but .react.test.tsx
is a bit weird
.tsx
already means it's a react file
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.
No strong opinion on that.
But I think this is a convention chosen to differentiate "dom" related tests from non "dom" related tests.
cf. this config for example -> https://github.com/LedgerHQ/ledger-live/blob/develop/libs/domain-service/jest.config.js#L38-L51
But yes, outside of the scope of this PR so won't touch it here / now
libs/ledger-live-common/src/families/evm/walletApiAdapter.test.ts
Outdated
Show resolved
Hide resolved
c9fff1a
to
fed5759
Compare
kept commented for now to keep a framework that can be used for the integration of this feature on evm, which should be done shortly
Untill evm bridge mock is available
PS: this code is legacy and will be removed by this PR #4317
fed5759
to
fde4aff
Compare
fde4aff
to
fae928f
Compare
fae928f
to
90d7feb
Compare
_transactionRaw: unknown, | ||
_transactionHash: unknown, | ||
) => {}; | ||
|
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.
line 402-423 in this file, we should remove the alert message for editable operation since we remove the edit tx feature.
@@ -1,9 +1,11 @@ | |||
// FIXME: to update when implementing edit transaction on evm | |||
|
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.
if you want to remove the edit tx feature temporarily. you can remove this file completely or just return null.
it is not a major issue. It is up to you to keep it here or not.
transaction = bridge.updateTransaction(defaultTransaction, { | ||
tokenIds: [nft?.tokenId], | ||
const transaction = bridge.updateTransaction(defaultTransaction, { | ||
mode: nft.standard.toLowerCase() as EvmNftTransaction["mode"], |
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 don't see a real good reason for NFTStandard and EvmNftTransaction["mode"] to be 2 different types. From what I see everytime we use NFTStandard
we end up lowering the case so I think we can just use the same type for both
type EvmNftTransaction = {
mode: NFTStandard;
...
}
and then lowering the case of NFTStandard, or do vice verse doing
type NFTStandard = EvmNftTransaction["mode"]
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.
Seems to make sense, will take a look at it in a dedicated / independent PR 👍
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.
@@ -1,8 +1,9 @@ | |||
// FIXME: to update when implementing edit transaction on evm | |||
|
|||
import React from "react"; |
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 think you should remove the following code in
/ledger-live-desktop/src/renderer/modals/Send/steps/StepRecipient.tsx
{stuckAccountAndOperation ? (
<EditOperationPanel
operation={stuckAccountAndOperation.operation}
account={stuckAccountAndOperation.account}
parentAccount={stuckAccountAndOperation.parentAccount}
/>
) : null}
Merging this PR with the speed up / cancel code commented (and not fully removed) in the feature branch for better topic segregation. If needed, a new branch starting from the feature branch will be created to remove this code |
📝 Description
Remove all ethereum family related code from live, including:
ethereum
family folder underLLD
ethereum
family folder underLLM
ethereum
family folder underLLC
ethereum
family code in other filesFor easier review, it is recommended to review commit by commit.
Commits have been broken down atomically and ordered and a sensible way.
The biggest commit is a72bfd8 that include the removal of the
ethereum
family folder fromLLD
,LLM
andLLC
. Feels free to skip it or just glance over the list of removed files.FYI this commit's changes (aec91bd) are not critical since this is just an update of some legacy code that will be removed by #4317 (but it still works as expected)
I smoked tested the PR by launching LLD and LLM in dev, both apps starts without issue and I can navigate to ethereum currencies.
A full non reg test will be performed on the main PR #4285 after this one is merged. This does not make sense to do it at this stage.
This PR also includes changes related to https://ledgerhq.atlassian.net/browse/LIVE-8188 (in this commit 2629450) since this logic was not present in the evm family.
Note 📝:
Speed up / cancel tx
Some logic related to speed up / cancel tx has been commented out instead of removed (cf. b9a7b56) to keep a framework that can be used for the integration of this feature on evm, which should be done shortly.
Also to keep this very PR specific to ethereum code removal and not scope creep it by adding removal of speed up / cancel feature.
We could decide to remove all the speed up / cancel related code present in non family specific code, until we re-integrate the feature within the evm family (which should be done right after this ethereum / evm migration anyway), but then it should be done in it's own dedicated PR.
Evm bridge mock
A test-suite has been 59f99ce voluntarily (instead of removed) until the evm bridge mock is available. cf. Support/LIVE-7931 Evm mock test #4353
❓ Context
LLC
LLD
LLM
✅ Checklist
📸 Demo
🚀 Expectations to reach
Please make sure you follow these Important Steps.
Pull Requests must pass the CI and be internally validated in order to be merged.