Closed OrmEmbaar closed 5 years ago
This problem actually runs a bit deeper; there appears to be some internal confusion between denominations here. I just converted 2 pFCT into 725453222 pUSD.
Entry hash: 99c678193906b708c9a052c958b976e5e29c4dbfdc7bc3ed3e694512f2437052
It appears that the conversion command accepts pFCT denominated in factoids, then converts that denomination to factoshis without treating them as factoshis. As a result, the above transaction converted 2 * 10^8 pFCT to pUSD.
So i guess the balances
command may just be interpreting balances incorrectly. Here is what I get for the above address
{"PEG":0,"pADA":0,"pBNB":0,"pBRL":0,"pCAD":0,"pCHF":0,"pCNY":0,"pDAS":0,"pDCR":0,"pETH":0,"pEUR":0,"pFCT":300000000,"pGBP":0,"pHKD":0,"pINR":0,"pJPY":0,"pKRW":0,"pLTC":0,"pMXN":0,"pPHP":0,"pRVN":0,"pSGD":0,"pUSD":725453222,"pXAG":0,"pXAU":0,"pXBC":0,"pXBT":0,"pXLM":0,"pXMR":0,"pZEC":0}
If I actually try to spend that, it does not work.
balances
is in factoshi. I will make that consistent.
That usd balance is $7.25
It doesn't look like it's 7.25. Can we make sure that it prints what people are expecting? At least need to put a decimal point in there.
I made a PR to put in the decimal point and print the human-friendly balances.
Merged into master https://github.com/pegnet/pegnetd/pull/32
pegnetd balances
denominates pFCT in factoshis. However,pegnetd newcvt
expects the amount argument to be denominated in factoids.Consistent denomination should be used for both in order to avoid confusion. I suggest denominating all pFCT balances/arguments in factoids in order to make sure it is consistent with
pegnet burn
.