From 69aec4c44a89c8a72a6eb38de0ef5a00f1fb8ea4 Mon Sep 17 00:00:00 2001 From: Husien vora Date: Fri, 16 Aug 2024 15:30:14 +0530 Subject: [PATCH] Implemented functionality to broadcast a transaction --- CHANGELOG.md | 1 + src/index.js | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f4851d..8b3d8b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,3 +7,4 @@ - Implemented functionality to sign a message - Implemented functionality to get coin balance for a wallet - Implemented functionality to get gass fees +- Implemented functionality to broadcast a transaction diff --git a/src/index.js b/src/index.js index b781663..83637dc 100644 --- a/src/index.js +++ b/src/index.js @@ -505,7 +505,11 @@ class KeyringController extends EventEmitter { this.memStore.updateState({ isUnlocked: true }); this.emit("unlock"); } - + /** + * + * Method to broadcast a transaction + * + */ async sendTransaction(signedTx, web3) { const receipt = await web3.eth.sendSignedTransaction(signedTx); return { transactionDetails: receipt.transactionHash };