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: implement abstract substrate functions #5410

Merged
merged 1 commit into from
Jan 22, 2025
Merged

feat: implement abstract substrate functions #5410

merged 1 commit into from
Jan 22, 2025

Conversation

yash-bitgo
Copy link
Contributor

feat: implement abstract substrate class functions

TICKET: WIN-4299

@yash-bitgo yash-bitgo force-pushed the WIN-4299 branch 3 times, most recently from ab61c00 to aa840e8 Compare January 22, 2025 06:38
@yash-bitgo yash-bitgo marked this pull request as ready for review January 22, 2025 10:27
@yash-bitgo yash-bitgo requested a review from a team as a code owner January 22, 2025 10:27
Comment on lines +48 to +53
getAddress(format: DotAddressFormat): string {
let encodedAddress = this.createPolkadotPair().address;
encodedAddress = keyring.encodeAddress(encodedAddress, format as number);

return encodedAddress;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This shouldn't be implemented in this module itself since format could be a different number for different chains. This KeyPair class should be abstract and the coin can implement extend this class & this function depending on it's own network formats.

throw new Error('missing txPrebuild parameter');
}

if (!_.isString(txHex)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Avoid using lodash if possible

@yash-bitgo yash-bitgo merged commit 688e299 into master Jan 22, 2025
8 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.

2 participants