fix: avoid double spend in sendAndConfirmTransaction

This commit is contained in:
Justin Starry
2020-06-15 18:32:57 +08:00
committed by Justin Starry
parent d77818c18b
commit f31f66a7c3
5 changed files with 53 additions and 44 deletions

View File

@@ -6,6 +6,13 @@ import type {ConfirmOptions} from '../connection';
/**
* Send and confirm a raw transaction
*
* If `confirmations` count is not specified, wait for transaction to be finalized.
*
* @param {Connection} connection
* @param {Buffer} rawTransaction
* @param {ConfirmOptions} [options]
* @returns {Promise<TransactionSignature>}
*/
export async function sendAndConfirmRawTransaction(
connection: Connection,