swarm-cli icon indicating copy to clipboard operation
swarm-cli copied to clipboard

feat: display estimated effective volume during buy (#479)

Open LevilkTheReal opened this issue 1 year ago • 2 comments

Issue: https://github.com/ethersphere/swarm-cli/issues/479

Solution: Screenshot 2023-12-05 at 15 34 12

@Cafe137 FYI

I could not run the tests. I am getting this error. Any idea? Screenshot 2023-12-05 at 16 34 37

(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 avatar Dec 05 '23 15:12 LevilkTheReal

@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?

Cafe137 avatar Feb 08 '24 14:02 Cafe137

@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?

LevilkTheReal avatar Feb 12 '24 14:02 LevilkTheReal