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

chore(suite): unify staking files #15108

Merged

Conversation

dev-pvl
Copy link
Contributor

@dev-pvl dev-pvl commented Oct 29, 2024

Description

Combined all stake utils into a single file.
Moved constants into wallet-constants and pulled non-type items out of type files.
Renamed a few files to make things easier to find

Related Issue

Resolve #13754

@tomasklim
Copy link
Member

@dev-pvl please resovle conflicts

@dev-pvl dev-pvl force-pushed the chore/suite-unify-staking-files branch from 1d7add7 to 1e45c7e Compare November 4, 2024 13:13
@dev-pvl
Copy link
Contributor Author

dev-pvl commented Nov 4, 2024

@tomasklim done

@dev-pvl dev-pvl force-pushed the chore/suite-unify-staking-files branch from 1e45c7e to 2c4608c Compare November 4, 2024 13:15
Comment on lines +88 to +91
// Define signature constants
const STAKE_SIGNATURE = '0x3a29dbae';
const UNSTAKE_SIGNATURE = '0x76ec871c';
const CLAIM_SIGNATURE = '0x33986ffa';
Copy link
Member

Choose a reason for hiding this comment

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

Can those be added to your lib? and we just import it from @everstake/sdk?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree, it could be added. But let's do this as a part of the separate PR. I remember we also had some hardcoded values in the blockbook that didn't belong to it.

return isStakeTypeTx(signature) ? signatureToStakeNameMap[signature] : null;
};

export const getUnstakeAmountByEthereumDataHex = (dataHex?: string) => {
Copy link
Member

Choose a reason for hiding this comment

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

I think some of those utils would be interesting for your sdk or not?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, you're right. But let's do it separately

@tomasklim tomasklim enabled auto-merge (rebase) November 4, 2024 16:02
@tomasklim tomasklim disabled auto-merge November 4, 2024 16:03
@tomasklim
Copy link
Member

You have unused dependencies error @dev-pvl

@tomasklim tomasklim force-pushed the chore/suite-unify-staking-files branch from 2c4608c to 7d6c59a Compare November 4, 2024 17:56
@tomasklim tomasklim enabled auto-merge (rebase) November 4, 2024 17:59
@tomasklim tomasklim merged commit df9ac7a into trezor:develop Nov 4, 2024
38 of 44 checks passed
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.

Unify staking files
2 participants