Closed dlpigpen closed 2 years ago
The same issue in the file ethXnear.naturalNEAR.recover BorshError: Unexpected 19 bytes after deserialized data
ethXnear.naturalNEAR.recover BorshError: Unexpected 19 bytes after deserialized data
at deserialize (/node_modules/borsh/lib/index.js:405:15)
at Object.recover (/src/rainbown/near-ether/src/natural-near/sendToEthereum/index.ts:315:37)
It appears your NEAR transaction which started the transfer doesn't contain the recipient on Ethereum. Do you have the NEAR testnet transaction to reproduce ?
you can reproduce with txHash 'H6oYtGjZPtV2S74s32Nswrckah4eLGyeNB6u74X9sLnw'
The hash provided in an ETH transfer, so you should be using @near-eth/near-ether/bridged-ether/sendToEthereum
.
https://testnet.rainbowbridge.app/transfer/H6oYtGjZPtV2S74s32Nswrckah4eLGyeNB6u74X9sLnw
I think it made by a mistake. any way how to recover a tx hash without knowing type of transfer?
You could query the tx information to see which contract is being called, or just try/catch recover
from the different packages.
It comes from the line code in the file src/rainbown/nep141-erc20/src/bridged-nep141/sendToEthereum/index.ts:334:41)