Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
goga-m committed Nov 18, 2024
1 parent 72db3a9 commit 77c5939
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/utils/environment.ts
Original file line number Diff line number Diff line change
@@ -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";

Expand All @@ -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;
Expand Down
13 changes: 13 additions & 0 deletions src/utils/migrations/initialize-mainsail-networks.ts
Original file line number Diff line number Diff line change
@@ -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 })
};

0 comments on commit 77c5939

Please sign in to comment.