Skip to content

Commit

Permalink
Update send transaction w/ wagmni
Browse files Browse the repository at this point in the history
  • Loading branch information
Adamj1232 committed May 28, 2024
1 parent 0575185 commit 0d2c59c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,17 @@ const App = () => {
}

const sendTransactionWagmi = async () => {
const {label} = wallet
const transactWithThisWallet = getConnectors(wagmiConfig).find(
connector => connector.name === label
)
console.log('transactWithThisWallet', transactWithThisWallet)
// current primary wallet - as multiple wallets can connect this value is the currently active
const result = await wagmiSendTransaction(wagmiConfig, {
to: toAddress,
// desired connector to send txn from
account: wallet.accounts[0],
value: parseEther('0.001')
value: parseEther('0.001'),
connector: transactWithThisWallet
})
console.log(result)
}
Expand Down

0 comments on commit 0d2c59c

Please sign in to comment.