diff --git a/.github/workflows/release_docker.yml b/.github/workflows/release_docker.yml index 62c6464c51e..5102bcdc25e 100644 --- a/.github/workflows/release_docker.yml +++ b/.github/workflows/release_docker.yml @@ -46,11 +46,19 @@ jobs: uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # pin@v5 with: images: docker-registry.iota.org/iota-node + # mapping semver tags to networks + # v{MAJOR}.{MINOR}.{PATCH}-alpha -> alphanet + # v{MAJOR}.{MINOR}.{PATCH}-beta -> devnet + # v{MAJOR}.{MINOR}.{PATCH}-rc -> testnet + # v{MAJOR}.{MINOR}.{PATCH} -> mainnet tags: | type=raw,value={{sha}},enable=${{ github.event_name == 'workflow_dispatch' }} type=raw,value=latest,enable=${{ github.event_name == 'workflow_dispatch' }} type=raw,value={{tag}},enable=${{ github.event_name == 'release' }} - type=match,pattern=(.*)-v\d+\.\d+\.\d+,group=1,enable=${{ github.event_name == 'release' }} + type=match,pattern=v\d+\.\d+\.\d+-alpha.*\d*,group=0,value=alphanet,enable=${{ github.event_name == 'release' }} + type=match,pattern=v\d+\.\d+\.\d+-beta.*\d*,group=0,value=devnet,enable=${{ github.event_name == 'release' }} + type=match,pattern=v\d+\.\d+\.\d+-rc.*\d*,group=0,value=testnet,enable=${{ github.event_name == 'release' }} + type=match,pattern=v\d+\.\d+\.\d+$,group=0,value=mainnet,enable=${{ github.event_name == 'release' }} - name: Login to Docker Registry uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # pin@v3 @@ -97,11 +105,19 @@ jobs: uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # pin@v5 with: images: docker-registry.iota.org/iota-indexer + # mapping semver tags to networks + # v{MAJOR}.{MINOR}.{PATCH}-alpha -> alphanet + # v{MAJOR}.{MINOR}.{PATCH}-beta -> devnet + # v{MAJOR}.{MINOR}.{PATCH}-rc -> testnet + # v{MAJOR}.{MINOR}.{PATCH} -> mainnet tags: | type=raw,value={{sha}},enable=${{ github.event_name == 'workflow_dispatch' }} type=raw,value=latest,enable=${{ github.event_name == 'workflow_dispatch' }} type=raw,value={{tag}},enable=${{ github.event_name == 'release' }} - type=match,pattern=(.*)-v\d+\.\d+\.\d+,group=1,enable=${{ github.event_name == 'release' }} + type=match,pattern=v\d+\.\d+\.\d+-alpha.*\d*,group=0,value=alphanet,enable=${{ github.event_name == 'release' }} + type=match,pattern=v\d+\.\d+\.\d+-beta.*\d*,group=0,value=devnet,enable=${{ github.event_name == 'release' }} + type=match,pattern=v\d+\.\d+\.\d+-rc.*\d*,group=0,value=testnet,enable=${{ github.event_name == 'release' }} + type=match,pattern=v\d+\.\d+\.\d+$,group=0,value=mainnet,enable=${{ github.event_name == 'release' }} - name: Login to Docker Registry uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # pin@v3 @@ -148,11 +164,19 @@ jobs: uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # pin@v5 with: images: docker-registry.iota.org/iota-tools + # mapping semver tags to networks + # v{MAJOR}.{MINOR}.{PATCH}-alpha -> alphanet + # v{MAJOR}.{MINOR}.{PATCH}-beta -> devnet + # v{MAJOR}.{MINOR}.{PATCH}-rc -> testnet + # v{MAJOR}.{MINOR}.{PATCH} -> mainnet tags: | type=raw,value={{sha}},enable=${{ github.event_name == 'workflow_dispatch' }} type=raw,value=latest,enable=${{ github.event_name == 'workflow_dispatch' }} type=raw,value={{tag}},enable=${{ github.event_name == 'release' }} - type=match,pattern=(.*)-v\d+\.\d+\.\d+,group=1,enable=${{ github.event_name == 'release' }} + type=match,pattern=v\d+\.\d+\.\d+-alpha.*\d*,group=0,value=alphanet,enable=${{ github.event_name == 'release' }} + type=match,pattern=v\d+\.\d+\.\d+-beta.*\d*,group=0,value=devnet,enable=${{ github.event_name == 'release' }} + type=match,pattern=v\d+\.\d+\.\d+-rc.*\d*,group=0,value=testnet,enable=${{ github.event_name == 'release' }} + type=match,pattern=v\d+\.\d+\.\d+$,group=0,value=mainnet,enable=${{ github.event_name == 'release' }} - name: Login to Docker Registry uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # pin@v3 @@ -199,11 +223,19 @@ jobs: uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # pin@v5 with: images: docker-registry.iota.org/iota-graphql-rpc + # mapping semver tags to networks + # v{MAJOR}.{MINOR}.{PATCH}-alpha -> alphanet + # v{MAJOR}.{MINOR}.{PATCH}-beta -> devnet + # v{MAJOR}.{MINOR}.{PATCH}-rc -> testnet + # v{MAJOR}.{MINOR}.{PATCH} -> mainnet tags: | type=raw,value={{sha}},enable=${{ github.event_name == 'workflow_dispatch' }} type=raw,value=latest,enable=${{ github.event_name == 'workflow_dispatch' }} type=raw,value={{tag}},enable=${{ github.event_name == 'release' }} - type=match,pattern=(.*)-v\d+\.\d+\.\d+,group=1,enable=${{ github.event_name == 'release' }} + type=match,pattern=v\d+\.\d+\.\d+-alpha.*\d*,group=0,value=alphanet,enable=${{ github.event_name == 'release' }} + type=match,pattern=v\d+\.\d+\.\d+-beta.*\d*,group=0,value=devnet,enable=${{ github.event_name == 'release' }} + type=match,pattern=v\d+\.\d+\.\d+-rc.*\d*,group=0,value=testnet,enable=${{ github.event_name == 'release' }} + type=match,pattern=v\d+\.\d+\.\d+$,group=0,value=mainnet,enable=${{ github.event_name == 'release' }} - name: Login to Docker Registry uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # pin@v3 diff --git a/apps/apps-backend/src/features/features.controller.ts b/apps/apps-backend/src/features/features.controller.ts index e1400b1d57a..e71e4b326a4 100644 --- a/apps/apps-backend/src/features/features.controller.ts +++ b/apps/apps-backend/src/features/features.controller.ts @@ -64,6 +64,12 @@ export class FeaturesController { [Feature.AccountFinder]: { defaultValue: false, }, + [Feature.WalletDashboardMigration]: { + defaultValue: false, + }, + [Feature.WalletDashboardSupplyIncreaseVesting]: { + defaultValue: false, + }, }, dateUpdated: new Date().toISOString(), }; diff --git a/apps/core/src/constants/features.enum.ts b/apps/core/src/constants/features.enum.ts index 615c80386e3..3670db4edc1 100644 --- a/apps/core/src/constants/features.enum.ts +++ b/apps/core/src/constants/features.enum.ts @@ -18,4 +18,6 @@ export enum Feature { NetworkOutageOverride = 'network-outage-override', ModuleSourceVerification = 'module-source-verification', WalletEffectsOnlySharedTransaction = 'wallet-effects-only-shared-transaction', + StardustMigration = 'migration', + SupplyIncreaseVesting = 'supply-increase-vesting', } diff --git a/apps/wallet-dashboard/app/(protected)/components/sidebar/Sidebar.tsx b/apps/wallet-dashboard/app/(protected)/components/sidebar/Sidebar.tsx index 0f49225192d..03742f9e8e4 100644 --- a/apps/wallet-dashboard/app/(protected)/components/sidebar/Sidebar.tsx +++ b/apps/wallet-dashboard/app/(protected)/components/sidebar/Sidebar.tsx @@ -4,13 +4,24 @@ import { PROTECTED_ROUTES } from '@/lib/constants/routes.constants'; import { IotaLogoMark } from '@iota/ui-icons'; import { SidebarItem } from './SidebarItem'; +import { Feature } from '@iota/core'; +import { useFeature } from '@growthbook/growthbook-react'; export function Sidebar() { + const featureFlags = { + Migrations: useFeature(Feature.StardustMigration).value, + Vesting: useFeature(Feature.SupplyIncreaseVesting).value, + }; + + const filteredRoutes = PROTECTED_ROUTES.filter(({ title }) => { + return title in featureFlags ? featureFlags[title as keyof typeof featureFlags] : true; + }); + return (