Conversation
|
I guess that in the worst case setting the headers can be handled on libcore side (the http requests for the http client impl have setters to customize the headers), but in order to know if we're missing some header setters we'll have to test at least all c++-handled currencies. For Cosmos, anything that doesn't silently drop requests (when too many requests come and fill the job queue) should be enough to fix the initial synchronization bug |
|
@juan-cortes from my dusty memories, the code you mention has to do with Algorand, where the broadcasted tx payloads are in binary format and not json like many other coins. For Algorand txs broadcasts we do set the If this patch in (+1 that all C++ coins should be tested with this PR) |
|
let's try to provide tomorrow a testing build that QA can try out. make sure to be in sync with latest's master & let's not forget that we would need to test Cosmos Testnet too. actually there is 2 stategies, either we test it all-in with the new cosmos work. or we test the PREVIOUS cosmos implementation (e.g. to confirm bug is fixed). |
|
Closes #71 by the way |
|
Actually it looks like |
|
@juan-cortes let's try to come back on a plan for this in next sprint. |
|
Summary of today's findings, my assumption that hardcoding the application/json header for the content type would break things turned out to be correct Long story short, it all works right now, ready for QA as far as I'm concerned. cc @gre |
|
Breaks on libcore involved swaps. |
Update
The library allows us to not specify the content type and allow it to be inferred. The first version that was setting it to json was breaking for algorand since the payload is in binary format. Removing the
MediaType.parse("application/json")part of the code and simply passing null allows the request to succeed and, as seen in the traces below, it sets the content type when needed.Add accounts / Sync
Send
Following a gist from @gre this is a rewrite simplified version of the
HttpClientImplclass based on the logic from react native itself.I'm particularly worried about breaking whatever this snippet from @haammar-ledger and @pollastri-pierre was doing, but perhaps we don't have to worry about that with this implementation was doing.lib-ledger-core-react-native-bindings/android/src/main/java/com/ledger/reactnative/HttpClientImpl.java
Lines 61 to 63 in bfebc65
https://ledgerhq.atlassian.net/browse/LL-4389