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

Add staking types sdk #7389

Merged
merged 4 commits into from
Jan 13, 2023
Merged

Add staking types sdk #7389

merged 4 commits into from
Jan 13, 2023

Conversation

Jibz1
Copy link
Contributor

@Jibz1 Jibz1 commented Jan 13, 2023

Added Validator Type and RPC endpoint for getDelegatedStake and getValidators

@vercel
Copy link

vercel bot commented Jan 13, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
explorer ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 13, 2023 at 10:52PM (UTC)
wallet-adapter ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 13, 2023 at 10:52PM (UTC)
1 Ignored Deployment
Name Status Preview Comments Updated
explorer-storybook ⬜️ Ignored (Inspect) Jan 13, 2023 at 10:52PM (UTC)

Copy link
Contributor

@666lcz 666lcz left a comment

Choose a reason for hiding this comment

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

Thanks for working on this! Please generate a changeset and address the comments before merging

@@ -737,4 +739,36 @@ export class JsonRpcProvider extends Provider {
);
}
}

async getDelegatedStake(address: string): Promise<DelegatedStake[]> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
async getDelegatedStake(address: string): Promise<DelegatedStake[]> {
async getDelegatedStake(address: SuiAddress): Promise<DelegatedStake[]> {


async getDelegatedStake(address: string): Promise<DelegatedStake[]> {
try {
const resp = await this.client.requestWithType(
Copy link
Contributor

Choose a reason for hiding this comment

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

return resp;
} catch (err) {
throw new Error(
`Error dry running transaction with request type: ${err}`
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
`Error dry running transaction with request type: ${err}`
`Error in getDelegatedStake: ${err}`

return resp;
} catch (err) {
throw new Error(
`Error dry running transaction with request type: ${err}`
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
`Error dry running transaction with request type: ${err}`
`Error in getValidators: ${err}`

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.

None yet

2 participants