Skip to content

Commit

Permalink
Skip retrying if version is 'latest'
Browse files Browse the repository at this point in the history
  • Loading branch information
mimi-imtbl committed Dec 17, 2024
1 parent d6009d6 commit d2821fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/checkout/sdk/src/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ import { isMatchingAddress } from './utils/utils';
import * as wallet from './wallet';
import { WidgetConfiguration } from './widgets/definitions/configurations';
import { getWidgetsEsmUrl, loadUnresolvedBundle } from './widgets/load';
import { determineWidgetsVersion, getLatestVersionFromNpm, validateAndBuildVersion } from './widgets/version';
import { determineWidgetsVersion, getLatestVersion, validateAndBuildVersion } from './widgets/version';
import { globalPackageVersion } from './env';
import { AssessmentResult, fetchRiskAssessment, isAddressSanctioned } from './riskAssessment';

Expand Down Expand Up @@ -274,9 +274,9 @@ export class Checkout {
try {
return await tryLoadEsModule(validVersion);
} catch (err: any) {
const latestVersion = await getLatestVersionFromNpm();
const latestVersion = await getLatestVersion();

if (validVersion === latestVersion) {
if (validVersion === latestVersion && validVersion !== 'latest') {
try {
return await tryLoadEsModule('latest');
} catch (retryErr: any) {
Expand Down

0 comments on commit d2821fd

Please sign in to comment.