-
Notifications
You must be signed in to change notification settings - Fork 249
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
Extend wallet-account to support signAndSendTransactionAsync, signTransaction, sendTransaction & signDelegateAction #1449
base: master
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: ea7b0de The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
const nonce = Number(accessKey.access_key.nonce) + 1; | ||
const transaction = createTransaction(this.accountId, publicKey, receiverId, nonce, actions, blockHash); | ||
|
||
this.walletConnection.requestSignTransactions({ |
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.
don't we need to be async as well? otherwise I think you are only making it async if there is a function call key available
const nonce = Number(accessKey.access_key.nonce) + 1; | ||
const transaction = createTransaction(this.accountId, publicKey, signedTx.transaction.receiverId, nonce, signedTx.transaction.actions, blockHash); | ||
|
||
this.walletConnection.requestSignTransactions({ |
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.
if you are sending a transaction to the network, there is no need to request another signature on it
const blockHash = baseDecode(block.header.hash); | ||
const publicKey = PublicKey.from(accessKey.public_key); | ||
const nonce = Number(accessKey.access_key.nonce) + 1; | ||
const transaction = createTransaction(this.accountId, publicKey, receiverId, nonce, actions, blockHash); |
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.
don't you need to create a Delegate Transaction?
const nonce = Number(accessKey.access_key.nonce) + 1; | ||
const transaction = createTransaction(this.accountId, publicKey, receiverId, nonce, actions, blockHash); | ||
|
||
this.walletConnection.requestSignTransactions({ |
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.
is this command valid for signing delegate transactions?
Pre-flight checklist
pnpm changeset
to create achangeset
JSON document appropriate for this change.Motivation
Test Plan
Related issues/PRs