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: create a wallet without a provider #1566

Conversation

petertonysmith94
Copy link
Contributor

@petertonysmith94 petertonysmith94 commented Dec 19, 2023

closes #1444

Issue

  • Provider was made in the following PR
  • User requested for the provider to be optional for Wallet instantion methods here

Solution

  • For wallet instantion, all methods with a provider argument should now be optional.
  • Internally we set the provider as undefined.
  • Any direct or indirect usage of the provider, will now throw an error if it's undefined.

@danielbate danielbate changed the title Wallet creation without provider feat!: create a wallet without a provider Dec 19, 2023
@danielbate danielbate added the feat Issue is a feature label Dec 19, 2023
@arboleya arboleya added this to the 1 - Salamander milestone Jan 12, 2024
@petertonysmith94 petertonysmith94 changed the title feat!: create a wallet without a provider feat: create a wallet without a provider Jan 12, 2024
@petertonysmith94
Copy link
Contributor Author

This doesn't seem like a breaking change—is it?

No it doens't - removed the !

@arboleya arboleya self-requested a review January 15, 2024 16:12
Copy link
Contributor

@Torres-ssf Torres-ssf left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

Copy link
Contributor

@Torres-ssf Torres-ssf left a comment

Choose a reason for hiding this comment

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

@petertonysmith94, thank you for your valuable contribution to this project 🙏.

I've reviewed the changes and I think they're great.

However, I'd like to suggest an enhancement for our documentation. Specifically, in the Wallet section, it would be beneficial to clarify that the provider is optional when creating Wallet/Account instances.

@arboleya arboleya mentioned this pull request Jan 17, 2024
44 tasks
@petertonysmith94
Copy link
Contributor Author

@petertonysmith94, thank you for your valuable contribution to this project 🙏.

I've reviewed the changes and I think they're great.

However, I'd like to suggest an enhancement for our documentation. Specifically, in the Wallet section, it would be beneficial to clarify that the provider is optional when creating Wallet/Account instances.

You're most welcome - I have added a small point on Wallet creation with an example.
Please let me know if there is anything else 😃

Copy link
Contributor

@danielbate danielbate left a comment

Choose a reason for hiding this comment

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

:shipit:

@Torres-ssf Torres-ssf merged commit 606e6e6 into FuelLabs:rc/salamander Jan 18, 2024
12 checks passed

You can choose not to pass through a provider argument on `Wallet` construction:

<<< @/../../../packages/fuel-gauge/src/doc-examples.test.ts#wallet-optional-provider{ts:line-numbers}
Copy link
Member

Choose a reason for hiding this comment

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

@FuelLabs/sdk-ts Just a reminder that code snippets should ideally come from the apps/docs-snippets.

arboleya added a commit that referenced this pull request Jan 26, 2024
* chore: updating code owners (#1496)
* docs: purge hardcoded snippets on 'using typegen' page (#1403)
* chore: remove method that's same as base method (#1445)
* chore: implement RC workflow (#1497)
* Revert "feat: add `Predicate.getTransferTxId` helper (#1467)"
* chore: fix rc release string replace (#1529)
* docs: Update some hyperlinks to reference the new documentation hub (#1520)
* chore: improve rc release message (#1559)
* feat: GraphQL subscriptions (#1374)
* chore: pin `graphql-request` to `v5` (#1567)
* chore: upgrade `tsx` (#1574)
* feat: migrate from Jest to Vitest (#1310)
* chore: fix temp test workflow (#1579)
* chore: update required node engine in `create-fuels` (#1582)
* chore: add node version test matrix (#1575)
* chore: fix broken rc message (#1580)
* chore: update nodejs to v20 (#1544)
* feat: accepting addresses as `string` (#1583)
* chore: properly format the PR coverage report comment (#1586)
* fix: flaky test (#1590)
* docs: update `deposit-and-withdraw` page (#1591)
* feat: retry mechanism (#1474)
* feat: replaced `semver` dependency with custom implementation (#1594)
* feat: replace `elliptic` with `@noble/curves` (#1601)
* chore: fix CI failing due to missing tag in test (#1614)
* feat: improve ABI Coders `decode` validation (#1426)
* fix: do not generate a coverage diff without coverage artifact (#1629)
* chore: pinpoint vitest to 1.0.4 (#1637)
* chore: remove `ethers` dependency from `utils` (#1640)
* fix: `getOperation` for `Transfer Asset` (#1619)
* fix: remove external font dependencies (#1642)
* fix: generate RC PR comment on `pull_request` event only (#1648)
* fix: fix failing `rc` comment (#1657)
* chore: add missing test group (#1658)
* feat: implement browser compatibility testing (#1630)
* chore: fix string replace in `rc` ci (#1659)
* chore: adding extra reporters (#1661)
* chore: manually trigger `rc` CI (#1660)
* feat: use `submitAndAwait` graphql endpoint (#1615)
* fix: flaky retry test (#1654)
* feat: create a wallet without a provider (#1566)
* chore!: Share single chainConfig and review node-related utilities (#1602)
* chore: use new temporary coverage artifact (#1676)
* fix: internalizing `findBinPath` utility (#1679)
@petertonysmith94 petertonysmith94 deleted the ps/feat/allow-wallet-creation-without-provider branch January 28, 2024 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Issue is a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow wallet creation without a provider
5 participants