Skip to content
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

Add email form for recipient registration #539

Merged
merged 37 commits into from
Aug 11, 2022
Merged
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
7746bbb
refactoring
yuetloo Jul 20, 2022
6e06f87
refactor recipient submission ui
yuetloo Jul 20, 2022
5571c1c
add email field on the join form
yuetloo Jul 20, 2022
e2aae74
update state on navigate next
yuetloo Jul 20, 2022
e9a5ef4
fix chain short name
yuetloo Jul 20, 2022
4452285
format long error message
yuetloo Jul 20, 2022
1ae35ea
refactor to work with new form navigation flow
yuetloo Jul 20, 2022
262b9e8
refactor to work with new submission flow
yuetloo Jul 20, 2022
1dcbb56
remove obsolete code
yuetloo Jul 20, 2022
1113993
remove universal recipient registry
yuetloo Jul 20, 2022
9de0c0e
fix lint warning
yuetloo Jul 20, 2022
ad3d4dd
add validation rules to recipient submission form
yuetloo Jul 21, 2022
85a862a
update steps for form navigation
yuetloo Jul 21, 2022
c58b15c
move button to drop down menu
yuetloo Jul 21, 2022
da5a299
allow update fund receiving address on the current chain only
yuetloo Jul 22, 2022
ba0dd13
add metadata validation and code cleanup
yuetloo Jul 26, 2022
5adbf82
allow owner to add recipient for simple recipient type
yuetloo Jul 27, 2022
5667a5e
fix lint warning
yuetloo Jul 27, 2022
9ab7c5a
fix typo
yuetloo Aug 2, 2022
4673419
fix subgraph build warning
yuetloo Aug 2, 2022
efae44c
allow coordinator to add recipient for simple recipient registry
yuetloo Aug 2, 2022
a8fa9bd
fix lint warning
yuetloo Aug 2, 2022
ed17365
hide deposit information if deposit is not required
yuetloo Aug 2, 2022
85255b6
set challenge period and deposit to 0 for simple registry
yuetloo Aug 2, 2022
39fabbd
simplify code
yuetloo Aug 2, 2022
d35dc05
styling recipient submission widget
yuetloo Aug 2, 2022
82c061c
disable navigation if metadata is not selected
yuetloo Aug 2, 2022
39c4028
fix typo
yuetloo Aug 3, 2022
30f99af
refactor and do not show add project button for previous rounds
yuetloo Aug 3, 2022
cba88c8
css styling
yuetloo Aug 3, 2022
7e99883
make the metadata list in join form responsive
yuetloo Aug 3, 2022
8cb0661
change recipient menu dropdown icon to diamond and rearrange items
yuetloo Aug 4, 2022
d407850
use consistent environment variable prefix
yuetloo Aug 4, 2022
fb702be
add missing bannerImageHash
yuetloo Aug 4, 2022
6f332d0
allow simple recipient registry owner to remove recipient
yuetloo Aug 4, 2022
ee70287
update about recipient for simple recipient registry
yuetloo Aug 4, 2022
f80f857
Merge pull request #538 from clrfund/feature/simple-registry-changes
auryn-macmillan Aug 8, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix subgraph build warning
yuetloo committed Aug 2, 2022
commit 4673419892704e9ba8d63f2036d4c9beda92045e
24 changes: 12 additions & 12 deletions subgraph/src/MACIMapping.ts
Original file line number Diff line number Diff line change
@@ -20,15 +20,15 @@ import { FundingRound, Message, PublicKey } from '../generated/schema'
// - contract.verifier(...)

export function handlePublishMessage(event: PublishMessage): void {
const fundingRoundId = event.transaction.to.toHexString()
let fundingRoundId = event.transaction.to.toHexString()
if (fundingRoundId == null) {
log.error(
'Error: handlePublishMessage failed fundingRound not registered',
[]
)
return
}
const fundingRound = FundingRound.load(fundingRoundId)
let fundingRound = FundingRound.load(fundingRoundId)
if (fundingRound == null) {
log.error(
'Error: handlePublishMessage failed fundingRound not registered',
@@ -37,23 +37,23 @@ export function handlePublishMessage(event: PublishMessage): void {
return
}

const messageID = event.transaction.hash.toHexString()
let messageID = event.transaction.hash.toHexString()

const timestamp = event.block.timestamp.toString()
const message = new Message(messageID)
let timestamp = event.block.timestamp.toString()
let message = new Message(messageID)
message.data = event.params._message.data
message.iv = event.params._message.iv

const publicKeyId = event.transaction.from.toHexString()
const publicKey = PublicKey.load(publicKeyId)
let publicKeyId = event.transaction.from.toHexString()
let publicKey = PublicKey.load(publicKeyId)

//NOTE: If the public keys aren't being tracked initialize them
if (publicKey == null) {
const publicKey = new PublicKey(publicKeyId)
let publicKey = new PublicKey(publicKeyId)
publicKey.x = event.params._encPubKey.x
publicKey.y = event.params._encPubKey.y

const _messages = [messageID] as string[]
let _messages = [messageID] as string[]
publicKey.messages = _messages
publicKey.fundingRound = fundingRoundId

@@ -68,12 +68,12 @@ export function handlePublishMessage(event: PublishMessage): void {
}

export function handleSignUp(event: SignUp): void {
const publicKeyId = event.transaction.from.toHexString()
const publicKey = PublicKey.load(publicKeyId)
let publicKeyId = event.transaction.from.toHexString()
let publicKey = PublicKey.load(publicKeyId)

//NOTE: If the public keys aren't being tracked initialize them
if (publicKey == null) {
const publicKey = new PublicKey(publicKeyId)
let publicKey = new PublicKey(publicKeyId)
publicKey.x = event.params._userPubKey.x
publicKey.y = event.params._userPubKey.y
publicKey.stateIndex = event.params._stateIndex