-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: restrict NFT minting only to voter (#184)
* fix: restrict NFT minting only to voter * fix: add missing `await`
- Loading branch information
Showing
5 changed files
with
70 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Proposal } from '../../../../src/helpers/snapshot'; | ||
import { hasVoted } from '../../../../src/lib/nftClaimer/utils'; | ||
|
||
describe('nftClaimer/utils', () => { | ||
describe('hasVoted()', () => { | ||
it('returns true when the address has voted on the given proposal', () => { | ||
expect( | ||
hasVoted('0x96176C25803Ce4cF046aa74895646D8514Ea1611', { | ||
id: 'QmPvbwguLfcVryzBRrbY4Pb9bCtxURagdv1XjhtFLf3wHj' | ||
} as Proposal) | ||
).resolves.toBe(true); | ||
}); | ||
|
||
it('returns false when the address has not voted on the given proposal', () => { | ||
expect( | ||
hasVoted('0x96176C25803Ce4cF046aa74895646D8514Ea1611', { | ||
id: '0xcf201ad7a32dcd399654c476093f079554dae429a13063f50d839e5621cd2e6e' | ||
} as Proposal) | ||
).resolves.toBe(false); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters