Skip to content

Remove call_price field from get_call_orders() #1973

Open

Description

@bitphage

Bug Description

get_call_orders() response contains call_price field which is always 1:1

[{'id': '1.8.88448',
  'borrower': '1.2.415609',
  'collateral': '86439389367',
  'debt': 1306857052,
  'call_price': {'base': {'amount': 1, 'asset_id': '1.3.0'},
   'quote': {'amount': 1, 'asset_id': '1.3.113'}},
  'target_collateral_ratio': 1610}]

Impacts
Describe which portion(s) of BitShares Core may be impacted by this bug. Please tick at least one box.

  • API (the application programming interface)
  • Build (the build process or something prior to compiled code)
  • CLI (the command line wallet)
  • Deployment (the deployment process after building such as Docker, Travis, etc.)
  • DEX (the Decentralized EXchange, market engine, etc.)
  • P2P (the peer-to-peer network for transaction/block propagation)
  • Performance (system or user efficiency, etc.)
  • Protocol (the blockchain logic, consensus, validation, etc.)
  • Security (the security of system or user data, etc.)
  • UX (the User Experience)
  • Other (please add below)

Expected Behavior

call_price field should be properly calculated or should not present at all (field removed from response).

CORE TEAM TASK LIST

  • Evaluate / Prioritize Bug Report
  • Refine User Stories / Requirements
  • Define Test Cases
  • Design / Develop Solution
  • Perform QA/Testing
  • Update Documentation

Activity

  1. abitmore commented on Sep 3, 2019

    @abitmore
    Member

    Note that call_price is a field in call_order_object, because the field is still in use in consensus (see #1669), we can't remove the field from call_order_object. Even after it's no longer used in consensus, a big code refactory is needed to remove it from the object.

    For this issue, technically we can change the return type of get_call_orders API to exclude that field. However, please be aware that before the field is removed from the object, get_objects API will still return the field, and the field will still appear in notifications after subscribed.

    Another concern is this change will probably break some client applications. For example, due to historical reasons, some applications may still try to read the field even if it's no longer used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions