Skip to content
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

Merged
merged 1 commit into from
Jun 17, 2022

Conversation

subhod-i
Copy link
Collaborator

networkId is marked deprecated but using now to make SDK v12 aepps compatible with wallets using v11.0.1 and below.
Closes #1559

@subhod-i subhod-i requested a review from davidyuk June 16, 2022 09:05
@subhod-i subhod-i mentioned this pull request Jun 16, 2022
17 tasks
Base automatically changed from fix/examples to develop June 17, 2022 04:42
@@ -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] & {
Copy link
Member

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

Copy link
Collaborator Author

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

Copy link
Collaborator Author

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.

Copy link
Member

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.
@davidyuk davidyuk merged commit a7ef9f1 into develop Jun 17, 2022
@davidyuk davidyuk deleted the fix/cross-aepp-wallet-comp branch June 17, 2022 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Examples Aepp(SDK v12) is not working with web wallet extension(SDK v11)
2 participants