swarm-cli
swarm-cli copied to clipboard
feat: display estimated effective volume during buy (#479)
Issue: https://github.com/ethersphere/swarm-cli/issues/479
Solution:
@Cafe137 FYI
I could not run the tests. I am getting this error. Any idea?
(I've extended the tests with this line tho: expect(consoleMessages[2]).toBe('Estimated effective volume: 41.17 GB')
)
Another thing. The Storage class is not that precise. For instance, it converts the incoming effective bytes to 41.17 GB which should be 44.21 GB.
Also, there are different converters/repos. Is it worth creating a shared one?
@LevilkTheReal For depths <= 21, I would maybe remove the message:
Estimated effective volume: 0 B
It looks like a bug.
Instead I would print a human friendly message, something like "effective volume is likely to be smaller than estimated capacity".
What do you think?
@LevilkTheReal For depths <= 21, I would maybe remove the message:
Estimated effective volume: 0 B
It looks like a bug.
Instead I would print a human friendly message, something like "effective volume is likely to be smaller than estimated capacity".
What do you think?
Sounds good! What do you think about the fix? Should I just write that message or can I keep the key for the message?