Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jewei1997 committed Aug 1, 2024
1 parent 14dab1b commit f05e058
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions contracts/test/ERC20toNativePointerTest.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const {setupSigners, deployErc20PointerNative, getAdmin, createTokenFactoryTokenAndMint, ABI, generateWallet,
fundAddress, getSeiAddress
fundAddress, getSeiAddress,
delay
} = require("./lib");
const {expect} = require("chai");

Expand Down Expand Up @@ -89,10 +90,13 @@ describe("ERC20 to Native Pointer", function () {
expect(await pointer.balanceOf(recipient)).to.equal(amount);

// fund address so it can transact
await fundAddress(recipient)
await fundAddress(recipient, "1000000000000000000000")
await delay()

// unlinked wallet can send balance back to sender (becomes linked at this moment)
await (await pointer.connect(recipientWallet).transfer(sender.evmAddress, amount)).wait()
await (await pointer.connect(recipientWallet).transfer(sender.evmAddress, amount, {
gasPrice: ethers.parseUnits('333', 'gwei')
})).wait()
expect(await pointer.balanceOf(recipient)).to.equal(BigInt(0));
expect(await pointer.balanceOf(sender.evmAddress)).to.equal(startBal);

Expand Down

0 comments on commit f05e058

Please sign in to comment.