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

Support DEX orders on stellar client #119

Open
wants to merge 16 commits into
base: development
Choose a base branch
from

Conversation

AlaaElattar
Copy link
Contributor

@AlaaElattar AlaaElattar commented Dec 5, 2024

Description

  • support placing, canceling, and listing orders

Changes

  • Added createOrder, user can create buy/sell orders for specific assets.
  • Added cancelOrder, user can cancel specific order with its id.
  • Added getOrderBook, user can get oder book of the conversion between any 2 assets.
  • Added listMyOffers, user can list its offers.
  • Added updateOrder, user can update an existing offer with its id.

Related Issues

#112

Checklist

  • Tests included
  • Build pass
  • Code format
  • Screenshots/Video attached (needed for UI changes)

@AlaaElattar AlaaElattar marked this pull request as draft December 5, 2024 10:56
@AlaaElattar AlaaElattar marked this pull request as ready for review December 22, 2024 15:32
Copy link
Collaborator

@zaelgohary zaelgohary left a comment

Choose a reason for hiding this comment

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

Please fix analyze workflow. Also, can you replace prints with logger?

@AlaaElattar AlaaElattar marked this pull request as draft December 25, 2024 07:57
@AlaaElattar AlaaElattar marked this pull request as ready for review December 25, 2024 08:53
Copy link
Collaborator

@zaelgohary zaelgohary left a comment

Choose a reason for hiding this comment

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

I get insufficient balance although I have enough XLMs in my balance.

image

Also, USDC asset code is not added while adding trustline,

Logger is not working. I had to edit the logger value in client to the following for it to print.

  var logger = Logger(
    printer: PrettyPrinter(
      methodCount: 2,
      errorMethodCount: 8,
      lineLength: 120,
      colors: true,
      printEmojis: true,
    ),
    level: Level.debug,
    filter: ProductionFilter(),
  );

packages/stellar_client/lib/src/client.dart Show resolved Hide resolved
packages/stellar_client/lib/src/client.dart Outdated Show resolved Hide resolved
packages/stellar_client/lib/src/client.dart Outdated Show resolved Hide resolved
@AlaaElattar AlaaElattar marked this pull request as draft January 9, 2025 15:33
@AlaaElattar AlaaElattar marked this pull request as ready for review January 12, 2025 13:57
Copy link
Collaborator

@zaelgohary zaelgohary left a comment

Choose a reason for hiding this comment

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

Although I create an order successfully, I get an empty list when listing offers.

image

@zaelgohary
Copy link
Collaborator

I get the following error while updating the order.

image

@AlaaElattar
Copy link
Contributor Author

AlaaElattar commented Jan 14, 2025

Although I create an order successfully, I get an empty list when listing offers.

image

  • I tried the same behavior and the balance changed.
    Screenshot 2025-01-14 at 12 37 02 PM

@AlaaElattar
Copy link
Contributor Author

I get the following error while updating the order.

image

  • The offers list is empty which means the order already done.
  • That's why its not found when updating it in the offers.

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