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

2218 BugFix: Queued Transactions not showing up #2223

Merged
merged 21 commits into from
Aug 14, 2024

Conversation

Da-Colon
Copy link
Contributor

@Da-Colon Da-Colon commented Aug 8, 2024

Fixes #2218

This PR replaces the getAllTransaction API request with getMultisigTransactions request. Most of the properties are the same except for the transfers property.

There are two spots where this is changes somethings.

Dashboard:
Will no longer show Treasury activities. These would be either a Card itself or added text to the bottom of the description that would display any transfer information.

Treasury:
Was able to use a combination of getIncomingTransactions and getToken from Safe's api-kit to retrieve the same data and put Treasury back together.

Testing

  • Ensure that Multisig queued Proposals show up
  • Ensure Transactions (Transfers) show up on Treasury Page (any safe)

@Da-Colon Da-Colon self-assigned this Aug 8, 2024
Copy link

netlify bot commented Aug 8, 2024

Deploy Preview for decent-interface-prod ready!

Name Link
🔨 Latest commit 3078e90
🔍 Latest deploy log https://app.netlify.com/sites/decent-interface-prod/deploys/66bce2488b459d0008c39a40
😎 Deploy Preview https://deploy-preview-2223.app.decentdao.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Aug 8, 2024

Deploy Preview for decent-interface-dev ready!

Name Link
🔨 Latest commit 3078e90
🔍 Latest deploy log https://app.netlify.com/sites/decent-interface-dev/deploys/66bce24894300300083e7b1e
😎 Deploy Preview https://deploy-preview-2223.app.dev.decentdao.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

src/utils/guard.ts Outdated Show resolved Hide resolved
@Da-Colon Da-Colon marked this pull request as ready for review August 9, 2024 15:46
Copy link
Contributor

@mudrila mudrila left a comment

Choose a reason for hiding this comment

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

Approving but just wanna make sure we ain't cutting off functionality

src/types/daoTreasury.ts Show resolved Hide resolved
src/types/fractal.ts Show resolved Hide resolved
@tomstuart123 tomstuart123 self-requested a review August 9, 2024 15:58
src/providers/App/treasury/reducer.ts Outdated Show resolved Hide resolved
src/hooks/utils/useSafeTransactions.ts Show resolved Hide resolved
src/hooks/utils/useSafeTransactions.ts Outdated Show resolved Hide resolved
src/hooks/DAO/loaders/useDecentTreasury.ts Show resolved Hide resolved
src/hooks/DAO/loaders/useDecentTreasury.ts Show resolved Hide resolved
@tomstuart123
Copy link

@Da-Colon - see test results below

Ensure that Multisig queued Proposals show up ✅
Ensure Transactions (Transfers) show up on Treasury Page (any safe) - ❌

Detail --> Ensure that Multisig queued Proposals show up ✅

  • Proposals seems to be appearing that are pending. I tested x2 types
  • Link here -
Screenshot 2024-08-09 at 19 04 45

Detail --> Ensure Transactions (Transfers) show up on Treasury Page (any safe) - ❌

  • @Da-Colon here's the issue as seem to be missing some txs
  • link - here
  • For app.dev I get this
Screenshot 2024-08-09 at 19 02 40
  • For this PR I get this
Screenshot 2024-08-09 at 19 02 35

@Da-Colon
Copy link
Contributor Author

Da-Colon commented Aug 9, 2024

@Da-Colon - see test results below

Ensure that Multisig queued Proposals show up ✅ Ensure Transactions (Transfers) show up on Treasury Page (any safe) - ❌

Detail --> Ensure that Multisig queued Proposals show up ✅

  • Proposals seems to be appearing that are pending. I tested x2 types
  • Link here -
Screenshot 2024-08-09 at 19 04 45 **Detail** --> Ensure Transactions (Transfers) show up on Treasury Page (any safe) - ❌
  • @Da-Colon here's the issue as seem to be missing some txs
  • link - here
  • For app.dev I get this
Screenshot 2024-08-09 at 19 02 40 * For this PR I get this Screenshot 2024-08-09 at 19 02 35

Yeah works on both the Prod and dev preview links for me?
image

@adamgall
Copy link
Member

adamgall commented Aug 9, 2024

@Da-Colon look closer at Tom's screenshot for "on app.dev i get this"

it includes a transaction at the top for incoming 425 USDC from 4 days ago. that TX is not on this PR's deploy preview (according to Tom)

- also adds sorting transfers by blockNumber
@Da-Colon
Copy link
Contributor Author

Da-Colon commented Aug 9, 2024

@Da-Colon look closer at Tom's screenshot for "on app.dev i get this"

it includes a transaction at the top for incoming 425 USDC from 4 days ago. that TX is not on this PR's deploy preview (according to Tom)

I see it now. Sorted and Fixed

@Da-Colon Da-Colon requested a review from adamgall August 9, 2024 21:35
transactionHash:
multiSigTransaction.transactionHash ||
(transaction as SafeMultisigTransactionWithTransfersResponse).safeTxHash,
// ! @todo This is why we are showing the two different hashes
Copy link
Contributor

Choose a reason for hiding this comment

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

If I remember this right - we used to be also showing different copies in this case(so instead of Transaction Hash it was something like Safe Tx Hash or something), not sure why that logic was removed. I think we should add this back

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'm not following? Why do we need the SafeTxHash?

Copy link
Contributor

Choose a reason for hiding this comment

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

Cause that's what eventually is shown to the end user, and we're confusing user by showing 2 different hashes before and after execution
We used to show both - now we just mixed them up

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yeah that's why i removed it so that it would only show the transactionHash. In the details screen right after you execute. There would be a clickable transaction hash that shows to the user and takes them to etherscan. But the safeTxHash comes back first so for a while that is what is used in the navigation (which shows nothing on etherscan)

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess we can actually link to Safe UI with the SafeTxHash, but maybe that's more of a product/design question.
@nicolaus-sherrill @xraystyle1980 @xanaramoss wdyt?

Copy link
Member

Choose a reason for hiding this comment

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

The Safe TX Hash is all that we have when a proposal is "pending" (not executed onchain yet). For Azorius this is never a problem because proposals are onchain, but for Multisig proposals are not onchain so we don't have a transaction to link them to.

@Da-Colon does this track?

@mudrila is the behavior you want to see here currently implemented correctly on prod? dev?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

O we are using it somewhere to track the state of things?

Copy link
Member

Choose a reason for hiding this comment

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

well idk if we're using it to track the state of things. I'm just saying that it's the best identifier we have for multisig transactions which haven't executed onchain yet. and there are places in the UI where @mudrila thinks some behavior or information has possibly unexpectedly changed.

Copy link
Contributor

Choose a reason for hiding this comment

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

@adamgall @Da-Colon From what I can tell - we currently aren't using this Safe Tx Hash on dev/prod - which I'm not sure when changed.
I'm just stating that before we used to differentiate on code and UI level between Safe Tx Hash and on chain Tx Hash and showing both of them. As far as I'm remembering this right - we also used to link to Safe UI with that "Safe Tx Hash" - which I believe we should be doing.
My take/suggestion here is:

  1. Put a ticket to properly process Safe Tx Hash - whether via swapping label/value in the UI or via showing both Tx Hash and Safe Tx Hash when it's applicable. It is certainly p2 and I don't see that reasonable to focus on this discussion right now.
  2. Gain context from @tomstuart123 and @decentdao/design on how we'll be proceeding forward
  3. Resolve this conversation and 🚢 :shipit: 💩 this to prod

Da-Colon and others added 3 commits August 13, 2024 09:07
- update syntax
- update native token address to MOCK_MORALIS_ETH_ADDRESS
- compare indices instead of object
src/hooks/DAO/loaders/useDecentTreasury.ts Show resolved Hide resolved
transactionHash:
multiSigTransaction.transactionHash ||
(transaction as SafeMultisigTransactionWithTransfersResponse).safeTxHash,
// ! @todo This is why we are showing the two different hashes
Copy link
Member

Choose a reason for hiding this comment

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

The Safe TX Hash is all that we have when a proposal is "pending" (not executed onchain yet). For Azorius this is never a problem because proposals are onchain, but for Multisig proposals are not onchain so we don't have a transaction to link them to.

@Da-Colon does this track?

@mudrila is the behavior you want to see here currently implemented correctly on prod? dev?

src/hooks/DAO/loaders/useDecentTreasury.ts Outdated Show resolved Hide resolved
src/hooks/DAO/loaders/useDecentTreasury.ts Show resolved Hide resolved
@adamgall
Copy link
Member

@Da-Colon just gave my approval, however i would like to see all open conversations in this PR resolved before you merge. thank you!

@adamgall adamgall changed the base branch from main to hotfix/v0.2.10 August 14, 2024 17:15
@adamgall adamgall merged commit e8ffed0 into hotfix/v0.2.10 Aug 14, 2024
11 checks passed
@adamgall adamgall deleted the issue/2218-bugfix-transfers branch August 14, 2024 17:15
Copy link

sentry-io bot commented Aug 14, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ Error: No Token matches the given query. //roles/edit View Issue
  • ‼️ TypeError: Failed to fetch //proposals/:proposalId View Issue

Did you find this useful? React with a 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bugfix: allTransactions request doesn't include queued transactions anymore
4 participants