Closed pustovalov closed 1 month ago
near-api-js
Hi,
In nearcore 1.39.0, the default behavior for transaction execution level was changed to no longer waits for refund receipts
no longer waits for refund receipts
#[default] ExecutedOptimistic
https://github.com/near/nearcore/pull/10948 https://docs.near.org/api/rpc/transactions#tx-status-result
However, in near-api-js, it still uses FINAL https://github.com/near/near-api-js/blob/b61b66d271146f0a1b5b88e75da06dffc354860e/packages/providers/src/json-rpc-provider.ts#L125-L127
FINAL
Can this be changed to EXECUTED_OPTIMISTIC for all transactions or for Account.sendMoney?
EXECUTED_OPTIMISTIC
Account.sendMoney
await senderAccount.sendMoney(receiver, amount)
async sendTransaction(signedTransaction: SignedTransaction): Promise<FinalExecutionOutcome> { return this.sendTransactionUntil(signedTransaction, 'EXECUTED_OPTIMISTIC'); }
async sendTransaction(signedTransaction: SignedTransaction): Promise<FinalExecutionOutcome> { return this.sendTransactionUntil(signedTransaction, 'FINAL'); }
Prerequisites
near-api-js
.Description
Hi,
In nearcore 1.39.0, the default behavior for transaction execution level was changed to
no longer waits for refund receipts
https://github.com/near/nearcore/pull/10948 https://docs.near.org/api/rpc/transactions#tx-status-result
However, in near-api-js, it still uses
FINAL
https://github.com/near/near-api-js/blob/b61b66d271146f0a1b5b88e75da06dffc354860e/packages/providers/src/json-rpc-provider.ts#L125-L127Can this be changed to
EXECUTED_OPTIMISTIC
for all transactions or forAccount.sendMoney
?Steps to reproduce
Expected behavior
Actual behavior
Self-service