Skip to content

Conversation

@Jipperism
Copy link
Contributor

No description provided.

bitbeckers and others added 28 commits February 6, 2025 15:29
Updates the health check endpoint to be part of the TSOA routes. This
enables users to validate the application health and adds the endpoint
to the Swagger spec
- important note: subscribing to a table that doesn't have realtime publications enabled, disables subscriptions to all tables 🥴
Without this patch filtering doesn't work on collections. The following
query returns all collections instead of the one that's filtered for:

{
  collections(where: { name: { eq: "test"}}) {
    data {
      name
      id
      hypercerts {
        hypercert_id
      }
    }
  }
}

The same holds true for ids.
Tests would complain when the Alchemy env var isn't found. The tests
shouldn't even need it. This most likely came to be when the RPC URL
building was changed and this test was missed.
The new mocks catch that oversight.
Adding code inside of baseTypes.ts requires us to lower the coverage
thresholds as it's notoriously difficult to test.
…ring

fix(graphql): filter on collections not working
The Filecoin documentation doesn't exactly specifiy the full path to be
used with the SafeAPIKit SDK. After some digging I found that the API
isn't expected to be under /api by default. That means it needs to be
specified explicitly.

https://docs.safe.global/sdk/api-kit/guides/migrate-to-v2
Without this patch the Multisig upsert strategy is trying to construct
the SafeAPIKit instance using the default constructor. The problem is
that on Filecoin and Filecoin Calibration the transaction service is
hosted by a third party and thus needs a custom txServiceUrl in the
config.
Updates dependencies and generated content of API
Updates the cache invalidation method to invalidate based on changes to
hypercert_allow_list_records instead of allow_lists. This enforces cache
invalidation when a record is claimed
Refactors the SupabaseCachingService to get all hypercert columns except
for the image. Renamed the getMetadata method to getMetadataWithoutImage
to make this explicit.

Introduces MetadataImageService for fetching the image when the field is
selected in a metadata query.
…age_fetching

Separate metadata image fetching from metadata query
Fix user controller to use custom Safe API Kit instance when interacting with Filecoin networks
This commit fixes the query by explicity calling for the metadata
columns in the join query in SupabaseCachingService.ts
- removes unused payload line in supabase.ts
- when invalidation allowlist record cache on update use record id
- when invalidating allowlist record cache on insert invalidate all
…fresh

Allowlist claim response cache refresh
Adds Ankr, ChainUp, and Lava RPC providers to the EvmClientFactory for improved Filecoin network connectivity
Without specifying that selectAll() should give preference to columns
present in the claims table, it ends up selecting fractions.units when
the join is applied.
this was previously hidden due to the ts-expect-error comment, used because of the type mismatch
Introduces a new cronjob to periodically validate and potentially invalidate marketplace orders. The cronjob checks all valid orders, and certain invalid orders with specific error codes.
it no longer makes sense to keep the error codes in the marketplace sdk
as the only place they will be used is here.
As we're getting high loads on Sentry spans, we reduce the sampling rate
from 1.0 to 0.1 for production and 1.0 on staging.

The reason for this is to primarily lower the amount of traces sent.
However, we keep it 100% on staging to detect bugs and as traffic is
lower there
…_rates

chore(sentry): lower polling rates
…njob, reduce rpc calls

- lowers the amount of upserts done, by only updating orders that have
their validity or error codes changed. Previously, it was updating all
orders that we're checked, resulting in unnecessary cache invalidations
- properly utilizes the checkMakerOrders method to prevent unnecessary
calls to the RPC endpoint, which might have been related with our infura
issues.
Fixes a bug where the schema_uid was not selected correctly, which
resulted in errors when fetching eas_schema using graphql as it's
non-nullable.
@Jipperism Jipperism requested review from bitbeckers and pheuberger and removed request for bitbeckers April 7, 2025 14:17
@Jipperism Jipperism changed the title Develop Deploy to PROD Apr 7, 2025
@github-actions
Copy link

github-actions bot commented Apr 7, 2025

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 25.09% (🎯 24%) 1094 / 4360
🟢 Statements 25.09% (🎯 24%) 1094 / 4360
🟢 Functions 62.1% (🎯 59%) 59 / 95
🟢 Branches 72.87% (🎯 72%) 180 / 247
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/index.ts 0% 0% 0% 0% 1-58
src/client/evmClient.ts 95.2% 100% 92.85% 95.2% 142-147
src/client/supabase.ts 0% 0% 0% 0% 1-450
src/controllers/MonitoringController.ts 100% 100% 100% 100%
src/lib/safe/SafeApiKitStrategy.ts 0% 0% 0% 0% 1-46
src/lib/users/MultisigUpsertStrategy.ts 0% 0% 0% 0% 1-81
Generated in workflow #87 for commit f3470e0 by the Vitest Coverage Report Action

@pheuberger pheuberger merged commit 42a76cb into main Apr 7, 2025
3 checks passed
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.

4 participants