pull down to refresh
72 sats \ 27 replies \ @Undisciplined 3 Aug 2024 \ on: SN release: random zap amounts, webln attached wallet meta
Can you explain how random and turbo work together?
It's not doing exactly what I expected, which makes me feel like I'm playing with fire.
I think it's a random number in your range multiplied by 10^(nth zap-1).
reply
I think I'd prefer it to be: first zap is a random number N in your range, then N*10^(nth zap-1) for subsequent zaps.
reply
I like the first one more. If people want random, let them have random.
reply
Good point.
reply
That's what I expected, but that's not what it's doing. My range is 21-42 and oftentimes the second zap is also in that range, rather than 210-420. One time though, the second zap was between 210 and 420.
Is there a chance it's only scaling the max value on the range?
reply
Oh it could be. I'll take a closer look. weareallsatoshi was the mastermind.
reply
IIRC it uses a random value in the range as the base before scaling it for turbo tipping, but I could be misremembering.
Edit: I think I didn’t do anything specific for turbo tipping, I just changed how the “base zap” is calculated to use a random value in range if that’s configured, else using your default zap value. From there, it should just follow the existing turbo tipping behavior
reply
I'll keep playing around with it, but something's acting funny. I double zapped you just now and it only did 27 sats. At minimum, you should have gotten 210, if I understand how it's supposed to work. It's especially odd that the second zap was only 5 sats, since that's outside the range I set.
reply
I wonder if there’s some delay in determining the “last” zap for turbo tipping. Also yea, being outside the range altogether does not make any sense