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
Last revisionBoth sides next revision
trade_portal_coin_recovery [06/05/2021 11:34] – created gfactortrade_portal_coin_recovery [05/11/2022 20:15] – added info for new coins quickmythril
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, 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 LTCDOGEDGB, 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, DOGE, DGB, or RVN should be returned to your wallet with around 30 mins of the trade entering the REFUNDING state.
  
-```curl -X GET "http://localhost:12391/crosschain/htlc/redeemAll/LITECOIN" -H  "accept: text/plain"```+If for some reason you have not received the LTC 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+
  
-Either method is fine and they both achieve the same result.+[[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]]
  
-If you have replaced the db folder since originally listing the QORTthere are a couple of possible options for recovery:+Under "POST /crosschain/htlc/refundAll", click "Try it out", paste the API keythen click "Execute".
  
-1. If you still have a copy of the old db folder, just stop the core, then 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.+`truewill be returned if anything was able to be refunded. `falsewill be returned if there is nothing to refundAlternatively, an error will be returned if it's unable to run the refund process.
  
-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.+As an alternative to the link above, you can use the command line (replace `apiKeyGoesHerewith 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.
trade_portal_coin_recovery.txt · Last modified: 10/06/2022 14:50 by caldescent