Skip to content

Commit

Permalink
revert bulkSendTransactions logic (#428)
Browse files Browse the repository at this point in the history
  • Loading branch information
bryzettler authored Aug 15, 2023
1 parent c6f92bf commit 8ac7bb0
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/store/slices/solanaSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
import * as lz from '@helium/lazy-distributor-sdk'
import {
bulkSendRawTransactions,
bulkSendTransactions,
chunks,
sendAndConfirmWithRetry,
} from '@helium/spl-utils'
Expand Down Expand Up @@ -142,7 +141,11 @@ export const makePayment = createAsyncThunk(
async ({ account, cluster, anchorProvider, paymentTxns }: PaymentInput) => {
if (!account?.solanaAddress) throw new Error('No solana account found')

const signatures = await bulkSendTransactions(anchorProvider, paymentTxns)
const signed = await anchorProvider.wallet.signAllTransactions(paymentTxns)
const signatures = await bulkSendRawTransactions(
anchorProvider.connection,
signed.map((s) => s.serialize()),
)

postPayment({ signatures, cluster })

Expand Down Expand Up @@ -274,7 +277,11 @@ export const claimRewards = createAsyncThunk(
{ dispatch },
) => {
try {
const signatures = await bulkSendTransactions(anchorProvider, txns)
const signed = await anchorProvider.wallet.signAllTransactions(txns)
const signatures = await bulkSendRawTransactions(
anchorProvider.connection,
signed.map((s) => s.serialize()),
)

postPayment({ signatures, cluster })

Expand Down

0 comments on commit 8ac7bb0

Please sign in to comment.