Closed maximusmaximalistus closed 10 months ago
Thank you for the super detailed description, it will be easier for us to try to reproduce what you experienced.
At first look, I would say there may have been some loss of precision when converting the amount from client to server or something like that. We'll add more details on the cause of this once we investigate properly.
I identified the bug. Good news is that the bug is in the CLI when the amount expressed in bitcoin is converted to sats. Should be easy to fix it by using decimal
for the conversion instead of the built-in cast.
@maximusmaximalistus I'm glad to inform you that this has been fixed in #81 and included in v0.2.3
I add an mnemonic from tdex 0.9.3. My goal was to restore it and withdraw the funds. I installed ocean 0.2.2 using docker with help from dev Altafan.
$ docker-compose up -d oceand
The compose file is this one:
The directory of the file looks like this:
After configuring alias
$ alias ocean="docker exec oceand ocean"
and initializationocean config init --no-tls
. The wallet was restored.$ ocean wallet restore --password "" --mnemonic "" --root-path "m/84'/0'" --account-threshold 300
The wallet had 3 markets.
The balances were:
Funds from account9 were withdrawn.
$ ocean transaction transfer --account-name bip84-account9 --sats-per-byte 0.11 --receivers '{"address": "VJLGrQjdZZZjsYiJHiWXC9RfsrTpkD12e2XvfXteye6YEbFWf99dzEyCwTSgBSui9Ububzt17JsWz2dR", "asset": "6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d", "amount": 0.0000101}' --receivers '{"address": "VJLGrQjdZZZjsYiJHiWXC9RfsrTpkD12e2XvfXteye6YEbFWf99dzEyCwTSgBSui9Ububzt17JsWz2dR", "asset": "fdf208c97fdefdbb1cb85ce946bfa66b2c0b639eeeefad8b8fcc81843dcb4a0c", "amount": 1098992.52500000}'
Since account8 had no L-BTC, everything in account0 was sent to it.
$ ocean account derive --account-name bip84-account8
$ ocean transaction transfer --account-name bip84-account0 --sats-per-byte 0.11 --receivers '{"address": "lq1qqg4fpdglex3tp9e30nmsak7gugcsw3auyh8m4zxdfvgjcf0xthcefem6rgkkhdn22lywmvmxwzhyv03cpvrs2954ajxrkj69a", "asset": "6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d", "amount": 0.00019002}'
And then withdrawn also.
When I checked the balances.
In account9 one unit was still there.
This is the transaction that was done to withdraw the all the funds.
https://blockstream.info/liquid/tx/97ac82d39f0ccf07ea35c23b9626b5d7468efd6ba16fc7399f59d6c997d61919
And this are the utxos.
I open this issue since this can affect users in the future when trying to withdraw all funds. This asset is a memecoin and one unit isn't a big issue. But in other assets it could be. And huge thanks to dev Altafan for helping in this issue.