Skip to content

Guidepoint: Enhancement - Prevent request caching axios#2033

Merged
JohnathanWhite merged 1 commit intobitpay:masterfrom
cmgustavo:ref/updates-axios-no-cache-01
Mar 3, 2026
Merged

Guidepoint: Enhancement - Prevent request caching axios#2033
JohnathanWhite merged 1 commit intobitpay:masterfrom
cmgustavo:ref/updates-axios-no-cache-01

Conversation

@cmgustavo
Copy link
Copy Markdown
Member

@cmgustavo cmgustavo commented Feb 5, 2026

GP-22 (Part 2/2)

@cmgustavo cmgustavo changed the title Ref: prevent request caching [FEAT-GP-22] prevent request caching Feb 5, 2026
@cmgustavo cmgustavo changed the title [FEAT-GP-22] prevent request caching [FEAT-GP-22] prevent request caching axios Feb 5, 2026
@cmgustavo cmgustavo force-pushed the ref/updates-axios-no-cache-01 branch from 1543a2f to 8c4d49e Compare February 5, 2026 20:17
@cmgustavo cmgustavo marked this pull request as ready for review February 9, 2026 17:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds cache-busting headers to network requests to reduce the chance of clients/proxies returning stale responses.

Changes:

  • Adds Cache-Control / Pragma / Expires headers to many axios requests across the app.
  • Adds the same no-cache headers to internal fetch helpers (src/utils/passkey.ts).
  • Updates various effects/APIs to pass those headers along with existing request headers/config.

Reviewed changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/utils/passkey.ts Adds no-cache headers to shared fetch GET/POST helper functions.
src/utils/helper-methods.ts Adds no-cache headers to Solana-related axios calls (one call has a config-shape issue).
src/store/wallet/effects/send/send.ts Adds no-cache headers to UTXO tx fetch.
src/store/wallet/effects/rates/rates.ts Adds no-cache headers to fiat rate fetching (config-shape issues present).
src/store/wallet/effects/currencies/currencies.ts Adds no-cache headers to token options fetch.
src/store/swap-crypto/effects/thorswap/thorswap.ts Adds no-cache headers to Thorswap calls.
src/store/swap-crypto/effects/changelly/changelly.ts Adds no-cache headers to Changelly calls.
src/store/shop/shop.effects.ts Adds no-cache headers to shop endpoints (one POST has a config-shape issue).
src/store/scan/scan.effects.ts Adds no-cache headers to invoice-related calls.
src/store/market-stats/market-stats.effects.ts Adds no-cache headers to market stats call.
src/store/external-services/external-services.effects.ts Adds no-cache headers to external services config calls.
src/store/card/card.effects.ts Adds no-cache headers to invoice fetch after top-up creation.
src/store/buy-crypto/effects/transak/transak.ts Adds no-cache headers to Transak calls.
src/store/buy-crypto/effects/simplex/simplex.ts Adds no-cache headers to Simplex calls.
src/store/buy-crypto/effects/sardine/sardine.ts Adds no-cache headers to Sardine calls.
src/store/buy-crypto/effects/ramp/ramp.ts Adds no-cache headers to Ramp calls.
src/store/buy-crypto/effects/moonpay/moonpay.ts Adds no-cache headers to Moonpay calls.
src/store/buy-crypto/effects/banxa/banxa.ts Adds no-cache headers to Banxa calls.
src/store/bitpay-id/bitpay-id.effects.ts Adds no-cache headers to BitPay ID wallet lookup (config-shape issue present).
src/store/app/app.effects.ts Adds no-cache headers to waitlist join call; minor formatting tweak in pinning config.
src/lib/Braze/index.ts Adds no-cache headers to Braze merge/delete calls.
src/components/modal/import-ledger-wallet/import-account/SelectLedgerCurrency.tsx Adds no-cache headers to address tx fetch.
src/api/zenledger/index.ts Adds no-cache headers to Zenledger auth/data calls.
src/api/graphql/index.ts Adds no-cache headers to GraphQL API calls.
src/api/etherscan/index.ts Adds no-cache headers to Etherscan calls.
src/api/coinbase/index.ts Adds no-cache headers to Coinbase calls.
src/api/bitpay/index.ts Adds no-cache headers to BitPay ID API calls.
src/api/auth/index.ts Adds no-cache headers to session/auth endpoints.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/utils/helper-methods.ts Outdated
Comment thread src/store/wallet/effects/rates/rates.ts Outdated
Comment thread src/store/wallet/effects/rates/rates.ts
Comment thread src/store/wallet/effects/rates/rates.ts Outdated
Comment thread src/store/wallet/effects/rates/rates.ts Outdated
Comment thread src/store/shop/shop.effects.ts Outdated
Comment thread src/store/bitpay-id/bitpay-id.effects.ts Outdated
Comment thread src/store/wallet/effects/currencies/currencies.ts Outdated
@cmgustavo cmgustavo force-pushed the ref/updates-axios-no-cache-01 branch 7 times, most recently from 418194d to 0a72cc5 Compare February 10, 2026 22:32
@cmgustavo cmgustavo changed the title [FEAT-GP-22] prevent request caching axios Guidepoint: Enhancement - Prevent request caching axios Feb 12, 2026
Comment thread src/api/zenledger/index.ts Outdated
} from './zenledger.types';

import {ZENLEDGER_CREDENTIALS, ZENLEDGER_API_URL} from './zenledger.constants';
import {NO_CACHE_HEADERS} from '@/constants/config';
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this is returning an "unable to resolve module" error.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed. Thanks

@gabrielbazan7
Copy link
Copy Markdown
Collaborator

Are Moralis requests missing the no cache header on purpose?

Comment thread src/api/zenledger/index.ts Outdated
@cmgustavo cmgustavo force-pushed the ref/updates-axios-no-cache-01 branch 6 times, most recently from df4ae52 to c9a8602 Compare March 3, 2026 17:23
@cmgustavo cmgustavo force-pushed the ref/updates-axios-no-cache-01 branch from c9a8602 to 53f7b80 Compare March 3, 2026 17:28
@JohnathanWhite JohnathanWhite merged commit 53ba4f5 into bitpay:master Mar 3, 2026
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