Skip to content

Commit

Permalink
test demo
Browse files Browse the repository at this point in the history
  • Loading branch information
bengobeil committed Jun 14, 2024
1 parent 4b508e1 commit 87cf5a8
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions packages/demo/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,11 @@
const privateKeyProvider = new EthereumPrivateKeyProvider({
config: {
chainConfig: {
chainId: `0x1`,
rpcTarget: `https://mainnet.infura.io/v3/${infura_key}`,
chainId: `0xAA36A7`,
rpcTarget: `https://rpc.sepolia.org/`,
chainNamespace: CHAIN_NAMESPACES.EIP155,
displayName: "Ethereum Mainnet",
blockExplorerUrl: "https://etherscan.io",
displayName: "Sepolia",
blockExplorerUrl: "https://sepolia.etherscan.io",
ticker: "ETH",
tickerName: "Ether",
logo: "https://images.toruswallet.io/ethereum.svg"
Expand Down Expand Up @@ -543,7 +543,7 @@
}
const sendTransactionWithPreFlight = async (provider, balance) => {
await onboard.setChain({ chainId: '0x5' })
await onboard.setChain({ chainId: '0xAA36A7' })
const balanceValue = Object.values(balance)[0]
// if using ethers v6 this is:
Expand Down Expand Up @@ -621,7 +621,7 @@
let typedMsg = JSON.stringify(
{
domain: {
chainId: '0x5',
chainId: '0xAA36A7',
name: 'Web3-Onboard Test App',
verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC',
version: '1'
Expand Down Expand Up @@ -668,8 +668,9 @@
undefined,
2
)
const signTypedMessage = async (provider, address) => {
await onboard.setChain({ chainId: '0x5' })
const signTypedMessage = async (connector, address) => {
await onboard.setChain({ chainId: '0xAA36A7' })
const provider = await connector.getProvider();
const signature = await provider.request({
method: 'eth_signTypedData_v4',
params: [address, typedMsg]
Expand Down

0 comments on commit 87cf5a8

Please sign in to comment.