Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Real airdrop repo #2052

Merged
merged 10 commits into from
Jan 5, 2022
Merged

Real airdrop repo #2052

merged 10 commits into from
Jan 5, 2022

Conversation

alfetopito
Copy link
Contributor

Summary

Fetching claim data from claim repo https://github.com/gnosis/cow-merkle-drop

Screen Shot 2022-01-04 at 12 56 27
Screen Shot 2022-01-04 at 12 56 38

To Test

  1. Open the page claim page (click on vCOW on top)
  2. Pick an address from the drop repo https://github.com/gnosis/cow-merkle-drop
  3. Check it
  • The account should be eligible
  • The amount displayed should match what's in the repo
  • Assuming no claim has been made for given account yet

Note:

  • Claiming not yet wired up, it won't work

  • Commented out Michel's code on claim page, definitely not final

    Background

Optional: Give background information for changes you've made, that might be difficult to explain via comments

@alfetopito alfetopito self-assigned this Jan 4, 2022
@alfetopito alfetopito requested a review from a team January 4, 2022 21:00
@github-actions
Copy link
Contributor

github-actions bot commented Jan 4, 2022

  • 🔭 GP Swap: Gnosis Protocol v2 Swap UI

@W3stside
Copy link
Contributor

W3stside commented Jan 5, 2022

@alfetopito and @nenadV91 there is some clashing stuff here between your 2 branches. imo this should be merged into main and then @nenadV91 you rebase your work again

@@ -145,7 +146,7 @@ export function useUserClaims(account: Account): UserClaims | null {
return
}

fetchClaims(account)
fetchClaims(account, chainId)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: you know how i feel about these types of function args, would prefer an object as the others are made but i can live with this

@@ -365,3 +366,83 @@ function _hasNoInputOrInputIsGreaterThanClaimAmount(
): input is Required<ClaimInput> {
return !input.amount || JSBI.greaterThan(JSBI.BigInt(input.amount), JSBI.BigInt(claim.amount))
}

type LastAddress = string
type ClaimAddressMapping = { [firstAddress: string]: LastAddress }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
type ClaimAddressMapping = { [firstAddress: string]: LastAddress }
type ClaimAddressMapping = Record<string, LastAddress>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, but it's all copied code. Wanted to not change what's not needed.

If you feel strongly I can completely refactor it.

@alfetopito
Copy link
Contributor Author

As discussed, merging to get the latest data onto claim branch, will address comments as a follow up PR

@alfetopito alfetopito merged commit c053cf2 into claim Jan 5, 2022
@alfetopito alfetopito deleted the real-airdrop-repo branch January 5, 2022 15:25
@alfetopito alfetopito mentioned this pull request Jan 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants