Skip to content

Commit

Permalink
chore: submit transactions through the wallet by default
Browse files Browse the repository at this point in the history
  • Loading branch information
cjkoepke committed Sep 17, 2024
1 parent c951eec commit 56f8522
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/blaze-sdk/src/blaze.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ export class Blaze<ProviderType extends Provider, WalletType extends Wallet> {
* @returns {Promise<TransactionId>} - The transaction ID.
* @throws {Error} If the transaction submission fails.
* @description This method sends the provided transaction to the blockchain network
* using the configured provider.
* using the configured wallet, or the configured provider if set.
*/
async submitTransaction(tx: Transaction): Promise<TransactionId> {
return this.provider.postTransactionToChain(tx);
async submitTransaction(tx: Transaction, useProvider?: boolean): Promise<TransactionId> {
return useProvider ? this.provider.postTransactionToChain(tx) : this.wallet.postTransaction(tx);
}
}

0 comments on commit 56f8522

Please sign in to comment.