From f37d85e5234007a6fa6dd807048a77e6dc2dc14e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szymon=20Mas=C5=82owski?= Date: Thu, 11 Apr 2024 16:14:26 +0200 Subject: [PATCH 1/4] chore(all): disable promise/avoid-new eslint rule (#1062) --- .eslintrc.js | 5 ++--- .../src/features/dapp/components/Connect.tsx | 1 - .../hooks/__tests__/useBuildDelegation.test.ts | 1 - .../src/lib/scripts/background/util.ts | 1 - .../src/utils/__tests__/createQueue.test.ts | 1 - .../src/utils/mocks/fake-api-request.ts | 1 - .../src/utils/taskQueue.ts | 1 - .../__tests__/get-block-info-by-hash.test.ts | 1 - .../lib/__tests__/get-inputs-value.test.ts | 1 - .../wallet/test/mocks/AssetsProviderStub.ts | 18 ++++++++---------- .../wallet/test/mocks/TxSubmitProviderFake.ts | 1 - packages/common/src/ui/hooks/useFetchImage.ts | 1 - .../AddCoSigners/AddCoSigners.stories.tsx | 11 ++++++----- 13 files changed, 16 insertions(+), 28 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index b0f687c23..4efee2f60 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -30,11 +30,10 @@ module.exports = { 'no-invalid-this': 0, 'react/prop-types': 'off', 'max-len': 'off', // prettier is already handling this automatically, - // note: prod webpack config strips console logs anyway, nevertheless - // we don't want the dev build to be spammed by needless logging '@typescript-eslint/no-explicit-any': ['error'], 'no-console': ['error', { allow: ['warn', 'error', 'info', 'debug'] }], - 'lodash/import-scope': ['error', 'method'] + 'lodash/import-scope': ['error', 'method'], + 'promise/avoid-new': 'off', }, overrides: [ { diff --git a/apps/browser-extension-wallet/src/features/dapp/components/Connect.tsx b/apps/browser-extension-wallet/src/features/dapp/components/Connect.tsx index fd2e18014..bbc8150db 100644 --- a/apps/browser-extension-wallet/src/features/dapp/components/Connect.tsx +++ b/apps/browser-extension-wallet/src/features/dapp/components/Connect.tsx @@ -67,7 +67,6 @@ const NonSSLBanner = () => { const authorize = (authorization: 'deny' | 'just-once' | 'allow', url: string) => { const api$ = of({ allowOrigin(origin: cip30.Origin): Promise<'deny' | 'just-once' | 'allow'> { - /* eslint-disable-next-line promise/avoid-new */ if (!url.startsWith(origin)) { return Promise.reject(); } diff --git a/apps/browser-extension-wallet/src/hooks/__tests__/useBuildDelegation.test.ts b/apps/browser-extension-wallet/src/hooks/__tests__/useBuildDelegation.test.ts index 8e1dfc48a..e6d8a4540 100644 --- a/apps/browser-extension-wallet/src/hooks/__tests__/useBuildDelegation.test.ts +++ b/apps/browser-extension-wallet/src/hooks/__tests__/useBuildDelegation.test.ts @@ -49,7 +49,6 @@ jest.mock('../../stores', () => ({ }) })); -// eslint-disable-next-line promise/avoid-new const flushPromises = () => new Promise(setImmediate); describe('Testing useBuildDelegation hook', () => { diff --git a/apps/browser-extension-wallet/src/lib/scripts/background/util.ts b/apps/browser-extension-wallet/src/lib/scripts/background/util.ts index a317f75f5..1579e512a 100644 --- a/apps/browser-extension-wallet/src/lib/scripts/background/util.ts +++ b/apps/browser-extension-wallet/src/lib/scripts/background/util.ts @@ -86,7 +86,6 @@ export const launchCip30Popup = async (url: string, windowType: Windows.CreateTy }; const waitForTabLoad = (tab: Tabs.Tab) => - // eslint-disable-next-line promise/avoid-new new Promise((resolve) => { const listener = (tabId: number, changeInfo: Tabs.OnUpdatedChangeInfoType) => { // make sure the status is 'complete' and it's the right tab diff --git a/apps/browser-extension-wallet/src/utils/__tests__/createQueue.test.ts b/apps/browser-extension-wallet/src/utils/__tests__/createQueue.test.ts index 758afeaf2..e6a4942fb 100644 --- a/apps/browser-extension-wallet/src/utils/__tests__/createQueue.test.ts +++ b/apps/browser-extension-wallet/src/utils/__tests__/createQueue.test.ts @@ -1,5 +1,4 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -/* eslint-disable promise/avoid-new */ import { createQueue, TaskQueue } from '../taskQueue'; describe('createQueue', () => { diff --git a/apps/browser-extension-wallet/src/utils/mocks/fake-api-request.ts b/apps/browser-extension-wallet/src/utils/mocks/fake-api-request.ts index bf078cafb..e7902a039 100644 --- a/apps/browser-extension-wallet/src/utils/mocks/fake-api-request.ts +++ b/apps/browser-extension-wallet/src/utils/mocks/fake-api-request.ts @@ -1,7 +1,6 @@ const DEFAULT_TIMEOUT = 1000; export const fakeApiRequest = (response: TResponse, timeout = DEFAULT_TIMEOUT): Promise => - // eslint-disable-next-line promise/avoid-new new Promise((resolve) => { setTimeout(() => resolve(response), timeout); }); diff --git a/apps/browser-extension-wallet/src/utils/taskQueue.ts b/apps/browser-extension-wallet/src/utils/taskQueue.ts index 67bdfacf9..0337630a5 100644 --- a/apps/browser-extension-wallet/src/utils/taskQueue.ts +++ b/apps/browser-extension-wallet/src/utils/taskQueue.ts @@ -37,7 +37,6 @@ export const createQueue = (batchTasks: number, intervalBetweenBatch: number): T if (sent >= batchTasks) { // Reset the sent count sent = 0; - // eslint-disable-next-line promise/avoid-new await new Promise((resolve) => setTimeout(resolve, intervalBetweenBatch)); } execute(); diff --git a/packages/cardano/src/wallet/lib/__tests__/get-block-info-by-hash.test.ts b/packages/cardano/src/wallet/lib/__tests__/get-block-info-by-hash.test.ts index 7f75cf83a..e10093999 100644 --- a/packages/cardano/src/wallet/lib/__tests__/get-block-info-by-hash.test.ts +++ b/packages/cardano/src/wallet/lib/__tests__/get-block-info-by-hash.test.ts @@ -1,7 +1,6 @@ /* eslint-disable no-magic-numbers */ /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-unused-vars */ -/* eslint-disable promise/avoid-new */ import '@testing-library/jest-dom'; import { getBlockInfoByHash } from '../get-block-info-by-hash'; import { stakepoolSearchProviderStub, mockedStakePools } from '../../test/mocks/StakepoolSearchProviderStub'; diff --git a/packages/cardano/src/wallet/lib/__tests__/get-inputs-value.test.ts b/packages/cardano/src/wallet/lib/__tests__/get-inputs-value.test.ts index 37a0952b1..96533029e 100644 --- a/packages/cardano/src/wallet/lib/__tests__/get-inputs-value.test.ts +++ b/packages/cardano/src/wallet/lib/__tests__/get-inputs-value.test.ts @@ -1,7 +1,6 @@ /* eslint-disable no-magic-numbers */ /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-unused-vars */ -/* eslint-disable promise/avoid-new */ /* eslint-disable max-len */ /* eslint-disable sonarjs/no-identical-functions */ import '@testing-library/jest-dom'; diff --git a/packages/cardano/src/wallet/test/mocks/AssetsProviderStub.ts b/packages/cardano/src/wallet/test/mocks/AssetsProviderStub.ts index e3c3f44bb..49cdb3b9f 100644 --- a/packages/cardano/src/wallet/test/mocks/AssetsProviderStub.ts +++ b/packages/cardano/src/wallet/test/mocks/AssetsProviderStub.ts @@ -22,15 +22,13 @@ export const mockedAssets: Asset.AssetInfo[] = [ ]; export const assetsProviderStub = (assets: Asset.AssetInfo[] = mockedAssets): AssetProvider => ({ - getAsset: jest.fn().mockImplementation( - ({ assetId }) => - // eslint-disable-next-line promise/avoid-new - new Promise((resolve) => resolve(assets.find((asset) => asset.assetId === assetId) || assets[0])) - ), - getAssets: jest.fn().mockImplementation( - ({ assetIds }) => - // eslint-disable-next-line promise/avoid-new - new Promise((resolve) => resolve(assets.filter((asset) => assetIds.includes(asset.assetId)) || assets[0])) - ), + getAsset: jest + .fn() + .mockImplementation(async ({ assetId }) => assets.find((asset) => asset.assetId === assetId) || assets[0]), + getAssets: jest + .fn() + .mockImplementation( + async ({ assetIds }) => assets.filter((asset) => assetIds.includes(asset.assetId)) || assets[0] + ), healthCheck: jest.fn().mockResolvedValue({ ok: true }) }); diff --git a/packages/cardano/src/wallet/test/mocks/TxSubmitProviderFake.ts b/packages/cardano/src/wallet/test/mocks/TxSubmitProviderFake.ts index 0428b1fd7..23c95362e 100644 --- a/packages/cardano/src/wallet/test/mocks/TxSubmitProviderFake.ts +++ b/packages/cardano/src/wallet/test/mocks/TxSubmitProviderFake.ts @@ -8,7 +8,6 @@ export const TxSubmitProviderFake = { return { submittedTxs$: submittedTxs.asObservable(), submitTx: ({ signedTransaction }): Promise => - // eslint-disable-next-line promise/avoid-new new Promise((resolve) => { submittedTxs.next(signedTransaction); resolve(); diff --git a/packages/common/src/ui/hooks/useFetchImage.ts b/packages/common/src/ui/hooks/useFetchImage.ts index 562fd8068..06c05ed87 100644 --- a/packages/common/src/ui/hooks/useFetchImage.ts +++ b/packages/common/src/ui/hooks/useFetchImage.ts @@ -31,7 +31,6 @@ type FetchAction = { const handleImageFetch = (image: string) => { const downloadingImage = new Image(); - // eslint-disable-next-line promise/avoid-new const imageResponse: Promise = new Promise((resolve) => { const onLoadEvent = (event: any) => { resolve({ diff --git a/packages/core/src/ui/components/SharedWallet/AddCoSigners/AddCoSigners.stories.tsx b/packages/core/src/ui/components/SharedWallet/AddCoSigners/AddCoSigners.stories.tsx index 243ab5b30..34b6481b8 100644 --- a/packages/core/src/ui/components/SharedWallet/AddCoSigners/AddCoSigners.stories.tsx +++ b/packages/core/src/ui/components/SharedWallet/AddCoSigners/AddCoSigners.stories.tsx @@ -1,4 +1,3 @@ -/* eslint-disable no-magic-numbers, promise/avoid-new */ import React from 'react'; import type { Meta } from '@storybook/react'; @@ -40,7 +39,7 @@ const addressBook = [ const handleResolution = 'addr_test1qzrljm7nskakjydxlr450ktsj08zuw6aktvgfkmmyw9semrkrezryq3ydtmkg0e7e2jvzg443h0ffzfwd09wpcxy2fuql9tk0g' as Wallet.Cardano.PaymentAddress; -let timeout: NodeJS.Timeout; +let timeout: number; const validateAddress: ValidateAddress = async (address) => { if (!address) { @@ -51,10 +50,12 @@ const validateAddress: ValidateAddress = async (address) => { if (timeout) { clearTimeout(timeout); } - timeout = setTimeout(() => { + const twoSeconds = 2000; + timeout = window.setTimeout(() => { clearTimeout(timeout); - resolve(Math.random() < 0.5 ? { isValid: true, handleResolution } : { isValid: false }); - }, 2000); + const factor = 0.5; + resolve(Math.random() < factor ? { isValid: true, handleResolution } : { isValid: false }); + }, twoSeconds); }); } return { From e273aa9e07dfa1911845ba5889cd91bef572b1d3 Mon Sep 17 00:00:00 2001 From: Michael Chappell <7581002+mchappell@users.noreply.github.com> Date: Thu, 11 Apr 2024 15:52:32 +0100 Subject: [PATCH 2/4] fix: [LW-10267] staking persistence local storage (#1064) * fix(extension): add a fallback for stakingBrowserPreferencesPersistence localstorage object * fix: lw-10267 add migration to fix broken staking center * refactor(staking,extension): expose DEFAULT_STAKING_BROWSER_PREFERENCES and apply changes to popup --------- Co-authored-by: przemyslaw.wlodek --- .../MultiDelegationStakingPopup.tsx | 4 +-- .../src/lib/scripts/migrations/migrations.ts | 3 +- .../lib/scripts/migrations/versions/index.ts | 1 + .../scripts/migrations/versions/v1_10_2.ts | 31 +++++++++++++++++++ .../staking/components/StakingContainer.tsx | 4 +-- .../src/features/BrowsePools/constants.ts | 7 ++++- .../staking/src/features/BrowsePools/index.ts | 4 +-- .../staking/src/features/BrowsePools/types.ts | 5 +++ .../outside-handles-provider/types.ts | 7 +---- packages/staking/src/index.ts | 4 +-- 10 files changed, 53 insertions(+), 17 deletions(-) create mode 100644 apps/browser-extension-wallet/src/lib/scripts/migrations/versions/v1_10_2.ts diff --git a/apps/browser-extension-wallet/src/features/delegation/components/MultiDelegationStakingPopup.tsx b/apps/browser-extension-wallet/src/features/delegation/components/MultiDelegationStakingPopup.tsx index fdf8e7a83..3f05828cb 100644 --- a/apps/browser-extension-wallet/src/features/delegation/components/MultiDelegationStakingPopup.tsx +++ b/apps/browser-extension-wallet/src/features/delegation/components/MultiDelegationStakingPopup.tsx @@ -1,4 +1,4 @@ -import { OutsideHandlesProvider, StakingPopup } from '@lace/staking'; +import { DEFAULT_STAKING_BROWSER_PREFERENCES, OutsideHandlesProvider, StakingPopup } from '@lace/staking'; import React, { useCallback, useEffect } from 'react'; import { useAnalyticsContext, @@ -89,7 +89,7 @@ export const MultiDelegationStakingPopup = (): JSX.Element => { ] = useLocalStorage(MULTIDELEGATION_FIRST_VISIT_SINCE_PORTFOLIO_PERSISTENCE_LS_KEY, true); const [stakingBrowserPreferencesPersistence, { updateLocalStorage: setStakingBrowserPreferencesPersistence }] = - useLocalStorage(STAKING_BROWSER_PREFERENCES_LS_KEY); + useLocalStorage(STAKING_BROWSER_PREFERENCES_LS_KEY, DEFAULT_STAKING_BROWSER_PREFERENCES); const walletAddress = walletInfo.addresses?.[0].address?.toString(); const analytics = useAnalyticsContext(); diff --git a/apps/browser-extension-wallet/src/lib/scripts/migrations/migrations.ts b/apps/browser-extension-wallet/src/lib/scripts/migrations/migrations.ts index 46d5496b8..6e87218ae 100644 --- a/apps/browser-extension-wallet/src/lib/scripts/migrations/migrations.ts +++ b/apps/browser-extension-wallet/src/lib/scripts/migrations/migrations.ts @@ -43,7 +43,7 @@ export type Migration = { downgrade?: (password?: string) => MigrationPersistance | Promise; }; -const migrations: Migration[] = [versions.v_1_0_0]; +const migrations: Migration[] = [versions.v_1_10_2]; /** * Applies all migrations in order between the two version provided @@ -137,7 +137,6 @@ export const migrationsRequirePassword = async ( */ export const checkMigrations = async (previousVersion: string, migrationsArray = migrations): Promise => { const currentVersion = runtime.getManifest().version; - // Return if a downgrade is occurring if (isVersionOlderThanOrEqual(currentVersion, previousVersion)) { // TODO: allow migrations if downgrading versions too [LW-5595] diff --git a/apps/browser-extension-wallet/src/lib/scripts/migrations/versions/index.ts b/apps/browser-extension-wallet/src/lib/scripts/migrations/versions/index.ts index c0d8c76da..0dcc43d33 100644 --- a/apps/browser-extension-wallet/src/lib/scripts/migrations/versions/index.ts +++ b/apps/browser-extension-wallet/src/lib/scripts/migrations/versions/index.ts @@ -1 +1,2 @@ export * from './v1_0_0'; +export * from './v1_10_2'; diff --git a/apps/browser-extension-wallet/src/lib/scripts/migrations/versions/v1_10_2.ts b/apps/browser-extension-wallet/src/lib/scripts/migrations/versions/v1_10_2.ts new file mode 100644 index 000000000..8983bfe51 --- /dev/null +++ b/apps/browser-extension-wallet/src/lib/scripts/migrations/versions/v1_10_2.ts @@ -0,0 +1,31 @@ +/* eslint-disable camelcase, @typescript-eslint/no-empty-function, no-console */ +import { getItemFromLocalStorage, removeItemFromLocalStorage } from '../util'; +import { Migration } from '../migrations'; + +const MIGRATION_VERSION = '1.10.2'; + +export const v_1_10_2: Migration = { + version: MIGRATION_VERSION, + upgrade: async () => ({ + prepare: () => { + try { + /** + * Between the v1.9.0 and v1.10.0 releases, the 'stakingBrowserPreferences' + * localStorage was updated, and contained a change in spelling, removing this + * object allows it to be saved again and any issues related to spelling + * are mitigated + * */ + removeItemFromLocalStorage('stakingBrowserPreferences'); + } catch (error) { + console.log(`error executing migration ${MIGRATION_VERSION}: ${error}`); + throw error; + } + }, + assert: () => { + const stakingBrowserPreferences = getItemFromLocalStorage('stakingBrowserPreferences'); + return !!stakingBrowserPreferences; + }, + persist: () => {}, + rollback: () => {} + }) +}; diff --git a/apps/browser-extension-wallet/src/views/browser-view/features/staking/components/StakingContainer.tsx b/apps/browser-extension-wallet/src/views/browser-view/features/staking/components/StakingContainer.tsx index c9d8d1bd7..3df3675da 100644 --- a/apps/browser-extension-wallet/src/views/browser-view/features/staking/components/StakingContainer.tsx +++ b/apps/browser-extension-wallet/src/views/browser-view/features/staking/components/StakingContainer.tsx @@ -10,7 +10,7 @@ import { compactNumberWithUnit } from '@utils/format-number'; import { isMultidelegationSupportedByDevice } from '@views/browser/features/staking'; import { useWalletStore } from '@stores'; import { useAnalyticsContext, useCurrencyStore, useExternalLinkOpener } from '@providers'; -import { OutsideHandlesProvider } from '@lace/staking'; +import { DEFAULT_STAKING_BROWSER_PREFERENCES, OutsideHandlesProvider } from '@lace/staking'; import { useBalances, useFetchCoinPrice, useLocalStorage } from '@hooks'; import { MULTIDELEGATION_FIRST_VISIT_LS_KEY, @@ -27,7 +27,7 @@ export const StakingContainer = (): React.ReactElement => { const analytics = useAnalyticsContext(); const [stakingBrowserPreferencesPersistence, { updateLocalStorage: setStakingBrowserPreferencesPersistence }] = - useLocalStorage(STAKING_BROWSER_PREFERENCES_LS_KEY); + useLocalStorage(STAKING_BROWSER_PREFERENCES_LS_KEY, DEFAULT_STAKING_BROWSER_PREFERENCES); const [multidelegationFirstVisit, { updateLocalStorage: setMultidelegationFirstVisit }] = useLocalStorage( MULTIDELEGATION_FIRST_VISIT_LS_KEY, true diff --git a/packages/staking/src/features/BrowsePools/constants.ts b/packages/staking/src/features/BrowsePools/constants.ts index fee9816f3..fca7546d3 100644 --- a/packages/staking/src/features/BrowsePools/constants.ts +++ b/packages/staking/src/features/BrowsePools/constants.ts @@ -1,4 +1,4 @@ -import { BrowsePoolsView, StakePoolSortOptions } from './types'; +import { BrowsePoolsView, StakePoolSortOptions, StakingBrowserPreferences } from './types'; import { getDefaultSortOrderByField } from './utils'; export const SEARCH_DEBOUNCE_IN_MS = 300; @@ -9,3 +9,8 @@ export const DEFAULT_SORT_OPTIONS: StakePoolSortOptions = { }; export const DEFAULT_BROWSE_POOLS_VIEW: BrowsePoolsView = BrowsePoolsView.grid; + +export const DEFAULT_STAKING_BROWSER_PREFERENCES: StakingBrowserPreferences = { + poolsView: DEFAULT_BROWSE_POOLS_VIEW, + selectedPoolIds: [], +}; diff --git a/packages/staking/src/features/BrowsePools/index.ts b/packages/staking/src/features/BrowsePools/index.ts index 7c91737bb..7681853e0 100644 --- a/packages/staking/src/features/BrowsePools/index.ts +++ b/packages/staking/src/features/BrowsePools/index.ts @@ -2,11 +2,11 @@ export { BrowsePools } from './BrowsePools'; export { BrowsePoolsPreferencesCard } from './BrowsePoolsPreferencesCard'; export { getPoolInfos } from './queries'; export { useBrowsePoolsPersistence } from './hooks'; -export { DEFAULT_SORT_OPTIONS } from './constants'; +export { DEFAULT_SORT_OPTIONS, DEFAULT_STAKING_BROWSER_PREFERENCES } from './constants'; // TODO: remove once multi delegation feature is GA'd export { getSaturationLevel, isOversaturated, getDefaultSortOrderByField } from './utils'; -export type { StakePoolSortOptions, TranslationsFor, SortField, SortOrder } from './types'; +export type { StakingBrowserPreferences, StakePoolSortOptions, TranslationsFor, SortField, SortOrder } from './types'; export { BrowsePoolsView } from './types'; export { StakePoolCardProgressBar } from './StakePoolCard'; export { StakePoolsListRowSkeleton, config as stakePoolTableConfig } from './StakePoolsList'; diff --git a/packages/staking/src/features/BrowsePools/types.ts b/packages/staking/src/features/BrowsePools/types.ts index 9c561e754..6e76f49b7 100644 --- a/packages/staking/src/features/BrowsePools/types.ts +++ b/packages/staking/src/features/BrowsePools/types.ts @@ -22,3 +22,8 @@ export type StakePoolSortOptions = { }; export type TranslationsFor = Record; + +export type StakingBrowserPreferences = { + poolsView: BrowsePoolsView; + selectedPoolIds: string[]; +}; diff --git a/packages/staking/src/features/outside-handles-provider/types.ts b/packages/staking/src/features/outside-handles-provider/types.ts index 2282239c1..66d1c28ab 100644 --- a/packages/staking/src/features/outside-handles-provider/types.ts +++ b/packages/staking/src/features/outside-handles-provider/types.ts @@ -1,7 +1,7 @@ import { TxBuilder } from '@cardano-sdk/tx-construction'; import { Wallet } from '@lace/cardano'; import { AssetActivityListProps } from '@lace/core'; -import { BrowsePoolsView, StakePoolSortOptions } from 'features/BrowsePools/types'; +import { StakePoolSortOptions, StakingBrowserPreferences } from 'features/BrowsePools'; import type { IAnalyticsTracker } from '@lace/common'; type WalletBalance = { @@ -40,11 +40,6 @@ export enum StateStatus { ERROR = 'error', } -export interface StakingBrowserPreferences { - poolsView: BrowsePoolsView; - selectedPoolIds: string[]; -} - export interface IBlockchainProvider { stakePoolProvider: Wallet.StakePoolProvider; assetProvider: Wallet.AssetProvider; diff --git a/packages/staking/src/index.ts b/packages/staking/src/index.ts index 1bd7a9566..0759ea148 100644 --- a/packages/staking/src/index.ts +++ b/packages/staking/src/index.ts @@ -1,7 +1,7 @@ export { Staking, StakingPopup } from './features/staking'; -export { BrowsePoolsPreferencesCard } from './features/BrowsePools'; +export type { StakingBrowserPreferences } from 'features/BrowsePools'; +export { BrowsePoolsPreferencesCard, DEFAULT_STAKING_BROWSER_PREFERENCES } from './features/BrowsePools'; export { OutsideHandlesProvider } from './features/outside-handles-provider'; -export type { StakingBrowserPreferences } from './features/outside-handles-provider'; export { MAX_POOLS_COUNT } from './features/store'; // TODO: remove once multi delegaion feature is GA'd From 97256cb982262be93fc65b8ff6ced9b3e89cda11 Mon Sep 17 00:00:00 2001 From: Michael Chappell <7581002+mchappell@users.noreply.github.com> Date: Thu, 11 Apr 2024 16:29:35 +0100 Subject: [PATCH 3/4] chore(extension): update lace version v1.10.2 (#1066) --- apps/browser-extension-wallet/manifest.json | 2 +- apps/browser-extension-wallet/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/browser-extension-wallet/manifest.json b/apps/browser-extension-wallet/manifest.json index e85486290..18c96b95b 100644 --- a/apps/browser-extension-wallet/manifest.json +++ b/apps/browser-extension-wallet/manifest.json @@ -1,7 +1,7 @@ { "name": "$WALLET_MANIFEST_NAME", "description": "One fast, accessible, and secure platform for digital assets, DApps, NFTs, and DeFi.", - "version": "1.10.1", + "version": "1.10.2", "manifest_version": 3, "key": "$LACE_EXTENSION_KEY", "icons": { diff --git a/apps/browser-extension-wallet/package.json b/apps/browser-extension-wallet/package.json index 432ea0dab..cdc8667ac 100644 --- a/apps/browser-extension-wallet/package.json +++ b/apps/browser-extension-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@lace/browser-extension-wallet", - "version": "1.10.1", + "version": "1.10.2", "description": "A fully capable wallet packaged as browser extensions for Chrome, Firefox, and Edge", "homepage": "https://github.com/input-output-hk/lace/blob/master/apps/browser-extension-wallet/README.md", "bugs": { From ce6a4141d945971c4182dfee0e26578cbbfa5b0e Mon Sep 17 00:00:00 2001 From: Tom Mayel <143514860+tommayeliog@users.noreply.github.com> Date: Thu, 11 Apr 2024 18:44:29 +0100 Subject: [PATCH 4/4] chore: [LW-10275] fix tooling to build developer preview app (#1065) --- apps/browser-extension-wallet/.env.developerpreview | 1 + apps/browser-extension-wallet/webpack.common.dev.js | 2 +- apps/browser-extension-wallet/webpack.common.js | 2 +- apps/browser-extension-wallet/webpack.common.prod.js | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/browser-extension-wallet/.env.developerpreview b/apps/browser-extension-wallet/.env.developerpreview index 59bf74f4b..b92bf9963 100644 --- a/apps/browser-extension-wallet/.env.developerpreview +++ b/apps/browser-extension-wallet/.env.developerpreview @@ -59,6 +59,7 @@ PRODUCTION_MODE_TRACKING=false POSTHOG_DEV_TOKEN_MAINNET=phc_gH96Lx5lEVXTTWEyytSdTFPDk3Xsxwi4BqG88mKObd1 POSTHOG_DEV_TOKEN_PREPROD=phc_Xlmldm6EYSfQVgB9Uxm3b2xC1noDlgFFXpF9AJ6SMfJ POSTHOG_DEV_TOKEN_PREVIEW=phc_e8SaOOWpXpNE59TnpLumeUjWm4iv024AWjhQqU406jr +POSTHOG_DEV_TOKEN_SANCHONET=phc_OUu6sPucDu5S6skRmYbWN5Jn8TpggWTQu1Y1ETkm3xt # Cardano Services CARDANO_SERVICES_URL_MAINNET=https://dev-mainnet.lw.iog.io diff --git a/apps/browser-extension-wallet/webpack.common.dev.js b/apps/browser-extension-wallet/webpack.common.dev.js index ef6db8300..35825150a 100644 --- a/apps/browser-extension-wallet/webpack.common.dev.js +++ b/apps/browser-extension-wallet/webpack.common.dev.js @@ -48,7 +48,7 @@ module.exports = path: '.env', safe: false, silent: false, - defaults: process.env.BUILD_DEV_PREVIEW === 'true' ? '.env.devpreview' : true, + defaults: process.env.BUILD_DEV_PREVIEW === 'true' ? '.env.developerpreview' : true, systemvars: true, allowEmptyValues: true }), diff --git a/apps/browser-extension-wallet/webpack.common.js b/apps/browser-extension-wallet/webpack.common.js index fdd930229..8c4d06e13 100644 --- a/apps/browser-extension-wallet/webpack.common.js +++ b/apps/browser-extension-wallet/webpack.common.js @@ -86,7 +86,7 @@ module.exports = () => { path: '.env', safe: false, silent: false, - defaults: process.env.BUILD_DEV_PREVIEW === 'true' ? '.env.devpreview' : true, + defaults: process.env.BUILD_DEV_PREVIEW === 'true' ? '.env.developerpreview' : true, systemvars: true, allowEmptyValues: true }), diff --git a/apps/browser-extension-wallet/webpack.common.prod.js b/apps/browser-extension-wallet/webpack.common.prod.js index 98a4e4e58..73cff79a0 100644 --- a/apps/browser-extension-wallet/webpack.common.prod.js +++ b/apps/browser-extension-wallet/webpack.common.prod.js @@ -16,7 +16,7 @@ module.exports = () => ({ path: '.env', safe: false, silent: false, - defaults: process.env.BUILD_DEV_PREVIEW === 'true' ? '.env.devpreview' : true, + defaults: process.env.BUILD_DEV_PREVIEW === 'true' ? '.env.developerpreview' : true, systemvars: true, allowEmptyValues: true }),