-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: Created unit tests to implement native ethers transfer #217
Conversation
test/TestSwaplace.test.ts
Outdated
const askingAmountOrId = [50, 100, 150]; | ||
|
||
const valueToSend: BigNumber = ethers.utils.parseEther("0.5"); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whitespace can be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requesting minor changes in the name of the tests and whitespace removal. Also requiring a missing test
test/TestSwaplace.test.ts
Outdated
const valueToSend: BigNumber = ethers.utils.parseEther("0.5"); | ||
|
||
const expiry = (await blocktimestamp()) + 1000000; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whitespace can be removed
test/TestSwaplace.test.ts
Outdated
const askingAmountOrId = [50, 100, 150]; | ||
|
||
const valueToSend: BigNumber = ethers.utils.parseEther("0.5"); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whitespace can be removed
test/TestSwaplace.test.ts
Outdated
const valueToSend: BigNumber = ethers.utils.parseEther("0.5"); | ||
|
||
const expiry = (await blocktimestamp()) + 1000000; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whitespace can be removed
test/TestSwaplace.test.ts
Outdated
@@ -326,6 +326,44 @@ describe("Swaplace", async function () { | |||
.to.emit(Swaplace, "SwapCreated") | |||
.withArgs(await Swaplace.totalSwaps(), owner.address, zeroAddress); | |||
}); | |||
|
|||
it("Should be able to create a swap with native ethers", async function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use "by the owner" refer, like in line 377
test/TestSwaplace.test.ts
Outdated
@@ -466,6 +538,69 @@ describe("Swaplace", async function () { | |||
allowed.address, | |||
); | |||
}); | |||
|
|||
it("Should be able to {acceptSwap} with native ethers", async function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add "sent by the owner"
Hey @0xneves made the requested changes. Ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requesting minor change:
test/TestSwaplace.test.ts
Outdated
@@ -339,7 +339,7 @@ describe("Swaplace", async function () { | |||
const askingAmountOrId = [50, 100, 150]; | |||
|
|||
const valueToSend: BigNumber = ethers.utils.parseEther("0.5"); | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary whitespace was added here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@0xneves sorry, removed it now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving these changes
closes #206