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

feat: algorand grants integration #9168

Merged
merged 5 commits into from
Jun 28, 2021
Merged

Conversation

thelostone-mc
Copy link
Member

@thelostone-mc thelostone-mc commented Jun 21, 2021

Description

This PR aims at integrating algorand into grants.
It uses the algosigner to contribute to grants

Steps tested

  • ✅ Creation
  • ✅ Approval
  • ✅ Edit Grant
  • ✅ Funding with ALGO
  • ✅ Funding with assets
  • ✅ Backend sync
Grant Creation

https://share.vidyard.com/watch/4z4rhUbCNw3jhAttzy47LK?

Grant Payout

https://share.vidyard.com/watch/oqoMReMN4f6M9UTQuCNaGG?

Backend Sync

image

Fixes GITC-65

@thelostone-mc thelostone-mc marked this pull request as ready for review June 27, 2021 12:53
@thelostone-mc thelostone-mc changed the title (WIP) feat: algorand grants integration feat: algorand grants integration Jun 27, 2021
@thelostone-mc thelostone-mc moved this from In progress to Verifiable in Gitcoin Product Group (GPG) Jun 28, 2021
@thelostone-mc thelostone-mc added this to Engineering-Review in PR Review Board Jun 28, 2021
Copy link
Contributor

@chibie chibie left a comment

Choose a reason for hiding this comment

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

lgtm! just few comments

app/assets/v2/js/cart.js Outdated Show resolved Hide resolved
app/assets/v2/js/grants/cart/algorand_extension.js Outdated Show resolved Hide resolved
app/assets/v2/js/grants/cart/algorand_extension.js Outdated Show resolved Hide resolved
Copy link
Contributor

@chibie chibie left a comment

Choose a reason for hiding this comment

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

great job man!


if (
not eth_payout_address and not zcash_payout_address and
not celo_payout_address and not zil_payout_address and
not polkadot_payout_address and not kusama_payout_address and
not harmony_payout_address and not binance_payout_address and
not rsk_payout_address
not rsk_payout_address and not algorand_payout_address
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like we have a lot of places here where we have to check for every chain in these conditionals. Rather than repeating these over and over, could we make a set and then check the set? For example with these payout addresses, rather than doing this long list of nots would it be cleaner to add these to a set and then check if the set is empty?

all_payout_address_types = {eth_payout_address, zcash_payout_address, celo_payout_address, zil_payout_address, polkadot_payout_address, kusama_payout_address, harmony_payout_address, binance_payout_address, rsk_payout_address, algorand_payout_address}

if not all_payout_address_types:
    response['message'] = 'error: payout_address is a mandatory parameter'

Copy link
Member Author

Choose a reason for hiding this comment

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

Does that work @zacheryschiller ?
image

I'd say we'd do it in a followup PR

Copy link
Member Author

Choose a reason for hiding this comment

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

as synced up offline -> will do this in a follow up PR

Copy link
Contributor

Choose a reason for hiding this comment

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

My bad. Should be if not any(all_payout_address_types):

@thelostone-mc thelostone-mc merged commit 201dc8a into gitcoinco:master Jun 28, 2021
PR Review Board automation moved this from Engineering-Review to Done Jun 28, 2021
Gitcoin Product Group (GPG) automation moved this from Verifiable to Done Jun 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants