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

Wallet validator unstaking1 #7403

Merged
merged 16 commits into from
Jan 17, 2023
Merged

Wallet validator unstaking1 #7403

merged 16 commits into from
Jan 17, 2023

Conversation

Jibz1
Copy link
Contributor

@Jibz1 Jibz1 commented Jan 14, 2023

I keep getting this error on devnet Error: Error in getValidators: Error: RPC Error: The response returned from RPC server does not match the TypeScript definition. This is likely because the SDK version is not compatible with the RPC server. Please update your SDK version to the latest. ... but works fine locally .

Screen.Recording.2023-01-14.at.9.16.24.AM.mov

@vercel
Copy link

vercel bot commented Jan 14, 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 17, 2023 at 10:35PM (UTC)
wallet-adapter ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 17, 2023 at 10:35PM (UTC)
1 Ignored Deployment
Name Status Preview Comments Updated
explorer-storybook ⬜️ Ignored (Inspect) Jan 17, 2023 at 10:35PM (UTC)

@Jibz1 Jibz1 requested a review from 666lcz January 14, 2023 14:27
sdk/typescript/src/types/validator.ts Outdated Show resolved Hide resolved
apps/explorer/src/utils/getName.ts Show resolved Hide resolved
apps/wallet/src/ui/app/redux/slices/transactions/index.ts Outdated Show resolved Hide resolved
apps/wallet/src/ui/app/staking/stake/StakeForm.tsx Outdated Show resolved Hide resolved
apps/wallet/src/ui/app/staking/stake/StakingCard.tsx Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

github-actions bot commented Jan 16, 2023

⚠️ 🦋 Changesets Warning: This PR has changes to public npm packages, but does not contain a changeset. You can create a changeset easily by running pnpm changeset in the root of the Sui repo, and following the prompts. If your change does not need a changeset (e.g. a documentation-only change), you can ignore this message. This warning will be removed when a changeset is added to this pull request.

Learn more about Changesets.

Copy link
Contributor

@Jordan-Mysten Jordan-Mysten left a comment

Choose a reason for hiding this comment

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

Some small nits but overall LGTM

apps/wallet/src/shared/utils/index.ts Outdated Show resolved Hide resolved
validatorAddress: SuiAddress;
}

export function useStakeTokenMutation() {
Copy link
Contributor

Choose a reason for hiding this comment

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

A couple things with this:

  • I'd actually be okay if this was just defined inline and not in a separate file.
  • This file is named useStakingMutation but that hook isn't actually exposed. Maybe rename to something like stakingHooks?

if (unstake) return;
const response = await dispatch(
stakeTokens({
let response;
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a blocking concern, but I think this could be done a little cleaner with onCompleted handlers in the mutation. Don't bother changing now, we can improve this later.

@Jibz1 Jibz1 force-pushed the wallet-validator-unstaking1 branch from 670bf63 to 5ab752d Compare January 17, 2023 22:34
@vercel vercel bot temporarily deployed to Preview – wallet-adapter January 17, 2023 22:35 Inactive
@Jibz1 Jibz1 merged commit 0189c1d into main Jan 17, 2023
@Jibz1 Jibz1 deleted the wallet-validator-unstaking1 branch January 17, 2023 22:56
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