zeitgeistpm / documentation

Source material for Zeitgeist's documentation site.
https://docs.zeitgeist.pm
3 stars 12 forks source link

Upgrade for zeitgeistpm/sdk-v0.6.5 #56

Closed saboonikhil closed 2 years ago

saboonikhil commented 2 years ago
vercel[bot] commented 2 years ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
docs ✅ Ready (Inspect) Visit Preview Aug 4, 2022 at 6:46PM (UTC)
saboonikhil commented 2 years ago

Although it would technically work to use 10 as swap fee, this doesn't seem like a realistic value. It should probably be 1_000_000_000 or 100_000_000.

Other than that, two general comments:

  • The indentation is inconsisent throughout the SDK documentation. Sometimes it's two spaces per indent, sometimes four.
  • I think these examples would be easier to read if all numbers used a thousands separator, i.e. 10_000_000_000 instead of 10000000000.

Also, would it be possible to define a BASE object in the SDK that people can use? It seems very timesome and frankly very error-prone to keep using explicit numbers.

I don't think the typescript data type string allows much.

We can work on the BASE object post discussion with the frontend team.

maltekliemann commented 2 years ago

Nevertheless, I would not use 10 as swap fee (for instructive purposes). Regarding the thousands separators, why are you guys using strings to communicate with polkadot-js?

saboonikhil commented 2 years ago

Nevertheless, I would not use 10 as swap fee (for instructive purposes). Regarding the thousands separators, why are you guys using strings to communicate with polkadot-js?

What value would you recommend as an example for swapFee?

String? Just to keep it consistent with the polkadot-js apps. They don't support thousands separators. Probably, another reason why it could potentially add to the confusion when combining using the SDK with just the usual polkadot-js api, as you'll end up with 2 different units there.

maltekliemann commented 2 years ago

I would expect numbers to be numbers and not strings, and so on. I would find it quite bothersome if I had to convert numbers to strings everytime I do an SDK call. Did I get this right, this is a restriction imposed by polkadot-js?

I would use 1000000000 for swap fee (that's 10%) or 100000000 (1%).

saboonikhil commented 2 years ago

Thank you very much!