mirror of
https://github.com/logos-storage/logos-storage-contracts-eth.git
synced 2026-01-04 22:33:11 +00:00
vault: reject negative flows
This commit is contained in:
parent
db8b06a51b
commit
eff9cc1acb
@ -503,6 +503,12 @@ describe("Vault", function () {
|
||||
expect(await getBalance(receiver)).to.equal(total)
|
||||
})
|
||||
|
||||
it("rejects negative flows", async function() {
|
||||
await expect(
|
||||
vault.flow(context, sender, receiver, -1)
|
||||
).to.be.revertedWith("NegativeFlow")
|
||||
})
|
||||
|
||||
it("rejects flow when insufficient available tokens", async function () {
|
||||
const duration = maximum - (await currentTime())
|
||||
const rate = Math.round(deposit / duration)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user