Skip to content

chore: support AA addresses in /send-transaction #548

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 1 commit into from
Jun 18, 2024

Conversation

arcoraven
Copy link
Contributor

@arcoraven arcoraven commented Jun 17, 2024

Support the x-account-address header in /backend-wallet/:chain/send-transaction


PR-Codex overview

The focus of this PR is to update the wallet header schema to include an additional field x-account-address for sending transactions.

Detailed summary

  • Updated walletHeaderSchema to walletWithAAHeaderSchema
  • Added x-account-address field in the header for account address
  • Modified transaction queuing based on the presence of accountAddress in the header

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

chainId: chainId.toString(),
signerAddress: fromAddress,
accountAddress,
target: toAddress,
Copy link
Member

Choose a reason for hiding this comment

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

arent these all optional? prob dont need the if / else right? just pass everything through even if undefined

Copy link
Contributor Author

@arcoraven arcoraven Jun 17, 2024

Choose a reason for hiding this comment

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

There's some code like this:

if (tx.accountAddress && tx.signerAddress) {
  // process as a userOp
}

In this case accountAddress is undefined so it would be okay, but I'd like to minimize the chance any code assumes a userOp if signerAddress is set (and in this case we'd be setting signerAddress for EOA transactions too).

@arcoraven arcoraven merged commit f03b5ea into main Jun 18, 2024
4 checks passed
@arcoraven arcoraven deleted the ph/sendTransactionAA branch June 18, 2024 02:08
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