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

[CLAIM] Pending claim UI #2049

Merged
merged 19 commits into from
Jan 13, 2022
Merged

[CLAIM] Pending claim UI #2049

merged 19 commits into from
Jan 13, 2022

Conversation

W3stside
Copy link
Contributor

@W3stside W3stside commented Jan 4, 2022

Summary

Part 1: pending UI for claiming. Users whom submit a claim and while pending should receive feedback in the claiming window of any ongoing claims. Only really applicable should a user hit "back" while claiming and/or refresh

Screenshots

Pending view for users whom make it back to the /claim page while claim on-going:
image

Where to get addresses to use to show claim flow and where to find claim indices to use in mock fn:
image

Example of how to trigger mock transactions in console:
image

To Test

  1. click vCow and head to claim page
  2. Click "change account" and paste: 0x00059034c8759f5C89af6792Eb3cFa2CCd12f6f3 (found here: https://github.com/gnosis/cow-merkle-drop/blob/main/rinkeby/chunks/0x00059034c8759f5C89af6792Eb3cFa2CCd12f6f3.json)
    2a. ☝️ can also be any account with claims, just paste the account into cowswap AND also remember one or several of the claiming index(ices) for later
  3. Click "Check claimable vCOW"
  4. open console
  5. use addMockClaimTransactions([<INDEX/INDICES_FROM_STEP_2a>]) to add claiming txs to activity log
    5a. e.g: addMockClaimTransactions([0, 1, 2, 3, 4, 5]) // assuming the chunks addressed is pulled from has those indices
  6. UI on the "vCOW claim breakdown" screen should highlight in purple the currently claiming rows and show a spinner
  7. Activity log should show a transaction of claiming
  8. To reset activity state, clear applications > localstorage

TODO

  • Open activity orders panel on claim row click
  • Subpoint to above: globalise orders panel open state? (need context to pass down to nested components)
  • Style review (just free styled here)

@W3stside W3stside changed the base branch from develop to claim January 4, 2022 18:57
@W3stside W3stside changed the base branch from claim to claim-page-2-rebased January 5, 2022 17:14
@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2022

  • 🔭 GP Swap: Gnosis Protocol v2 Swap UI

Base automatically changed from claim-page-2-rebased to claim January 5, 2022 20:55
@W3stside W3stside changed the title [CLAIM] Pending claim UI [CLAIM] Pending claim UI [Part 1] Jan 6, 2022
@W3stside W3stside marked this pull request as ready for review January 6, 2022 13:13
@W3stside W3stside self-assigned this Jan 6, 2022
maria-vslvn pushed a commit that referenced this pull request Jan 6, 2022
* Switch to fetching token color from the logoURI included

* Fall back to github hosted images

* Move logger to changes to another PR
Copy link
Contributor

@alfetopito alfetopito left a comment

Choose a reason for hiding this comment

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

Minor comments

}, [transactions])
}

export function useAllClaimingTransactionIndices() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Assuming every claim has data, we could write this like

export function useAllClaimingTransactionIndices() {
  const claimingTransactions = useAllClaimingTransactions()
  return useMemo(() => new Set(claimingTransactions.flatMap(({ data }) => data)), [claimingTransactions])
}

Copy link
Contributor

@nenadV91 nenadV91 left a comment

Choose a reason for hiding this comment

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

LGTMI, only thing is as we discussed we should also include pending claims into unclaimed amount calculation at some point.

@nenadV91 nenadV91 mentioned this pull request Jan 11, 2022
@W3stside W3stside changed the title [CLAIM] Pending claim UI [Part 1] [CLAIM] Pending claim UI Jan 13, 2022
@W3stside W3stside merged commit 8a83dd9 into claim Jan 13, 2022
@W3stside W3stside deleted the claim-pending branch January 13, 2022 15:26
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.

3 participants