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

Consistent return type signature for @fuels/react hooks #70

Closed
petertonysmith94 opened this issue Apr 18, 2024 · 0 comments · Fixed by #85
Closed

Consistent return type signature for @fuels/react hooks #70

petertonysmith94 opened this issue Apr 18, 2024 · 0 comments · Fixed by #85
Assignees
Labels
e-testnet-launch https://github.com/FuelLabs/edge/issues/140 p0 For yesterday. critical bugs / big priorities

Comments

@petertonysmith94
Copy link

petertonysmith94 commented Apr 18, 2024

Summary

For context, the @FuelLabs/sdk-ts team had a discussion here around the return type of useWallet, which is inconsistent with the rest of the hooks in @fuels/react (examples below).

  • Provide consistent return types across all hooks, for an easier typed experience for consumers.

useWallet

declare const useWallet: (address?: string | null) => {
    // Omitted irrelevant return variables
    wallet: fuels.Account | null | undefined;
};

getBalance

declare const useBalance: () => {
    // Omitted irrelevant return variables
    balance: fuels.BN | null;
};
@LuizAsFight LuizAsFight added p1 https://github.com/FuelLabs/edge/issues/137 p0 For yesterday. critical bugs / big priorities and removed p1 https://github.com/FuelLabs/edge/issues/137 labels May 28, 2024
@helciofranco helciofranco self-assigned this May 28, 2024
@helciofranco helciofranco linked a pull request May 28, 2024 that will close this issue
@LuizAsFight LuizAsFight added the e-testnet-launch https://github.com/FuelLabs/edge/issues/140 label Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e-testnet-launch https://github.com/FuelLabs/edge/issues/140 p0 For yesterday. critical bugs / big priorities
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants