Closed divyangkhatri closed 8 months ago
Please check https://github.com/stellar/js-xdr/issues/117
Depending on how you load the stellar-sdk
, if you are using a browser, you will need to wait for a new version to be released. If it is introduced in another way, you can patch the Buffer
as shown here, which should solve your problem.
Describe the bug Transaction builder does not encode/decode proper XDR base64 string in react-native. Due to this transaction API throw 400 "Transaction Malformed" error. I have read the note that only "JSC" and "V8" compiler will properly work. But in react-native greater than 70 it uses hermes engine. I have implemented "stellar-sdk": "^10.4.1" version in last December and at that time everyting was working. I faced issues in createWallet using this
StellarHDWallet.fromMnemonic(mnemonic);
. So, I updated to latest package. I checked the code in node-js and it is working fine. Note this code return proper Buffertransaction.hash();
but this code does not return proper buffertransaction.toEnvelope().v1().toXDR('raw');
What version are you on? stellar-base: @stellar/js-xdr= ^3.1.0 @stellar/stellar-base = ^11.0.0 @stellar/stellar-sdk=^11.2.2 react-native: 0.72.7
To Reproduce Use following code to reproduce
Expected behavior encode or decode XDR should return the proper base64