Skip to content

Commit

Permalink
Merge pull request #2007 from Web3Auth/fix/Fix-Demo-app-CI-build-fail
Browse files Browse the repository at this point in the history
Fix vue demo app solana type
  • Loading branch information
chaitanyapotti authored Nov 7, 2024
2 parents 4fd02c6 + ca76e43 commit 8793f76
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions demo/vue-app-new/src/services/solHandlers.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { Connection, LAMPORTS_PER_SOL, PublicKey, SystemProgram, Transaction } from "@solana/web3.js";
import { CustomChainConfig, IProvider, log } from "@web3auth/base";
import { SolanaWallet } from "@web3auth/solana-provider";
import { SolanaWallet, TransactionOrVersionedTransaction } from "@web3auth/solana-provider";
import base58 from "bs58";

const getConnection = async (provider: IProvider): Promise<Connection> => {
Expand Down Expand Up @@ -65,7 +65,7 @@ export const signAndSendTransaction = async (provider: IProvider, uiConsole: any
feePayer: new PublicKey(pubKey[0]),
}).add(transactionInstruction);

const signature = await solWeb3.signAndSendTransaction(transaction);
const signature = await solWeb3.signAndSendTransaction(transaction as unknown as TransactionOrVersionedTransaction);
uiConsole("signature", signature);
} catch (error) {
log.error("Error", error);
Expand Down Expand Up @@ -93,7 +93,7 @@ export const signTransaction = async (provider: IProvider, uiConsole: any) => {
feePayer: new PublicKey(pubKey[0]),
}).add(transactionInstruction);

const signedTx = await solWeb3.signTransaction(transaction);
const signedTx = await solWeb3.signTransaction(transaction as unknown as TransactionOrVersionedTransaction);
log.info("signedTx", signedTx);
uiConsole("signature", signedTx);
return { signature: signedTx };
Expand Down Expand Up @@ -126,9 +126,9 @@ export const signAllTransactions = async (provider: IProvider, uiConsole: any) =
log.info("blockhash", blockhash);

const signedTx = await solWeb3.signAllTransactions([
getNewTx(publicKeys, blockhash),
getNewTx(publicKeys, blockhash),
getNewTx(publicKeys, blockhash),
getNewTx(publicKeys, blockhash) as unknown as TransactionOrVersionedTransaction,
getNewTx(publicKeys, blockhash) as unknown as TransactionOrVersionedTransaction,
getNewTx(publicKeys, blockhash) as unknown as TransactionOrVersionedTransaction,
]);
log.info("signedTx", signedTx);
uiConsole("signature", signedTx);
Expand Down

0 comments on commit 8793f76

Please sign in to comment.