Skip to content

Commit 8793f76

Browse files
Merge pull request #2007 from Web3Auth/fix/Fix-Demo-app-CI-build-fail
Fix vue demo app solana type
2 parents 4fd02c6 + ca76e43 commit 8793f76

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

demo/vue-app-new/src/services/solHandlers.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable @typescript-eslint/no-explicit-any */
22
import { Connection, LAMPORTS_PER_SOL, PublicKey, SystemProgram, Transaction } from "@solana/web3.js";
33
import { CustomChainConfig, IProvider, log } from "@web3auth/base";
4-
import { SolanaWallet } from "@web3auth/solana-provider";
4+
import { SolanaWallet, TransactionOrVersionedTransaction } from "@web3auth/solana-provider";
55
import base58 from "bs58";
66

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

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

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

128128
const signedTx = await solWeb3.signAllTransactions([
129-
getNewTx(publicKeys, blockhash),
130-
getNewTx(publicKeys, blockhash),
131-
getNewTx(publicKeys, blockhash),
129+
getNewTx(publicKeys, blockhash) as unknown as TransactionOrVersionedTransaction,
130+
getNewTx(publicKeys, blockhash) as unknown as TransactionOrVersionedTransaction,
131+
getNewTx(publicKeys, blockhash) as unknown as TransactionOrVersionedTransaction,
132132
]);
133133
log.info("signedTx", signedTx);
134134
uiConsole("signature", signedTx);

0 commit comments

Comments
 (0)