Closed NatPDeveloper closed 3 years ago
Transaction was not being passed as desired Uint8Array
.
What I was passing:
{ signatures:
[ 'SIG_K1_K89u577E6LoGeiHYJEiisCfB4jmFkfhgCtGG1JEgUs9pekedT6sv16Ym8gckhHeRTDjjw39BGm4zBviayMEEoytFBaMFAs' ],
compression: 0,
packed_context_free_data: '',
packed_trx:
'b811b55f12000e4465a200000000010000000000ea305500409e9a2264b89a010000000000ea305500000000a8ed3232660000000000ea3055008037f500ea3055010000000100026d841bae7c1eb15f2ec2582cc2a95f295df117c9a5e0ae28099aed76df4af32b01000000010000000100026d841bae7c1eb15f2ec2582cc2a95f295df117c9a5e0ae28099aed76df4af32b0100000000' }
What it wants:
{ signatures:
[ 'SIG_K1_KbEvTaa9j51UFTBJ23QU59xgpFpiREg58PjzyuTgXxB4BuS9zSsHyomEFa8RPkC2cBjJ5ppTNpSzPur6Lq842H82b9jPHB' ],
serializedTransaction:
Uint8Array [
92,
17,
...
serializedContextFreeData: null }
To get there:
const { hexToUint8Array } = require("eosjs/dist/eosjs-serialize");
body = {
signatures: body.signatures,
compression: body.compression || 0,
serializedTransaction: hexToUint8Array(body.packed_context_free_data),
serializedContextFreeData: hexToUint8Array(body.packed_context_free_data)
}
Now getting
(node:10175) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:10175) UnhandledPromiseRejectionWarning: RangeError: Maximum call stack size exceeded
Unrelated for now closing.
Version of EOSJS "eosjs": "^21.0.3",
Describe the bug Getting error pushing properly formatted serialized trx.
To Reproduce Steps to reproduce the behavior: Try and push signed trx with 21.0.3
pushSignedTransaction
on API orpush_transaction
on RPC.Expected behavior Trx processes.
Desktop (please complete the following information):
Additional context Tried 20.0.2 beta as suggested in other issues, did not work either.
I'm integrating a push guarantee lib: https://github.com/liquidapps-io/eosio-push-guarantee/blob/main/src/index.ts#L31
This works with the example in the repo fine, but when using in production on our DSPs, things get weird.
Comparing the RPCs between my tests (kylin) and local tests: https://www.diffchecker.com/P3vAkKlQ
If I try and push manually I get