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(core): simplify core action parameters #454

Merged
merged 1 commit into from
Sep 14, 2024

Conversation

gershon
Copy link
Contributor

@gershon gershon commented Sep 13, 2024

Description

Simplify core function and react hooks parameters.

Before:

const orderHash = await createOffer(config, {
  starknetAccount: buyer,
  offer: {
    brokerId: accounts.listingBroker.address,
    tokenAddress: STARKNET_NFT_ADDRESS,
    tokenId,
    startAmount: BigInt(10)
  },
  approveInfo: {
    currencyAddress: config.starknetCurrencyContract,
    amount: BigInt(10)
  }
});

After:

const { orderHash } = await createOffer(config, {
  account: buyer,
  brokerAddress: accounts.listingBroker.address,
  currencyAddress: config.starknetCurrencyContract,
  tokenAddress,
  tokenId,
  amount: BigInt(10)
});

What type of PR is this? (check all applicable)

  • 🍕 Feature (feat:)
  • 🐛 Bug Fix (fix:)
  • 📝 Documentation Update (docs:)
  • 🎨 Style (style:)
  • 🧑‍💻 Code Refactor (refactor:)
  • 🔥 Performance Improvements (perf:)
  • ✅ Test (test:)
  • 🤖 Build (build:)
  • 🔁 CI (ci:)
  • 📦 Chore (chore:)
  • ⏩ Revert (revert:)
  • 🚀 Breaking Changes (BREAKING CHANGE:)

Related Tickets & Documents

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

Added to documentation?

  • 📜 README.md
  • 📓 Documentation
  • 🙅 no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

[optional] What gif best describes this PR or how it makes you feel?

PR Title and Description Guidelines:

  • Ensure your PR title follows semantic versioning standards. This helps automate releases and changelogs.
  • Use types like feat:, fix:, chore:, BREAKING CHANGE: etc. in your PR title.
  • Your PR title will be used as a commit message when merging. Make sure it adheres to Conventional Commits standards.

Closing Issues

Copy link

changeset-bot bot commented Sep 13, 2024

⚠️ No Changeset found

Latest commit: e4f8c3e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@kwiss kwiss merged commit 15dc33d into feat/contract-v2 Sep 14, 2024
@kwiss kwiss deleted the feat/flat-parameters branch September 14, 2024 08:43
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