Closed zaibon closed 4 years ago
I tried the following scenarios, on testnet and using TFT
and in all cases I got it right, couldn't reproduce
The problem has already been reproduced
JSX> amount
98.066682
JSX> j.clients.stellar.mywallet.transfer("GDKNF2MV4PH47EZRMJKFYUA5GUEIJFAKIHUFPCU5XFV56W4UCRACTTLR", amount, 'TFT:GA47YZA3PKFUZMPLQ3B5F2E3CJIB57TGGU7SPCQT2WAEYKN766PWIMB3')
'4adb8833792348bbd514ab3d0d8331f2c7799d52f75e00d1b3ed9878c85d50fb'
The problem has already been reproduced
JSX> amount 98.066682 JSX> j.clients.stellar.mywallet.transfer("GDKNF2MV4PH47EZRMJKFYUA5GUEIJFAKIHUFPCU5XFV56W4UCRACTTLR", amount, 'TFT:GA47YZA3PKFUZMPLQ3B5F2E3CJIB57TGGU7SPCQT2WAEYKN766PWIMB3') '4adb8833792348bbd514ab3d0d8331f2c7799d52f75e00d1b3ed9878c85d50fb'
Where did you get this amount from? It should be 7 digits precision and not 6
Seems like I made a mistake here: https://github.com/threefoldtech/jumpscaleX_libs/blob/59f7230334f3e1cf8f31f7d16ebd86d9890abdb4/JumpscaleLibs/sal/zosv2/billing.py#L26
Fixed in: https://github.com/threefoldtech/jumpscaleX_libs/commit/eb47929fb09babc273c078d78feabde8d1ebbdf2
@grimpy @zaibon can you pull libs and check?
@DylanVerstraete in the scenario above it was reproduced by only using the stelar client, so i doubt your fix solves this one
The stellar client does not do any rounding.. It just takes the input as string and submits that in a transaction..
@DylanVerstraete in the scenario above it was reproduced by only using the stelar client, so i doubt your fix solves this one
and where did this amount
variable come from?
Okay some weird stuff happens. We are trying to pay for 1050667160
stropes for a certain reservation in the chatflow. When the actual transaction is submitted we see that the amount in the transaction is correct: 105.066716
For some reason it transfered only 105.0667
to the escrow account.
https://stellar.expert/explorer/testnet/tx/602fa1febee11c396e971185f86fdc7ac980400365158022f3eb534b7a15f112
We checked sending 105.066716
between wallets with the stellar client and all of these transactions (funded and not funded) succeeded.
https://stellar.expert/explorer/testnet/tx/3eda67ff47d9bd3ca5b75bdd920d82e6dbd96bed38a788ac71ed9ac9a39f60a1
This might be an issue on Stellar side...
followup issue: https://github.com/threefoldfoundation/tft-stellar/issues/127
I think we do have a rounding issue in the payment flow. I made this reservation https://explorer.testnet.grid.tf/explorer/reservations/459798.
The amount asked to be paid was 98.066682 TFT. But if I check the amount transered: https://stellar.expert/explorer/testnet/tx/272318106443776#272318106443777 it only show 98.06668.