Skip to content

Commit

Permalink
ALL-5473 - Fix SOL duplicate txID (#1074)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hathoriel authored Mar 5, 2024
1 parent 1ea5099 commit d562121
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 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.53",
"version": "2.2.54",
"license": "MIT",
"repository": "https://github.com/tatumio/tatum-js",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { FEE_PAYER } from '../services/solana.utils'

jest.setTimeout(99999)

describe.skip('SolanaSDK - tx', () => {
describe('SolanaSDK - tx', () => {
const sdk = TatumSolanaSDK({
apiKey: REPLACE_ME_WITH_TATUM_API_KEY,
provider: 'https://api.devnet.solana.com',
Expand Down Expand Up @@ -366,7 +366,7 @@ describe.skip('SolanaSDK - tx', () => {
})
})

describe('External signing', () => {
describe.skip('External signing', () => {
it('should send SPL token with fee payer', async () => {
const tx = await sdk.spl.send.transferSignedTransaction(
{
Expand Down
10 changes: 8 additions & 2 deletions packages/blockchain/solana/src/lib/services/solana.tx.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import { LAMPORTS_PER_SOL, PublicKey, SystemProgram, Transaction } from '@solana/web3.js'
import {
LAMPORTS_PER_SOL,
PublicKey,
sendAndConfirmTransaction,
SystemProgram,
Transaction,
} from '@solana/web3.js'
import { SolanaService, TransferSolanaBlockchainKMS } from '@tatumio/api-client'
import { SolanaWeb3 } from './solana.web3'
import BigNumber from 'bignumber.js'
Expand Down Expand Up @@ -51,7 +57,7 @@ const transferSignedTransaction = async (
}

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

Expand Down

0 comments on commit d562121

Please sign in to comment.