You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The return type of web3.eth.accounts.signTransaction(tx,privateKey)
should be Promise<{ messageHash, v, r, s, rawTransaction }>,
not Promise<string> | Signature
Expected behavior
The return type of
web3.eth.accounts.signTransaction(tx,privateKey)
should be
Promise<{ messageHash, v, r, s, rawTransaction }>
,not
Promise<string> | Signature
Actual behavior
web3.eth.accounts.signTransaction(tx,privateKey)
returnsstring | Signature
Steps to reproduce the behavior
The following code works perfectly but
signedTx.rawTransaction
throws a type error during typescript compilation.Error Logs
{"message": "Property 'rawTransaction' does not exist on type 'string | Signature'.\n Property 'rawTransaction' does not exist on type 'string'.", }
Versions
Node v11.7.0
npm v6.7.0
web3 v1.0.0-beta.34
The text was updated successfully, but these errors were encountered: