Skip to content

Commit

Permalink
ALL-5473 - Fix SOL duplicate txID on other places
Browse files Browse the repository at this point in the history
  • Loading branch information
Hathoriel committed Mar 5, 2024
1 parent d562121 commit cad73e8
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 15 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tatumio",
"version": "2.2.54",
"version": "2.2.55",
"license": "MIT",
"repository": "https://github.com/tatumio/tatum-js",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import web3, {
Connection,
LAMPORTS_PER_SOL,
PublicKey,
sendAndConfirmTransaction,
SYSVAR_INSTRUCTIONS_PUBKEY,
Transaction,
TransactionInstruction,
Expand Down Expand Up @@ -239,7 +240,7 @@ export const solanaMarketPlaceService = (

const signers = [web3.generateKeyPair(params.fromPrivateKey)]
return {
txId: await connection.sendTransaction(transaction, signers),
txId: await sendAndConfirmTransaction(connection, transaction, signers),
contractAddress: auctionHouse.toBase58(),
feeAccount: feeAccount.toBase58(),
treasuryAccount: treasuryAccount.toBase58(),
Expand Down Expand Up @@ -315,7 +316,7 @@ export const solanaMarketPlaceService = (

const signers = [web3.generateKeyPair(params.fromPrivateKey)]
return {
txId: await connection.sendTransaction(transaction, signers),
txId: await sendAndConfirmTransaction(connection, transaction, signers),
}
}

Expand Down Expand Up @@ -446,7 +447,7 @@ export const solanaMarketPlaceService = (
}

return {
txId: await connection.sendTransaction(transaction, signers),
txId: await sendAndConfirmTransaction(connection, transaction, signers),
listingId: receipt.toBase58(),
}
}
Expand Down Expand Up @@ -804,7 +805,7 @@ export const solanaMarketPlaceService = (
}

return {
txId: await connection.sendTransaction(transaction, signers),
txId: await sendAndConfirmTransaction(connection, transaction, signers),
}
}

Expand Down Expand Up @@ -895,7 +896,7 @@ export const solanaMarketPlaceService = (
}

return {
txId: await connection.sendTransaction(transaction, signers),
txId: await sendAndConfirmTransaction(connection, transaction, signers),
}
}

Expand Down Expand Up @@ -951,7 +952,7 @@ export const solanaMarketPlaceService = (
const signers = [web3.generateKeyPair(fromPrivateKey)]

return {
txId: await connection.sendTransaction(transaction, signers),
txId: await sendAndConfirmTransaction(connection, transaction, signers),
}
}

Expand Down Expand Up @@ -1005,7 +1006,7 @@ export const solanaMarketPlaceService = (
const signers = [web3.generateKeyPair(fromPrivateKey)]

return {
txId: await connection.sendTransaction(transaction, signers),
txId: await sendAndConfirmTransaction(connection, transaction, signers),
}
}

Expand Down
15 changes: 11 additions & 4 deletions packages/blockchain/solana/src/lib/services/solana.nft.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ import {
VerifySolanaNFTKMS,
} from '@tatumio/api-client'
import { Blockchain } from '@tatumio/shared-core'
import { Keypair, PublicKey, SystemProgram, Transaction, TransactionInstruction } from '@solana/web3.js'
import {
Keypair,
PublicKey,
sendAndConfirmTransaction,
SystemProgram,
Transaction,
TransactionInstruction,
} from '@solana/web3.js'
import {
createInitializeMintInstruction,
createMintToInstruction,
Expand Down Expand Up @@ -82,7 +89,7 @@ const transferSignedTransaction = async (
signers.push(web3.generateKeyPair(body.feePayerPrivateKey))
}
return {
txId: await connection.sendTransaction(transaction, signers),
txId: await sendAndConfirmTransaction(connection, transaction, signers),
}
}

Expand Down Expand Up @@ -278,7 +285,7 @@ const burnSignedTransaction = async (
signers.push(web3.generateKeyPair(body.feePayerPrivateKey))
}
return {
txId: await connection.sendTransaction(transaction, signers),
txId: await sendAndConfirmTransaction(connection, transaction, signers),
}
}

Expand Down Expand Up @@ -328,7 +335,7 @@ const verifySignedTransaction = async (
signers.push(web3.generateKeyPair(body.feePayerPrivateKey))
}
return {
txId: await connection.sendTransaction(transaction, signers),
txId: await sendAndConfirmTransaction(connection, transaction, signers),
}
}

Expand Down
6 changes: 3 additions & 3 deletions packages/blockchain/solana/src/lib/services/solana.spl.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { SolanaWeb3 } from './solana.web3'
import { ApiServices, ChainDeploySolanaSplKMS, ChainTransferSolanaSplKMS } from '@tatumio/api-client'
import { Blockchain } from '@tatumio/shared-core'
import { Keypair, PublicKey, SystemProgram, Transaction } from '@solana/web3.js'
import { Keypair, PublicKey, sendAndConfirmTransaction, SystemProgram, Transaction } from '@solana/web3.js'
import {
createInitializeMintInstruction,
createMintToInstruction,
Expand Down Expand Up @@ -63,7 +63,7 @@ const transferSignedTransaction = async (
signers.push(web3.generateKeyPair(body.feePayerPrivateKey))
}
return {
txId: await connection.sendTransaction(transaction, signers),
txId: await sendAndConfirmTransaction(connection, transaction, signers),
}
}

Expand Down Expand Up @@ -129,7 +129,7 @@ const deploySignedTransaction = async (
signers.push(web3.generateKeyPair(body.feePayerPrivateKey))
}
return {
txId: await connection.sendTransaction(transaction, signers),
txId: await sendAndConfirmTransaction(connection, transaction, signers),
contractAddress: mint.publicKey.toBase58(),
}
}
Expand Down

0 comments on commit cad73e8

Please sign in to comment.