Skip to content

Commit e51a8fa

Browse files
committed
Merge branch 'master' into feat/nft-checkout-plugin
2 parents 2444133 + 6d4a190 commit e51a8fa

File tree

40 files changed

+2268
-3617
lines changed

40 files changed

+2268
-3617
lines changed

demo/vue-app-new/package-lock.json

Lines changed: 102 additions & 102 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/vue-app-new/src/MainView.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<script setup lang="ts">
22
import {
33
AccountAbstractionProvider,
4-
BiconomySmartAccount,
54
ISmartAccount,
65
KernelSmartAccount,
6+
NexusSmartAccount,
77
// LightSmartAccount,
88
SafeSmartAccount,
99
TrustSmartAccount,
@@ -97,8 +97,8 @@ const accountAbstractionProvider = computed((): IBaseProvider<IProvider> | undef
9797
// setup aa provider
9898
let smartAccountInit: ISmartAccount;
9999
switch (formData.smartAccountType) {
100-
case "biconomy":
101-
smartAccountInit = new BiconomySmartAccount();
100+
case "nexus":
101+
smartAccountInit = new NexusSmartAccount();
102102
break;
103103
case "kernel":
104104
smartAccountInit = new KernelSmartAccount();

demo/vue-app-new/src/config.ts

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,26 @@ export const chainConfigs: Record<ChainNamespaceType, CustomChainConfig[]> = {
2828
ticker: "ETH",
2929
tickerName: "Sepolia Testnet",
3030
},
31+
{
32+
chainNamespace: CHAIN_NAMESPACES.EIP155,
33+
rpcTarget: "https://mainnet.base.org",
34+
blockExplorerUrl: "https://base.blockscout.com",
35+
chainId: "0x2105",
36+
displayName: "Base Mainnet",
37+
ticker: "ETH",
38+
tickerName: "Base Ethereum",
39+
logo: "https://cryptologos.cc/logos/ethereum-eth-logo.png",
40+
},
41+
{
42+
chainNamespace: CHAIN_NAMESPACES.EIP155,
43+
rpcTarget: "https://sepolia.base.org",
44+
blockExplorerUrl: "https://sepolia-explorer.base.org",
45+
chainId: "0x14A34",
46+
displayName: "Base Sepolia",
47+
ticker: "ETH",
48+
tickerName: "Base Sepolia Testnet",
49+
logo: "https://cryptologos.cc/logos/ethereum-eth-logo.png",
50+
},
3151
{
3252
chainNamespace: CHAIN_NAMESPACES.EIP155,
3353
rpcTarget: "https://data-seed-prebsc-2-s3.binance.org:8545",
@@ -132,11 +152,11 @@ export const defaultLoginMethod: Record<LOGIN_PROVIDER_TYPE, FormConfigSettings>
132152
{} as Record<LOGIN_PROVIDER_TYPE, FormConfigSettings>
133153
);
134154

135-
export type SmartAccountType = "safe" | "kernel" | "biconomy" | "trust";
155+
export type SmartAccountType = "safe" | "kernel" | "nexus" | "trust";
136156

137157
export const SmartAccountOptions: { name: string; value: SmartAccountType }[] = [
138158
{ name: "Safe", value: "safe" },
139-
{ name: "Biconomy", value: "biconomy" },
159+
{ name: "Nexus", value: "nexus" },
140160
{ name: "Kernel", value: "kernel" },
141161
{ name: "Trust", value: "trust" },
142162
// { name: "Light", value: "light" },

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);

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"version": "9.3.2",
2+
"version": "9.4.1",
33
"npmClient": "npm"
44
}

0 commit comments

Comments
 (0)