Skip to content

Conversation

gtsonevv
Copy link
Collaborator

@gtsonevv gtsonevv commented Jan 14, 2025

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • Commit messages follow the conventional commits spec
  • If this is a code change: I have written unit tests.
  • If this changes code in a published package: I have run pnpm changeset to create a changeset JSON document appropriate for this change.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

Test Plan

Related issues/PRs

Copy link

changeset-bot bot commented Jan 14, 2025

🦋 Changeset detected

Latest commit: ea7b0de

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@near-js/accounts Minor
@near-js/wallet-account Minor
@near-js/providers Minor
near-api-js Patch
@near-js/client Patch

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

@gtsonevv gtsonevv requested a review from gagdiez January 14, 2025 12:20
const nonce = Number(accessKey.access_key.nonce) + 1;
const transaction = createTransaction(this.accountId, publicKey, receiverId, nonce, actions, blockHash);

this.walletConnection.requestSignTransactions({
Copy link
Contributor

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({
Copy link
Contributor

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);
Copy link
Contributor

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({
Copy link
Contributor

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?

@gagdiez
Copy link
Contributor

gagdiez commented Jul 4, 2025

walletConnection is no longer existing, for which I will proceed to close this PR

@gagdiez gagdiez closed this Jul 4, 2025
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