mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-08 11:59:23 +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(
|
||||
mint: mint,
|
||||
address: derivedAddress,
|
||||
owner: ownerKeypair.publicKey,
|
||||
owner: destinationOwner,
|
||||
funder: ownerKeypair.publicKey,
|
||||
);
|
||||
|
||||
|
@ -541,6 +541,8 @@ class SolanaWalletClient {
|
|||
data: null,
|
||||
),
|
||||
);
|
||||
|
||||
await Future.delayed(Duration(seconds: 5));
|
||||
}
|
||||
} catch (e) {
|
||||
throw SolanaCreateAssociatedTokenAccountException(e.toString());
|
||||
|
@ -583,10 +585,14 @@ class SolanaWalletClient {
|
|||
latestBlockhash: latestBlockhash,
|
||||
);
|
||||
|
||||
sendTx() async => await sendTransaction(
|
||||
sendTx() async {
|
||||
await Future.delayed(Duration(seconds: 3));
|
||||
|
||||
return await sendTransaction(
|
||||
signedTransaction: signedTx,
|
||||
commitment: commitment,
|
||||
);
|
||||
}
|
||||
|
||||
final pendingTransaction = PendingSolanaTransaction(
|
||||
amount: inputAmount,
|
||||
|
|
Loading…
Reference in a new issue