toohoola Posted September 3, 2018 #1 Posted September 3, 2018 Whenever we multiply or divide the bet amount via hotkey, it treats it as a whole coin instead of satoshis. If we play with 0.00000001 and we divide it with hotkey, it changes the amount to 0.50000000 I did some tests and it's only an issue if I manually type in the bet amount and then change it via hotkey. If I change from 0 via hotkey it works as it should. While I was looking for solutions, I noticed in your code "satoshi" is sometimes referred as whole numbers (as it should, based on it's name), but sometimes as a floating point number, representing the coin value. Strangely, when it's treated as a floating point number it works normally. In your Betsize component (./src/games/reusable/Betsize/index.js#59), you divide via the bet.value, which works as it should, because the value is always a floating point number: newValue = divide(Number(bet.value)); But in your hotkey code (./src/games/Dice/Hotkeys/index.js#53), you use the satoshi value, which is as stated above sometimes a floating point, sometimes a whole number: const satoshi = divide(props.state.general.bet.satoshi); If you use the value instead of the satoshi, like you did in the Betsize, it should work. Same is true for the multiply. Also, this one is still not fixed:
Kate Posted September 3, 2018 #2 Posted September 3, 2018 Hotkeys in Stake have always been buggy. They plan to fix tip log but not hotkeys somehow lol
MartinTheWander Posted October 5, 2018 #3 Posted October 5, 2018 I also encountered this problem, and it is quite annoying. E.g. in dice: Clicking the buttons: works, not seen any weird behavior. But when using hotkeys: it works fine for a few rounds, doubling or halving the amount of Satoshi as it should, then suddenly it switches e.g. from 64 Satoshi to 128 BTC. Same with LTC. It ALWAYS happens after a short time, but it is not logical why or when. Sometimes setting minimum account and then doubling up "fixes" it for another few rounds, sometimes not, sometimes it happens after you halved the amount for the first time, etc.etc. WTF. NOT working as intended. 😀 Or IS this intentional????? 😎 And please do not tell me - as someone of your team did in a different, now closed thread on this issue, that this is just a "cosmetic issue". It is a big, fat bug that can easily make people bust their accounts by accident. Fix this, please. P.S.: tested with current Firefox, Opera and Chrome builds on Linux and Windows 10. All affected. Not browser or platform specific.
Dan Posted November 5, 2018 #4 Posted November 5, 2018 This is being fixed today, it should be pushed later in the week with all the other PR's.
Featured Comment
Archived
This topic is now archived and is closed to further replies.