Skip to content

Commit bdf23f9

Browse files
chore(runway): cherry-pick fix: point DIGEST_API_URL to production endpoint (#28088)
## **Description** <!-- 1. What is the reason for the change? The fallback URL for `DIGEST_API_URL` was pointing at the development endpoint. --> <!-- 2. What is the improvement/solution? Switch the hardcoded fallback to the production endpoint so that builds without an explicit env var hit production. --> Switches the hardcoded fallback value for `DIGEST_API_URL` in `AppConstants.ts` from the dev endpoint (`digest.dev-api.cx.metamask.io`) to the production endpoint (`digest.api.cx.metamask.io`). Also moves the `@metamask/sdk-communication-layer` import to the top of the file to follow alphabetical import ordering. ## **Changelog** CHANGELOG entry: null ## **Related issues** Fixes: ## **Manual testing steps** N/A ## **Screenshots/Recordings** ### **Before** N/A ### **After** N/A ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- Generated with the help of the pr-description AI skill --> Made with [Cursor](https://cursor.com) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: only changes a constant fallback URL and import ordering. Main impact is that builds without `DIGEST_API_URL` will now call the production digest service instead of the dev endpoint. > > **Overview** > Updates `AppConstants.DIGEST_API_URL` to default to the production `https://digest.api.cx.metamask.io/api/v1` endpoint when the `DIGEST_API_URL` env var is not set. > > Also reorders the `DEFAULT_SERVER_URL` import to match expected import ordering. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 9d584a4. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 1db6acf commit bdf23f9

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

app/core/AppConstants.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import { DEFAULT_SERVER_URL } from '@metamask/sdk-communication-layer';
12
import { CoreTypes } from '@walletconnect/types';
23
import Device from '../util/device';
3-
import { DEFAULT_SERVER_URL } from '@metamask/sdk-communication-layer';
44

55
const DEVELOPMENT = 'development';
66

@@ -214,8 +214,7 @@ export default {
214214
process.env.DECODING_API_URL ||
215215
'https://signature-insights.api.cx.metamask.io/v1',
216216
DIGEST_API_URL:
217-
process.env.DIGEST_API_URL ||
218-
'https://digest.dev-api.cx.metamask.io/api/v1',
217+
process.env.DIGEST_API_URL || 'https://digest.api.cx.metamask.io/api/v1',
219218
// Rewards/Baanx: GH Actions use builds.yml (env set per build). Fallback mapping for local when env not set.
220219
REWARDS_API_URL: {
221220
DEV: 'https://rewards.dev-api.cx.metamask.io',

0 commit comments

Comments
 (0)