#Problem with transaction signing on testnet 22 with stellar SDK 13.0.0

1 messages · Page 1 of 1 (latest)

cinder pulsar
#

I get TypeError: Cannot read properties of undefined (reading 'switch') when trying to sign a transaction with my generated bindings. I appended the decoded xdr. Tested it in Labratory, looks fine.

operations.auth.credentials is set in xdr but getCredentials in stellar-sdk seems to return undefined and afterwards switch() is called and result in error

median quiver
#

XDR has been updated in p22, are you using the most recent SDK version?

cinder pulsar
#

yes, stellar-sdk 13.0.0

#

also the bindings newly generated with the new version

dapper parcel
#

Do you generate the bindings with stellar cli? If so is that on v22?

#

I got the same TypeError as I was running on 22.0.0-rc.1

#

switching to 22.0.0 stable fixed it

dapper parcel
cinder pulsar
cinder pulsar
#

It's weird that signTransaction even returns signerAddress, which is my publicKey but then can't get credentials internally

cinder pulsar
#

I'm wondering if the operations.auth.credentials: "source_account" refers to tx.source_account (which is set) or operations.source_account (which is null)

median quiver
#

it 'refers' to the source account of the operation, but the protocol considers the operation source account to be equivalent to the tx source account in case if operation source account is not set (null). however, that's nothing to do with the XDR decoding and with protocol 22.

#

unfortunately I can't help with js issues though

robust gust
#

What Node version? I saw this start popping up in v22 for some reason but haven't had time to investigate.

robust gust
#

Can you try v20?

cinder pulsar
sly burrow