Discussions

Ask a Question
Back to All

[accept Hook] - Cannot read property 'toBytesSink' of undefined

Hi, I am learning about Hooks and I wanted to try first with something simple and the "accept" hook.

I am using your code in accept.js and when I run it with "node accept.js ssXUB..." I get the following error:

TypeError: Cannot read property 'toBytesSink' of undefined
at BinarySerializer.writeFieldAndValue (/Users/fuzio/Documents/Ripple/Github/webassembly-typescript/node_modules/ripple-binary-codec/dist/serdes/binary-serializer.js:125:32)
at /Users/fuzio/Documents/Ripple/Github/webassembly-typescript/node_modules/ripple-binary-codec/dist/types/st-object.js:130:19
at Array.forEach ()
at Function.STObject.from (/Users/fuzio/Documents/Ripple/Github/webassembly-typescript/node_modules/ripple-binary-codec/dist/types/st-object.js:128:16)
at serializeObject (/Users/fuzio/Documents/Ripple/Github/webassembly-typescript/node_modules/ripple-binary-codec/dist/binary.js:59:32)
at signingData (/Users/fuzio/Documents/Ripple/Github/webassembly-typescript/node_modules/ripple-binary-codec/dist/binary.js:75:12)
at Object.encodeForSigning (/Users/fuzio/Documents/Ripple/Github/webassembly-typescript/node_modules/ripple-binary-codec/dist/index.js:37:12)
at computeSignature (/Users/fuzio/Documents/Ripple/Github/webassembly-typescript/node_modules/ripple-lib/dist/npm/transaction/sign.js:36:41)
at signWithKeypair (/Users/fuzio/Documents/Ripple/Github/webassembly-typescript/node_modules/ripple-lib/dist/npm/transaction/sign.js:59:42)
at RippleAPI.sign (/Users/fuzio/Documents/Ripple/Github/webassembly-typescript/node_modules/ripple-lib/dist/npm/transaction/sign.js:163:16)

Have you already faced this issue?

Thank you