-
Notifications
You must be signed in to change notification settings - Fork 18
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
Write migration file to add missed optimism donations to db #1213
Write migration file to add missed optimism donations to db #1213
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This donation is missed 0x8838d5be728ac29110340aacd883e9ede19048146e1c28842e4f4e28e4ba4761
}, | ||
|
||
// https://optimistic.etherscan.io/tx/0x8838d5be728ac29110340aacd883e9ede19048146e1c28842e4f4e28e4ba4761 | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aminlatifi I added the missed dontion here
await refreshProjectEstimatedMatchingView(); | ||
await refreshProjectDonationSummaryView(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two can be done out of loop and only once
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @aminlatifi , you are right, I moved it to out of the function
The data is correct now, thanks @mohammadranjbarz |
@CarlosQ96 Would you please carefully check the donation saving part and be sure everything is following the procedure? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked the data inserted in the db, seems good, I added the missed donation Moe reported.
* disable ratelimiter from env (#1208) * Write migration file to add missed optimism donations to db (#1213) * Write migration file to add missed optimism donations to db related to https://github.com/Giveth/giveth-dapps-v2/issues/3520 * Add another missed donation, make addresses lowercase before put in DB * Move updating views functions out of the loop * add missing optimism donation --------- Co-authored-by: Carlos <carlos.quintero096@gmail.com> * Update master-pipeline.yml * disable dapp cors with envs * Renamed variable --------- Co-authored-by: CarlosQ96 <92376054+CarlosQ96@users.noreply.github.com> Co-authored-by: mohammadranjbarz <mranjbar.z2993@gmail.com> Co-authored-by: Carlos <carlos.quintero096@gmail.com> Co-authored-by: Moe Shehab <52987806+mhmdksh@users.noreply.github.com>
* Comment one test case * Added fill snapshot round number back * Removed blockNumber from snapshot in tests * Fixed migrations to be compatible with removing blockNumber from history * add project status to getVerificationFormByProjectId query * Add sent matching fund to total donations of project and total received of users related to Giveth/giveth-dapps-v2#3386 * Fix test case for adding matching fund to toal donation amount of projects * Implement qfRoundStats webservice related to Giveth/giveth-dapps-v2#3250 * Change allProjects webservice to support qfRoundSlug related to Giveth/giveth-dapps-v2#3250 * Fix test cases to create qfRound * Fix test cases to create qfRound * Fix test cases to create qfRound * Fix test cases to create qfRound * Fix updateProjectWithVerificationForm * Revert updateUserTotalReceived() funciton * Fix updateUserTotalReceived() test case * Fix updateUserTotalReceived() test case * Fix mordor testnet node url * Read node rpc urls from process.env instead of config * Add log * Fix etc provider url in github actions config * Fix AddSlugToQfRound migration * Remove unused tests * add safeTransaction to donation logic * fix uniqueness index on donation table * comment a network tests * fix nullability of transactionId * make nonce nullable for safe donations * add nullability to nonce in createdonationResolver * remove undefined clause from joi validations * Fix insertDonationsFromQfRoundHistory when can not find corosponding address * Call refreshProjectDonationSummaryView() immediately after insertDonationsFromQfRoundHistory) * Save non-evm user wallet address capitalization * Updated the authentication service related address in test.env * updated auth server in test env * add validations for multisig donations * add abis decoder for multisig transactions and parsers * fetch from and to addresses correctly for multisig validations * fix native token transfer for multisig transactions * fix transaction amount in tests for multisig * fix fromAddress edgecase for multisig * make params options for transactionData * Project Solana Address Support (#1200) * Initial add solana address support to project address * Added chaintype to graphql validator and project verification form * Added chainType to token Refactored project filter query builder Added tests * Fixed issue in test graphql query Added some tests * Fixed issues with tests * Revert unwanted changes happend after merge * Fixed issues happend after merge * Fixed an issue in setting chainType in projectUpdate * Revert "Removed snapshot block number" (#1202) * comment uniqueness migration constraint (#1203) * graphql allow null for transactionId (#1205) * Create Solana Donations Integration (#1204) * modify create donation resolver to handle solana token * fix backward compatible tests * add tests to solana donation creation * add tests for solana resolvers (wip) * fix solana donation tests and logic * handle multiple solana tokens (future) * fix some qfround tests * add solana native token migration * Update test/testUtils.ts solana token address Co-authored-by: Amin Latifi <a.latifi.al@gmail.com> * Update migration/data/seedTokens.ts Decimals in Token Co-authored-by: Amin Latifi <a.latifi.al@gmail.com> * Update migration/data/seedTokens.ts Co-authored-by: Amin Latifi <a.latifi.al@gmail.com> * Update src/resolvers/donationResolver.test.ts Co-authored-by: Amin Latifi <a.latifi.al@gmail.com> * solana feedback * fix seed tokens * fix solana donation flow and apply code feedback * remove unnecesary code and improve migration --------- Co-authored-by: Amin Latifi <a.latifi.al@gmail.com> * disable ratelimiter from env (#1212) Co-authored-by: Carlos <carlos.quintero096@gmail.com> * Hotfix/solana project address (#1210) * Changed address invalid message * Removed unused queries * Fixed solana address verification problem * Update master-pipeline.yml * Verify Solana transactions (#1209) * Add test cases for verifying solana transactions related to #1171 * Fix build problems * Refactor verifying solana transfer transactions * Add disable cors and rate limiting to staging (#1221) * disable ratelimiter from env (#1208) * Write migration file to add missed optimism donations to db (#1213) * Write migration file to add missed optimism donations to db related to https://github.com/Giveth/giveth-dapps-v2/issues/3520 * Add another missed donation, make addresses lowercase before put in DB * Move updating views functions out of the loop * add missing optimism donation --------- Co-authored-by: Carlos <carlos.quintero096@gmail.com> * Update master-pipeline.yml * disable dapp cors with envs * Renamed variable --------- Co-authored-by: CarlosQ96 <92376054+CarlosQ96@users.noreply.github.com> Co-authored-by: mohammadranjbarz <mranjbar.z2993@gmail.com> Co-authored-by: Carlos <carlos.quintero096@gmail.com> Co-authored-by: Moe Shehab <52987806+mhmdksh@users.noreply.github.com> * Add test and regex for solana token addresses (#1224) * add test and regex for solana token addresses * Upated solana wallet address and programId regex --------- Co-authored-by: Amin Latifi <a.latifi.al@gmail.com> * Hotfix solana transction id validator (#1225) * Improved solana transction id match regex * Update solana transaction id regex --------- Co-authored-by: CarlosQ96 <92376054+CarlosQ96@users.noreply.github.com> Co-authored-by: Amin Latifi <a.latifi.al@gmail.com> Co-authored-by: Carlos <carlos.quintero096@gmail.com> Co-authored-by: Krati Jain <kratijain88@gmail.com> Co-authored-by: Mateo Daza <mateodaza@gmail.com> Co-authored-by: Moe Shehab <52987806+mhmdksh@users.noreply.github.com>
* Multi sig release, 2023-12-31 (#1227) * Comment one test case * Added fill snapshot round number back * Removed blockNumber from snapshot in tests * Fixed migrations to be compatible with removing blockNumber from history * add project status to getVerificationFormByProjectId query * Add sent matching fund to total donations of project and total received of users related to Giveth/giveth-dapps-v2#3386 * Fix test case for adding matching fund to toal donation amount of projects * Implement qfRoundStats webservice related to Giveth/giveth-dapps-v2#3250 * Change allProjects webservice to support qfRoundSlug related to Giveth/giveth-dapps-v2#3250 * Fix test cases to create qfRound * Fix test cases to create qfRound * Fix test cases to create qfRound * Fix test cases to create qfRound * Fix updateProjectWithVerificationForm * Revert updateUserTotalReceived() funciton * Fix updateUserTotalReceived() test case * Fix updateUserTotalReceived() test case * Fix mordor testnet node url * Read node rpc urls from process.env instead of config * Add log * Fix etc provider url in github actions config * Fix AddSlugToQfRound migration * Remove unused tests * add safeTransaction to donation logic * fix uniqueness index on donation table * comment a network tests * fix nullability of transactionId * make nonce nullable for safe donations * add nullability to nonce in createdonationResolver * remove undefined clause from joi validations * Fix insertDonationsFromQfRoundHistory when can not find corosponding address * Call refreshProjectDonationSummaryView() immediately after insertDonationsFromQfRoundHistory) * Save non-evm user wallet address capitalization * Updated the authentication service related address in test.env * updated auth server in test env * add validations for multisig donations * add abis decoder for multisig transactions and parsers * fetch from and to addresses correctly for multisig validations * fix native token transfer for multisig transactions * fix transaction amount in tests for multisig * fix fromAddress edgecase for multisig * make params options for transactionData * Project Solana Address Support (#1200) * Initial add solana address support to project address * Added chaintype to graphql validator and project verification form * Added chainType to token Refactored project filter query builder Added tests * Fixed issue in test graphql query Added some tests * Fixed issues with tests * Revert unwanted changes happend after merge * Fixed issues happend after merge * Fixed an issue in setting chainType in projectUpdate * Revert "Removed snapshot block number" (#1202) * comment uniqueness migration constraint (#1203) * graphql allow null for transactionId (#1205) * Create Solana Donations Integration (#1204) * modify create donation resolver to handle solana token * fix backward compatible tests * add tests to solana donation creation * add tests for solana resolvers (wip) * fix solana donation tests and logic * handle multiple solana tokens (future) * fix some qfround tests * add solana native token migration * Update test/testUtils.ts solana token address Co-authored-by: Amin Latifi <a.latifi.al@gmail.com> * Update migration/data/seedTokens.ts Decimals in Token Co-authored-by: Amin Latifi <a.latifi.al@gmail.com> * Update migration/data/seedTokens.ts Co-authored-by: Amin Latifi <a.latifi.al@gmail.com> * Update src/resolvers/donationResolver.test.ts Co-authored-by: Amin Latifi <a.latifi.al@gmail.com> * solana feedback * fix seed tokens * fix solana donation flow and apply code feedback * remove unnecesary code and improve migration --------- Co-authored-by: Amin Latifi <a.latifi.al@gmail.com> * disable ratelimiter from env (#1212) Co-authored-by: Carlos <carlos.quintero096@gmail.com> * Hotfix/solana project address (#1210) * Changed address invalid message * Removed unused queries * Fixed solana address verification problem * Update master-pipeline.yml * Verify Solana transactions (#1209) * Add test cases for verifying solana transactions related to #1171 * Fix build problems * Refactor verifying solana transfer transactions * Add disable cors and rate limiting to staging (#1221) * disable ratelimiter from env (#1208) * Write migration file to add missed optimism donations to db (#1213) * Write migration file to add missed optimism donations to db related to https://github.com/Giveth/giveth-dapps-v2/issues/3520 * Add another missed donation, make addresses lowercase before put in DB * Move updating views functions out of the loop * add missing optimism donation --------- Co-authored-by: Carlos <carlos.quintero096@gmail.com> * Update master-pipeline.yml * disable dapp cors with envs * Renamed variable --------- Co-authored-by: CarlosQ96 <92376054+CarlosQ96@users.noreply.github.com> Co-authored-by: mohammadranjbarz <mranjbar.z2993@gmail.com> Co-authored-by: Carlos <carlos.quintero096@gmail.com> Co-authored-by: Moe Shehab <52987806+mhmdksh@users.noreply.github.com> * Add test and regex for solana token addresses (#1224) * add test and regex for solana token addresses * Upated solana wallet address and programId regex --------- Co-authored-by: Amin Latifi <a.latifi.al@gmail.com> * Hotfix solana transction id validator (#1225) * Improved solana transction id match regex * Update solana transaction id regex --------- Co-authored-by: CarlosQ96 <92376054+CarlosQ96@users.noreply.github.com> Co-authored-by: Amin Latifi <a.latifi.al@gmail.com> Co-authored-by: Carlos <carlos.quintero096@gmail.com> Co-authored-by: Krati Jain <kratijain88@gmail.com> Co-authored-by: Mateo Daza <mateodaza@gmail.com> Co-authored-by: Moe Shehab <52987806+mhmdksh@users.noreply.github.com> * add isactive and fix adminjs for categories (#1223) (#1234) --------- Co-authored-by: mohammadranjbarz <mranjbar.z2993@gmail.com> Co-authored-by: CarlosQ96 <92376054+CarlosQ96@users.noreply.github.com> Co-authored-by: Carlos <carlos.quintero096@gmail.com> Co-authored-by: Krati Jain <kratijain88@gmail.com> Co-authored-by: Mateo Daza <mateodaza@gmail.com> Co-authored-by: Moe Shehab <52987806+mhmdksh@users.noreply.github.com>
This PR will add the missed donations that mentioned in #1233 to DB