diff --git a/src/utils/environment.ts b/src/utils/environment.ts index c9706cbfc6..55050a497c 100644 --- a/src/utils/environment.ts +++ b/src/utils/environment.ts @@ -1,11 +1,12 @@ import { ARK } from "@ardenthq/sdk-ark"; import { Environment } from "@ardenthq/sdk-profiles"; import { Mainsail } from "@ardenthq/sdk-mainsail"; +import { StubStorage } from "@/tests/mocks"; import { connectedTransport as ledgerTransportFactory } from "@/app/contexts/Ledger/transport"; import { httpClient } from "@/app/services"; -import { StubStorage } from "@/tests/mocks"; -import { isE2E, isUnit } from "@/utils/test-helpers"; import { initializeArkNetworks } from "@/utils/migrations/initialize-ark-networks"; +import { initializeMainsailNetworks } from "./migrations/initialize-mainsail-networks"; +import { isE2E, isUnit } from "@/utils/test-helpers"; import { updateArkConstants } from "@/utils/migrations/update-ark-constants"; import { updateArkNethashes } from "@/utils/migrations/update-ark-nethashes"; @@ -27,8 +28,9 @@ export const initializeEnvironment = (): Environment => { "0.0.9": initializeArkNetworks, "1.1.0": updateArkConstants, "1.2.0": updateArkNethashes, + "1.2.1": initializeMainsailNetworks, }, - "1.2.0", + "1.2.1", ); return env; diff --git a/src/utils/migrations/initialize-mainsail-networks.ts b/src/utils/migrations/initialize-mainsail-networks.ts new file mode 100644 index 0000000000..fd0ab5f1be --- /dev/null +++ b/src/utils/migrations/initialize-mainsail-networks.ts @@ -0,0 +1,13 @@ +import { Mainsail } from "@ardenthq/sdk-mainsail"; + +export const initializeMainsailNetworks = ({ data }) => { + console.log("mainsail network") + if (!data.networks) { + data.networks = {}; + } + + data.networks.mainsail = { + devnet: Mainsail.manifest.networks["mainsail.devnet"], + }; + console.log({ data }) +};