Skip to content

Suppor transaction input and payload input for signTransaction #13

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

Merged
merged 2 commits into from
Sep 6, 2024

Conversation

hardsetting
Copy link
Contributor

@hardsetting hardsetting commented Sep 5, 2024

Part of a PR series to enable transaction input when using signTransaction

Previously, the only supported input type was an AnyRawTransaction instance.

The problem with this is that we're requiring the dapp to generate the transaction (and possibly payload) right before calling signTransaction.

This requires async calls which don't play well with certain browsers and popups.

@hardsetting hardsetting requested a review from 0xmaayan September 5, 2024 20:50
@hardsetting hardsetting self-assigned this Sep 5, 2024
@hardsetting hardsetting force-pushed the gabriele/sign_transaction_v1.1 branch from 8c56f45 to 8f4c0b8 Compare September 6, 2024 19:12
@@ -1,7 +1,7 @@
{
"name": "@aptos-labs/wallet-standard",
"description": "Aptos wallet standard",
"version": "0.1.0",
"version": "0.2.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just in case since I changed some types :)

export type AptosSignTransactionFeatureV1_1 = {
[AptosSignTransactionNamespace]: {
version: '1.1'
signTransaction: AptosSignTransactionMethod & AptosSignTransactionMethodV1_1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a minor bump, we should support exactly the same input/output as before, and can add to it.
It works exactly as expected when implementing the interface e.g. when using 1.1 you NEED to specify both interfaces

and eventually, version 2.0 will drop old interfaces

@hardsetting hardsetting changed the title Supporting payload generation input for signTransaction Suppor transaction input and payload input for signTransaction Sep 6, 2024
Copy link
Collaborator

@0xmaayan 0xmaayan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have we verified nothing breaks in the wallet adapter?

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.

2 participants