Skip to content

Commit

Permalink
Merge pull request #20 from 0xsequence/send-back-to-self
Browse files Browse the repository at this point in the history
send funds back to self
  • Loading branch information
ta-999 committed Aug 2, 2023
2 parents 36e31a9 + bab99b1 commit 75051f8
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 75051f8

Please sign in to comment.