mirror of
https://github.com/status-im/dagger-contracts.git
synced 2025-02-11 14:17:05 +00:00
vault: rename error
This commit is contained in:
parent
f54015eb77
commit
8eae780142
@ -164,11 +164,7 @@ abstract contract VaultBase {
|
||||
require(lock.isLocked(), LockRequired());
|
||||
|
||||
Account memory account = _accounts[controller][fund][recipient];
|
||||
require(
|
||||
account.flow.incoming == account.flow.outgoing,
|
||||
CannotBurnFlowingTokens()
|
||||
);
|
||||
|
||||
require(account.flow.incoming == account.flow.outgoing, FlowMustBeZero());
|
||||
uint128 amount = account.balance.available + account.balance.designated;
|
||||
|
||||
lock.value -= amount;
|
||||
@ -220,5 +216,5 @@ abstract contract VaultBase {
|
||||
error ExpiryPastMaximum();
|
||||
error InvalidExpiry();
|
||||
error LockRequired();
|
||||
error CannotBurnFlowingTokens();
|
||||
error FlowMustBeZero();
|
||||
}
|
||||
|
@ -522,9 +522,9 @@ describe("Vault", function () {
|
||||
it("cannot burn tokens that are flowing", async function () {
|
||||
await vault.flow(fund, account.address, account2.address, 5)
|
||||
const burning1 = vault.burn(fund, account.address)
|
||||
await expect(burning1).to.be.revertedWith("CannotBurnFlowingTokens")
|
||||
await expect(burning1).to.be.revertedWith("FlowMustBeZero")
|
||||
const burning2 = vault.burn(fund, account2.address)
|
||||
await expect(burning2).to.be.revertedWith("CannotBurnFlowingTokens")
|
||||
await expect(burning2).to.be.revertedWith("FlowMustBeZero")
|
||||
})
|
||||
|
||||
it("can burn tokens that are no longer flowing", async function () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user