-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(aepp): use networkId in rpc tx signing #1565
Conversation
6cbeae3
to
82c38b0
Compare
src/account/rpc.ts
Outdated
@@ -3,6 +3,16 @@ import { METHODS } from '../utils/aepp-wallet-communication/schema' | |||
import { NotImplementedError } from '../utils/errors' | |||
import { EncodedData } from '../utils/encoder' | |||
|
|||
// TODO: Remove networkId and use type Parameters<AccountBase['signTransaction']>[1] | |||
// networkId required to maintain backward compatablity with wallets using SDK v11.0.1 and below | |||
type RpcSignTransaction = Parameters<AccountBase['signTransaction']>[1] & { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
signTransaction
already accepts networkId
and I'm not planning to change it, so this type is not necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the tag deprecated
to the RpcSignTransaction filed networkId
to inform the developers. The main signTransaction
still accepts the networkId
but we have removed it from the RPC call. I believe it is important to mark the field networkId
as deprecated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see, You have marked it deprecated another way. I hope that raises a warning while developers trying to use the field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is more of an internal interface, I'm not expecting developers to use it directly, so the deprecated
mark is only needed for us.
networkId is marked deprecated. using now to make sdk v12 aepps compatible with wallets using v11.0.1 and below.
82c38b0
to
916dba0
Compare
networkId is marked deprecated but using now to make SDK v12 aepps compatible with wallets using v11.0.1 and below.
Closes #1559