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: add pending tx queries #3488

Merged
merged 2 commits into from
Nov 8, 2023
Merged

feat: add pending tx queries #3488

merged 2 commits into from
Nov 8, 2023

Conversation

UncleSamtoshi
Copy link
Contributor

  • add pendingTransactions to Account and Wallet GQL objects
  • add pendingTransactionsByAddress to Wallet objects

@github-actions github-actions bot added the core label Nov 2, 2023
@UncleSamtoshi UncleSamtoshi force-pushed the add-pending-txs-fields branch from a1e0317 to 6e007ea Compare November 2, 2023 17:48

import { WalletOnChainPendingReceiveRepository } from "@/services/mongoose"

export const getPendingTransactionsForWalletsByAddresses = async ({
Copy link
Collaborator

Choose a reason for hiding this comment

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

I know wallets are passed from source but we must enforce in app layer that wallets belong the user/account (similar to logic in getPendingOnChainTransactionsForAccountByWalletIds)

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 dont necessarily agree with that. The function does what it says which is getPendingTransactionsForWalletsByAddress. It's different than the getPendingOnChainTransactionsForAccountByWalletIds which says its getting them for a specific account and therefore must verify that the account owns the wallets. I think this is a pretty common pattern across the app layer.

core/api/src/graphql/admin/schema.graphql Show resolved Hide resolved
@UncleSamtoshi UncleSamtoshi force-pushed the add-pending-txs-fields branch 2 times, most recently from 8416188 to 97c2705 Compare November 7, 2023 15:52
@UncleSamtoshi UncleSamtoshi force-pushed the add-pending-txs-fields branch from 97c2705 to c57fb82 Compare November 7, 2023 21:00
@UncleSamtoshi UncleSamtoshi merged commit 989bab5 into main Nov 8, 2023
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants