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

Account.sendMoney transaction execution level #1346

Closed
1 of 4 tasks
pustovalov opened this issue May 14, 2024 · 0 comments · Fixed by #1347
Closed
1 of 4 tasks

Account.sendMoney transaction execution level #1346

pustovalov opened this issue May 14, 2024 · 0 comments · Fixed by #1347
Labels
bug Something isn't working

Comments

@pustovalov
Copy link

pustovalov commented May 14, 2024

Prerequisites

  • I'm using the latest version of near-api-js.
  • I have tried to start with a fresh project and reproduce the defect with minimal code changes.
  • I have read the console error messages carefully (if applicable).

Description

Hi,

In nearcore 1.39.0, the default behavior for transaction execution level was changed to no longer waits for refund receipts

 #[default]
 ExecutedOptimistic

near/nearcore#10948
https://docs.near.org/api/rpc/transactions#tx-status-result

However, in near-api-js, it still uses FINAL

async sendTransaction(signedTransaction: SignedTransaction): Promise<FinalExecutionOutcome> {
return this.sendTransactionUntil(signedTransaction, 'FINAL');
}

Can this be changed to EXECUTED_OPTIMISTIC for all transactions or for Account.sendMoney?

Steps to reproduce

await senderAccount.sendMoney(receiver, amount)

Expected behavior

    async sendTransaction(signedTransaction: SignedTransaction): Promise<FinalExecutionOutcome> {
        return this.sendTransactionUntil(signedTransaction, 'EXECUTED_OPTIMISTIC');
    }

Actual behavior

    async sendTransaction(signedTransaction: SignedTransaction): Promise<FinalExecutionOutcome> {
        return this.sendTransactionUntil(signedTransaction, 'FINAL');
    }

Self-service

  • I'd be willing to fix this bug myself.
@pustovalov pustovalov added the bug Something isn't working label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant