Closed matevz closed 6 months ago
Name | Link |
---|---|
Latest commit | b615766cfa39e9f7b233cd0cff6eed061952af6d |
Latest deploy log | https://app.netlify.com/sites/oasisprotocol-sapphire-paratime/deploys/65eae49b5d9c2d000834118f |
This current API seems confusing and error-prone. It looks like it has two hooks to manipulate transactions:
TransactOpts
instance with a wrapped signer that also performs encryption.SendTransaction
which performs mangling, but in this case it is already too late in the pipeline to actually return the modified transaction! So in case this second fallback (e.g. TransactOpts
not properly set, instead going through SendTransaction
directly) is used the transaction that has actually been sent to Sapphire cannot be retrieved by the developer. Then there is additional hacky logic to detect whether a transaction was previously mangled by the wrapped signer so that it is not wrapped again.I think it would be better if SendTransaction
was not overriden and in case you want encrypted transactions you either need to encrypt them manually or use the Transactor
.
I suppose this'll effect a minor version bump?
This PR: