gitcoinco / gitcoinco/web

Validate payout address on Submit Work

Open
#9,959 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.8k
Forks
776
PR merge metrics
No merged PRs in 30d

Description

### User Story:
As a Bounty Funder
I want to ensure submissions have the proper wallet address that matches the chain I'm funding on
So that there are no lost funds

### Acceptance Criteria

**Form Initiation - non ETH Bounty:**
GIVEN i am viewing an open bounty
AND i have been approved to submit work
WHEN i click submit work
THEN existing submit work form will load
AND the payout address field should no longer be read only
AND we should not autopopulate your eth address from metamask
AND the placeholder text in the input field should reflect the proper prefix for the in focus chain
AND there should be info text below the form label informing the user what type of wallet address is needed

**Display Validation Field:**
GIVEN i am submitting work on a bounty
AND i have entered an invalid payout address for the chain that the payout will occur on
WHEN i click the submit button
THEN I will see a validation message informing me that the address entered isnt valid for the chain the payout is occurring on
AND that message will display under the payout address field
AND the submit button will be disabled

**Clearing Validation:**
GIVEN i am submitting work on a bounty
AND i have tried to submit the form with an invalid payout address
AND the validation on the payout address field is displaying
WHEN i enter a new valid payout address
AND remove focus from the field
THEN the error message will no longer display
AND the submit button will be reenabled

### Product & Design Links:

https://www.figma.com/file/r2wpg9bHKgLFOWj5neQCmU/Bounties-2022?node-id=0%3A1

### Tech Details:

Reuse existing wallet validations - [app/assets/v2/js/pages/new_bounty.js -> validateFunderAddress](https://github.com/gitcoinco/web/blob/master/app/assets/v2/js/pages/new_bounty.js#L133-L187)

### Notes/Assumptions:
These validations should cover all chains that we support in bounties

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.