Open todofixthis opened 6 years ago
~I think the incorrect type for balances
is due to https://github.com/iotaledger/iota.lib.go/issues/11~ I think the Go lib is doing the right thing; in my opinion, the sandbox application is the exception to the rule. For the majority of applications, I would expect that developers would prefer that balances are returned as integers rather than strings. The sandbox app is unique in that it acts as a proxy for IRI, so it has to return exactly what the IRI would in these situations.
The capitalised attribute names may be due to https://github.com/iotaledger/iri/issues/319
This was fixed here https://github.com/iotaledger/iota.lib.go/commit/63fcd33b000cd1511e126e8dc02b19100608e2de, seems like the sandbox was just not updated.
As far as string vs. int goes, I'm open to change that to comply with the actual IRI API.
Thanks @knarz! Who is responsible for updating the sandbox?
WRT string vs. int, I think most libraries will work fine either way. There might be an edge case where the JS lib is trying to process a getBalances
response from the Sandbox that contains really really big numbers (see https://stackoverflow.com/a/9643650/5568265). That's the only issue I can think of.
btw did this fix ever get deployed to the Sandbox node?
From https://github.com/iotaledger/iota.lib.py/issues/55:
Note that the first letter of each JSON key is capitalised, and the balances are returned as integers instead of strings.