mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-09 12:29:31 +00:00
Fix Sending SPL token issue (#1924)
* Fix creating ATA * give more buffer for the transaction to be broadcast [skip ci]
This commit is contained in:
parent
5ea443235d
commit
52e20e1a44
1 changed files with 8 additions and 2 deletions
|
@ -515,7 +515,7 @@ class SolanaWalletClient {
|
||||||
final instruction = AssociatedTokenAccountInstruction.createAccount(
|
final instruction = AssociatedTokenAccountInstruction.createAccount(
|
||||||
mint: mint,
|
mint: mint,
|
||||||
address: derivedAddress,
|
address: derivedAddress,
|
||||||
owner: ownerKeypair.publicKey,
|
owner: destinationOwner,
|
||||||
funder: ownerKeypair.publicKey,
|
funder: ownerKeypair.publicKey,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -541,6 +541,8 @@ class SolanaWalletClient {
|
||||||
data: null,
|
data: null,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
await Future.delayed(Duration(seconds: 5));
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw SolanaCreateAssociatedTokenAccountException(e.toString());
|
throw SolanaCreateAssociatedTokenAccountException(e.toString());
|
||||||
|
@ -583,10 +585,14 @@ class SolanaWalletClient {
|
||||||
latestBlockhash: latestBlockhash,
|
latestBlockhash: latestBlockhash,
|
||||||
);
|
);
|
||||||
|
|
||||||
sendTx() async => await sendTransaction(
|
sendTx() async {
|
||||||
|
await Future.delayed(Duration(seconds: 3));
|
||||||
|
|
||||||
|
return await sendTransaction(
|
||||||
signedTransaction: signedTx,
|
signedTransaction: signedTx,
|
||||||
commitment: commitment,
|
commitment: commitment,
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
final pendingTransaction = PendingSolanaTransaction(
|
final pendingTransaction = PendingSolanaTransaction(
|
||||||
amount: inputAmount,
|
amount: inputAmount,
|
||||||
|
|
Loading…
Reference in a new issue