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

Both sides previous revisionPrevious revision
Next revision
Previous revision
trade_portal_coin_recovery [12/05/2021 08:08] 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|}}
  
-This is a guide only for the seller listing QORT. LTC/DOGE refunds on the buyer side are unaffected. This only relates to QORT refunds on the seller sideon the rare occasion that a trade fails half way through.+===== LTC, ARRR, DOGE, DGB, or RVN Recovery =====
  
-The AT becomes eligible for refunding after a certain amount of time has passed in the TRADING state. We’re still unsure exactly how long this is - will have some more info on this soon+If you are buying QORT (by spending LTC, ARRR, DOGE, 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 (a total of 1.5 hours after the trade began).
  
-Since 2.1 (sleeping ATs) you need to issue a cancel request to trigger the refund once that time has passed. This should wake up the AT and execute the refund. Longer term we may be able to do this automatically without needing to cancel it.+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.
  
-We thought there was a button in the UI, but after checking the code it looks like the UI hides it in this stateWe’ll see about modifying that in the next version.+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 coreThis 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:
  
-This new requirement to cancel was an unintended consequence of sleeping ATs essentially a bug. So it may take a little while to smooth things out.+[[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]]
  
-An alternate option to cancelling (and only option at the moment) is to send any transaction at all to the ATThe easiest option is to send the AT a tiny amount of QORT:+Under "POST /crosschain/htlc/refundAll", click "Try it out", paste the API key, then click "Execute".
  
-  - Find the trade'`atAddressvia this API and copy it: http://localhost:12391/api-documentation/#/Cross-Chain%20(Trade-Bot)/getTradeBotStates (you will need to find the one that matches the QORT and/or LTC amount +`true` will be returned if anything was able to be refunded. `false` will be returned if there is nothing to refund. Alternativelyan error will be returned if it's unable to run the refund process.
-  - In the UIgo to ‘Send Coin’ +
-  - Select QORT +
-  - In the amount, enter `0.00000001` +
-  - In the ‘To’ field, paste the `atAddress` value that you copied +
-  - Click ‘Send’+
  
-If the AT has reached its refund timeout (the exact time is still being determinedthen it should then enter REFUNDING mode. CalDescent is going to try and keep an eye on failed trades on the network and will take care of this process on behalf of usersso most shouldn't need to worry about this.+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. 
 + 
 + 
 +If refundAll returned `false`, you may need to import your archived trades and try again. To do this, you 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"'' 
 + 
 +Once archived trades are imported, you can re-run the refundAll to speed up any refunds from these trades.
trade_portal_coin_recovery.1638709708.txt.gz · Last modified: 12/05/2021 08:08 by gfactor