Skip to content

Commit

Permalink
send funds back to self
Browse files Browse the repository at this point in the history
  • Loading branch information
attente committed Aug 2, 2023
1 parent 36e31a9 commit bab99b1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,11 @@ And that has made all the difference.

signer = signer || wallet.getSigner() // select DefaultChain signer by default

const toAddress = ethers.Wallet.createRandom().address
// Sending the funds to the wallet itself
// so we don't lose any funds ;-)
// (of course, you can send anywhere)
const toAddress = await signer.getAddress()

const amount = ethers.utils.parseUnits('1', 1)

// (USDC address on Goerli)
Expand Down Expand Up @@ -557,7 +561,11 @@ And that has made all the difference.

signer = signer || wallet.getSigner() // select DefaultChain signer by default

const toAddress = ethers.Wallet.createRandom().address
// Sending the funds to the wallet itself
// so we don't lose any funds ;-)
// (of course, you can send anywhere)
const toAddress = await signer.getAddress()

const amount = ethers.utils.parseUnits('0.05', 18)
const daiContractAddress = '0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063' // (DAI address on Polygon)

Expand Down

0 comments on commit bab99b1

Please sign in to comment.