Difference between revisions of "How to "rescue" stuck DFI"

From DeFiChain-Wiki
(add language support)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<language />
+
'''Disclaimer: Console should be used in care. We are not responsible if the wrong commands are issued resulting in lost coins!'''
<translate>
 
How to "rescue" stuck DFI
 
  
Do this on console.
+
If you have problems sending your DFI from the Wallet try the following '''step-by-step instruction'''
  
Check getbalance that it is less than the DFI
 
  
Now we need to convert the token DFI into UTXO DFI. Use listaccounts to list all addresses that are holding tokens. Look for those that are with u/DFI. Not the amount field and the addresses. Say in this example the address is dXXXXXXXXXXXXXXXXX and the amount is 12.3@DFI.
+
==Step 1: Checking DFI-coin vs. DFI-token==
 +
Before starting we should check, if a DFI-sending problem is caused by "unwrapped" DFI
  
Check the total amount the address holds by doing getaccount dXXXXXXXXXXXXXXXXX.
+
[[File:DFI_Wallet.webp|DFI-amount showed in the wallet]]
  
Convert the token DFI of to UTXO by doing: accounttoutxos dXXXXXXXXXXXXXXXXX {"dXXXXXXXXXXXXXXXXX":"12.3@DFI"}.
+
Your DFI-Wallet is showing an DFI amount. To see, how many coins and tokens you have, you need the following 2 commands:
  
If you get the error Can't find any UTXO's for owner, do sendtoaddress dXXXXXXXXXXXXXXXXX 0.01 first, wait for confiramtion before trying the accounttoutxos command again.
+
<span style="color:#FF0000"> getbalance </span>
 +
<br><span style="color:#FF0000"> gettokenbalances {} true true</span>
  
5. Wait for confirmation, then check getbalance, you should see your UTXO DFI increases, now you should be able to send more DFI.
 
  
Note that the app should do all the above for you. This workaround guide is provided to help you to "rescue" your stuck DFI in the meantime while the app developers address the issue.
+
[[File:DFI-coins vs. DFI-token.webp|checking DFI-coins vs. DFI-token]]
  
Disclaimer: Console should be used in care. We are not responsible if the wrong commands are issued resulting in lost coins.
+
<br>In the above picture you see, most DFI are Token and not Coins. These Tokens cannot be transferred to another address.
</translate>
+
 
 +
<b>HINT : You may need some DFI-coins (see getbalance) to execute commands from Step 4.</b>
 +
 
 +
 
 +
 
 +
==Step 2: Find addresses holding DFI-Token==
 +
The above shown DFI-amount are hold by one or more addresses. To find out, which one are hold the token, use the following command:
 +
 
 +
<span style="color:#FF0000"> listaccounts {} false false true </span>
 +
 
 +
You are getting a list of entries, which should look like this:
 +
 
 +
[[File:Address with DFI-token.webp|address with DFI-token]]
 +
 
 +
 
 +
 
 +
==Step 3: Checking all tokens on relevant address==
 +
Before changing token to coin, please check the amount and all the other tokens on this address with:
 +
 
 +
<span style="color:#FF0000"> getaccount <i>address_from_command_before</i> </span>
 +
 
 +
You should get the following result:
 +
 
 +
[[File:Tokens on address.webp|List of tokens on the address]]
 +
 
 +
 
 +
 
 +
==Step 4: Converting token to coin==
 +
Now, we come to the last, essential step. This will convert an amount of token into coins. Use the command:
 +
 
 +
<span style="color:#FF0000"> accounttoutxos <i>address_from_above</i> {"<i>adress_from_above</i>":"<i>DFI_amount_to_convert</i>@DFI"} </span>
 +
 
 +
 
 +
===Error===
 +
<strong>If you execute the command from Step 4, you may get the following error:</strong>
 +
 
 +
[[File:Error changing token to coin.webp|Error when changing token to coin]]
 +
 
 +
Then you need additional steps:
 +
 
 +
 
 +
====Step 4.1: Sending DFI-coin to Token-adress====
 +
Send a small amount of DFI to this address!
 +
 
 +
[[File:Result Tx-Hash.webp|Sending DFI-coin to address with token, result is a Tx-hash]]
 +
 
 +
You will get an Tx-Hash as a result.
 +
 
 +
 
 +
====Step 4.2: Check Confirmation====
 +
Please go to https://explorer.defichain.io/#/DFI/mainnet/home to check, if it is confirmed before you proceed.
 +
 
 +
[[File:Check Confirmation.webp|Confirmations after exection of command]]
 +
 
 +
 
 +
====Step 4.3: Converting token to coin====
 +
Now, you can run the accounttoutxos command from above again. If it is successful, you will get an Tx-hash, which can be checked in the explorer again (Step 5)
 +
 
 +
[[File:Token-to-Coin conversion.webp|Successful execution of Token-to-Coin conversion]]
 +
 
 +
 
 +
 
 +
==Step 5: Check conversion==
 +
Just to be sure, everythin worked, you can run the commands <span style="color:#FF0000"> getaccount <i>address</i> </span> and <span style="color:#FF0000"> getbalance </span> again.  
 +
<br>In the following Picture, you see that the DFI-coin amount is now increased by 2DFI. The token were converted.
 +
 
 +
[[File:New Balance.webp|New token and coin balance]]
 +
 
 +
 
 +
 
 +
==Source==
 +
Daniel Zirkel: https://www.reddit.com/r/defiblockchain/comments/kb10d3/stepbystep_changing_dfitoken_to_dficoin/?utm_medium=android_app&utm_source=share

Latest revision as of 20:20, 16 December 2020

Disclaimer: Console should be used in care. We are not responsible if the wrong commands are issued resulting in lost coins!

If you have problems sending your DFI from the Wallet try the following step-by-step instruction


Step 1: Checking DFI-coin vs. DFI-token

Before starting we should check, if a DFI-sending problem is caused by "unwrapped" DFI

DFI-amount showed in the wallet

Your DFI-Wallet is showing an DFI amount. To see, how many coins and tokens you have, you need the following 2 commands:

getbalance
gettokenbalances {} true true


checking DFI-coins vs. DFI-token


In the above picture you see, most DFI are Token and not Coins. These Tokens cannot be transferred to another address.

HINT : You may need some DFI-coins (see getbalance) to execute commands from Step 4.


Step 2: Find addresses holding DFI-Token

The above shown DFI-amount are hold by one or more addresses. To find out, which one are hold the token, use the following command:

listaccounts {} false false true

You are getting a list of entries, which should look like this:

address with DFI-token


Step 3: Checking all tokens on relevant address

Before changing token to coin, please check the amount and all the other tokens on this address with:

getaccount address_from_command_before

You should get the following result:

List of tokens on the address


Step 4: Converting token to coin

Now, we come to the last, essential step. This will convert an amount of token into coins. Use the command:

accounttoutxos address_from_above {"adress_from_above":"DFI_amount_to_convert@DFI"}


Error

If you execute the command from Step 4, you may get the following error:

Error when changing token to coin

Then you need additional steps:


Step 4.1: Sending DFI-coin to Token-adress

Send a small amount of DFI to this address!

Sending DFI-coin to address with token, result is a Tx-hash

You will get an Tx-Hash as a result.


Step 4.2: Check Confirmation

Please go to https://explorer.defichain.io/#/DFI/mainnet/home to check, if it is confirmed before you proceed.

Confirmations after exection of command


Step 4.3: Converting token to coin

Now, you can run the accounttoutxos command from above again. If it is successful, you will get an Tx-hash, which can be checked in the explorer again (Step 5)

Successful execution of Token-to-Coin conversion


Step 5: Check conversion

Just to be sure, everythin worked, you can run the commands getaccount address and getbalance again.
In the following Picture, you see that the DFI-coin amount is now increased by 2DFI. The token were converted.

New token and coin balance


Source

Daniel Zirkel: https://www.reddit.com/r/defiblockchain/comments/kb10d3/stepbystep_changing_dfitoken_to_dficoin/?utm_medium=android_app&utm_source=share