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 react hooks and swap sdk provider #75

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ErnestMironov
Copy link

List of React hooks:

  1. useCancelOrder return a method that takes as input:
    nonce
    orderType

  2. useCreateBasedOrder - creates an order of any NFT from a certain collection that the user has.

  3. useCreateOrder creates an order to buy an NFT, return a method that takes as input:
    collection address
    tokenId
    ERC20 address
    ERC20 amount

  4. useFullfillOrder - makes another user buy an NFT, with an order already created, takes as input:
    signedOrderObject

  5. useOrders - finds orders that match the passed parameters. Returns all orders or one specific order

  6. useQuickSwap - finds a corresponding order and executes a transaction

  7. useWallet - connects wallet, returns address and balance.

@johnrjj
Copy link
Contributor

johnrjj commented Sep 11, 2022

Hey! I'm working on switching up the repo to support the react hooks

Definitely intend on landing this PR.

@JoaoCampos89
Copy link

Hey, I recommend create maybe a new repo only for the hooks, there are users that already have their custom hooks using same functionality. Only to keep bundle size minimal and easier to mantain.

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.

3 participants