Qortal Project

The future of blockchain platforms

User Tools

Site Tools


trade_portal_coin_recovery

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
trade_portal_coin_recovery [06/05/2021 11:34] – created gfactortrade_portal_coin_recovery [10/06/2022 14:50] (current) – [LTC, DOGE, DGB, or RVN Recovery] caldescent
Line 3: Line 3:
 {{:45d8cf2d-33c3-469d-8a41-da72c44afea9.jpeg?400|}} {{:45d8cf2d-33c3-469d-8a41-da72c44afea9.jpeg?400|}}
  
-There is currently a bug in the core that can cause it to go into the BOB_REFUNDED state even though the coins have sold. Generally calling the `redeemAll` API should be enough to credit the missing LTC to your wallet.+===== LTC, ARRR, DOGE, DGB, or RVN Recovery =====
  
-You should be able to run this command directly in a terminal window. It has to be on the same machine that you originally listed the QORT for sale onthe core must be running, and the `db` folder in your qortal directory must not have been replaced with a bootstrap since listing the QORT.+If you are buying QORT (by spending LTCARRRDOGE, DGB, or RVN) and the trade fails, it should enter the "REFUNDING" state after 1 hour. This happens occasionally if they buyer and seller's nodes aren't able to communicate properly. The LTC, ARRR, DOGE, DGB, or RVN should be returned to your wallet with around 30 mins of the trade entering the REFUNDING state (total of 1.5 hours after the trade began).
  
-```curl -X GET "http://localhost:12391/crosschain/htlc/redeemAll/LITECOIN" -H  "accept: text/plain"```+If for some reason you have not received the LTC ARRR DOGE DGB RVN refund (or the purchased QORT) after 2 hours, you can call the refundAll API to retry any failed refunds.
  
-Alternatively, you can go to the API documentation via this link, click "Try it out", then "Execute"+For this, you will need your node's API key, which can be found in the apikey.txt file in the folder that you installed the core. This will be the same place that you have the qortal.jar and db folder. Copy the contents of this apikey.txt file to your clipboard, then visit this link
-http://localhost:12391/api-documentation/#/Cross-Chain%20(Hash%20time-locked%20contracts)/redeemAllHtlc+ 
 +[[http://localhost:12391/api-documentation/#/Cross-Chain%20(Hash%20time-locked%20contracts)/refundAllHtlc|http://localhost:12391/api-documentation/#/Cross-Chain%20(Hash%20time-locked%20contracts)/refundAllHtlc]] 
 + 
 +Under "POST /crosschain/htlc/refundAll", click "Try it out", paste the API key, then click "Execute"
 + 
 +`true` will be returned if anything was able to be refunded. `false` will be returned if there is nothing to refund. Alternatively, an error will be returned if it's unable to run the refund process. 
 + 
 +As an alternative to the link above, you can use the command line (replace `apiKeyGoesHere` with your API key): 
 + 
 +''curl -X POST "http://localhost:12391/crosschain/htlc/refundAll" -H  "accept: text/plain" -H  "X-API-KEY: apiKeyGoesHere"''
  
 Either method is fine and they both achieve the same result. Either method is fine and they both achieve the same result.
  
-If you have replaced the db folder since originally listing the QORT, there are a couple of possible options for recovery: 
  
-1. If you still have a copy of the old db folderjust stop the corethen rename the current one to something else like `db_new`, then move the old one (named `db`) into its placeStart the core and then try the command again.+If refundAll returned `false`, you may need to import your archived trades and try again. To do thisyou can use the API documentation again: http://localhost:12391/api-documentation/#/Admin/importArchivedTrades 
 + 
 +Under "POST /admin/repository/importarchivedtrades"click "Try it out", paste the API key, then click "Execute". 
 + 
 +The command line alternative for this is: 
 + 
 +''curl -X POST "http://localhost:12391/admin/repository/importarchivedtrades" -H  "accept: text/plain" -H  "X-API-KEY: apiKeyGoesHere"''
  
-2. If you don't have the old db folder, search your system for both `TradeBotStates.script` and `TradeBotStates.json`. These would normally be found in your qortal directory, or in the `qortal-backup` subfolder. You would then need to import these files in order to give your core access to the trades contained in the backup. The actual import process is quite complicated so I won't detail it out here, but if anyone does find themselves in this situation please let me know and I can write up some instructions.+Once archived trades are imported, you can re-run the refundAll to speed up any refunds from these trades.
trade_portal_coin_recovery.1622907290.txt.gz · Last modified: 06/05/2021 11:34 by gfactor