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(suite): node bridge rollout only in EAP #13221

Merged
merged 1 commit into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion packages/suite-desktop-core/src/modules/bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ const start = async (bridge: BridgeProcess | TrezordNode) => {

const getBridgeInstance = (store: Dependencies['store']) => {
const legacyRequestedBySettings = store.getBridgeSettings().legacy;
const { allowPrerelease } = store.getUpdateSettings();

const legacyRequestedByArg = bridgeLegacy || bridgeLegacyDev || bridgeLegacyTest;

// handle rollout
Expand All @@ -65,7 +67,12 @@ const getBridgeInstance = (store: Dependencies['store']) => {
const legacyBridgeReasonRollout =
!isDevEnv && !skipNewBridgeRollout && newBridgeRollout >= NEW_BRIDGE_ROLLOUT_THRESHOLD;

if (legacyRequestedBySettings || legacyRequestedByArg || legacyBridgeReasonRollout) {
if (
legacyRequestedBySettings ||
legacyRequestedByArg ||
legacyBridgeReasonRollout ||
!allowPrerelease
) {
return new BridgeProcess();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export const TransportBackends = () => {
<SectionItem data-test="@settings/debug/processes/newBridgeRollout">
<TextColumn
title="New bridge rollout"
description={`New bridge is being rolled out to only ${NEW_BRIDGE_ROLLOUT_THRESHOLD * 100}% of Trezor Suite instances. Your rollout score is ${((bridgeSettings.newBridgeRollout ?? 0) * 100).toFixed()}%`}
description={`New bridge is being rolled out to only ${NEW_BRIDGE_ROLLOUT_THRESHOLD * 100}% of Trezor Suite instances that have applied for the Early access program. Your rollout score is ${((bridgeSettings.newBridgeRollout ?? 0) * 100).toFixed()}%`}
/>
</SectionItem>
)}
Expand Down
Loading