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

[feature request] wallet-only mode #864

Closed
ca333 opened this issue Mar 15, 2021 · 5 comments · Fixed by #915
Closed

[feature request] wallet-only mode #864

ca333 opened this issue Mar 15, 2021 · 5 comments · Fixed by #915
Assignees
Labels
enhancement New feature or request

Comments

@ca333
Copy link

ca333 commented Mar 15, 2021

Will be nice to have wallet-only mode for coins non-supported by DEX API.

@artemii235
Copy link
Member

artemii235 commented Mar 15, 2021

Thanks for opening the issue! We have a starting point for this already: https://github.com/KomodoPlatform/atomicDEX-API/blob/mm2.1/mm2src/coins/lp_coins.rs#L512, need to extend it to be configurable through coins file.

@artemii235
Copy link
Member

Checklist

  • Ensure that orderbook RPC returns an error if the base and/or rel are wallet only.
  • best_orders should not accept the wallet-only coin as param.
  • best_orders should filter out wallet-only coins orders from the response.
  • Recheck that buy/sell/setprice returns an error if the base and/or rel are wallet only.
  • trade_preimage should return an error if the base and/or rel are wallet only.
  • orderbook_depth should return an error if at least 1 pair contains a wallet-only coin.

@shamardy
Copy link
Collaborator

@artemii235 I don't think we can use https://github.com/KomodoPlatform/atomicDEX-API/blob/335c96024620fe47bdcbc65021df821af6e6f54c/mm2src/coins/lp_coins.rs#L516 for orders since the orders methods referenced in the checklist don't use the coin implementations directly. I will be getting the wallet_only key straight from config for the above checklist. I will also implement the wallet_only method for the coins so it can be used later for anything else.

@artemii235
Copy link
Member

for orders since the orders methods referenced in the checklist don't use the coin implementations directly. I will be getting the wallet_only key straight from config for the above checklist. I will also implement the wallet_only method for the coins so it can be used later for anything else.

True, I missed that we don't require coins to be activated in some RPCs 🙂 Yes, please use the key from config directly wherever fn wallet_only(&self) -> bool; is not available.

@artemii235 artemii235 added the enhancement New feature or request label Apr 20, 2021
artemii235 pushed a commit that referenced this issue Apr 23, 2021
* wallet-only mode

* added 2 wallet_only functions to avoid duplication

* filter wallet-only coins from best_orders response

* code formatting
@artemii235
Copy link
Member

@ca333 @tonymorony Omar has just implemented it, we can now proceed to use it in GUIs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants