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

Deactivate tokens when platform coin is deactivated #1493

Closed
sergeyboyko0791 opened this issue Oct 6, 2022 · 10 comments
Closed

Deactivate tokens when platform coin is deactivated #1493

sergeyboyko0791 opened this issue Oct 6, 2022 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@sergeyboyko0791
Copy link

sergeyboyko0791 commented Oct 6, 2022

SlpToken, LightnigCoin, SplCoin have Arc pointer to its platform coins, so disable_coin doesn't work properly for UTXO, SolanaCoin.

@sergeyboyko0791 sergeyboyko0791 added the bug Something isn't working label Oct 6, 2022
@artemii235
Copy link
Member

Good issue, let's do it on the next sprint :)

@sergeyboyko0791
Copy link
Author

Call coin.abortable_system.abort_all() in the disable_coin RPC.
Ref #1490 (comment)

@borngraced
Copy link
Member

Will @smk be testing this? @sergeyboyko0791

@sergeyboyko0791
Copy link
Author

Good note! Could you please post a test plan to the issue? @borngraced

@borngraced
Copy link
Member

borngraced commented Dec 8, 2022

CASE 1

  1. Enable ETH with tokens e.g JST using enable_eth_with_tokens
  2. Try disabling ETH and the expected response should look like this
"result": {
            "coin":  "ETH",
            "cancelled_orders": [],
            "tokens": ["JST"]
      }

or try disabling JST and the reponse should look like this instead

"result": {
            "coin":  "JST",
            "cancelled_orders": [],
            "tokens": []
      }

cancelled_orders should be empty if there's no cancellable order..@smk

you can also test for SlpToken, LightnigCoin, etc...

@borngraced
Copy link
Member

CASE 2 With cancelled order

  1. Enable ETH with tokens e.g JST using enable_eth_with_tokens
  2. Try making an order request with JST.
  3. Try disabling ETH and the expected response should look like this
"result": {
            "coin":  "ETH",
            "cancelled_orders": [SOME ORDER UUID],
            "tokens": ["JST"]
      }

or try disabling JST and the reponse should look like this instead

"result": {
            "coin":  "JST",
            "cancelled_orders": [SOME ORDER UUID],
            "tokens": []
      }

cancelled_orders should be empty if there's no cancellable order..@smk

you can also test for SlpToken, LightnigCoin, etc...

@sergeyboyko0791
Copy link
Author

@smk762 could you please test this functionality? Just a reminder :)

@smk762
Copy link

smk762 commented Jan 4, 2023

Working as expected, thanks.

smk762@pig:~/mm2_777$ ./disable.sh ETH
{"result":{"coin":"ETH","cancelled_orders":[],"tokens":["BAT-ERC20"]}}
smk762@pig:~/mm2_777$ ./disable.sh IRIS
{"result":{"coin":"IRIS","cancelled_orders":[],"tokens":["ATOM-IBC_IRIS"]}}
smk762@pig:~/mm2_777$ ./disable.sh MATIC
{"result":{"coin":"MATIC","cancelled_orders":[],"tokens":["BAT-PLG20"]}}
smk762@pig:~/mm2_777$ ./disable.sh BCH
{"result":{"coin":"BCH","cancelled_orders":[],"tokens":["ASLP-SLP"]}}

@SirSevenG
Copy link

Works here as expected. 👍🏻

Platform is disabled with related coins
{"result":{"coin":"ETH","cancelled_orders":[],"tokens":["SHIB-ERC20","USDC-ERC20"]}}
...
Single coin deactivation does nothing to plarform and/or other tokens
{"result":{"coin":"USDC-ERC20","cancelled_orders":[],"tokens":[]}}
...
Orders are cancelled if there are any

@sergeyboyko0791
Copy link
Author

Close as solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants