mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 03:59:23 +00:00
chore: Switch solana commitment to confirmed to reduced blockhash expiration (#1313)
This commit is contained in:
parent
05728eeb54
commit
206276f0e7
1 changed files with 5 additions and 2 deletions
|
@ -263,7 +263,7 @@ class SolanaWalletClient {
|
||||||
required Ed25519HDKeyPair ownerKeypair,
|
required Ed25519HDKeyPair ownerKeypair,
|
||||||
List<String> references = const [],
|
List<String> references = const [],
|
||||||
}) async {
|
}) async {
|
||||||
const commitment = Commitment.finalized;
|
const commitment = Commitment.confirmed;
|
||||||
|
|
||||||
final latestBlockhash =
|
final latestBlockhash =
|
||||||
await _client!.rpcClient.getLatestBlockhash(commitment: commitment).value;
|
await _client!.rpcClient.getLatestBlockhash(commitment: commitment).value;
|
||||||
|
@ -468,7 +468,10 @@ class SolanaWalletClient {
|
||||||
required SignedTx signedTransaction,
|
required SignedTx signedTransaction,
|
||||||
required Commitment commitment,
|
required Commitment commitment,
|
||||||
}) async {
|
}) async {
|
||||||
final signature = await _client!.rpcClient.sendTransaction(signedTransaction.encode());
|
final signature = await _client!.rpcClient.sendTransaction(
|
||||||
|
signedTransaction.encode(),
|
||||||
|
preflightCommitment: commitment,
|
||||||
|
);
|
||||||
|
|
||||||
_client!.waitForSignatureStatus(signature, status: commitment);
|
_client!.waitForSignatureStatus(signature, status: commitment);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue