Skip to content

Commit

Permalink
Chore: mark grid as raw to disable converting it by Vue to proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
0oM4R committed Jun 19, 2024
1 parent 2cbb3ca commit 8363e82
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions packages/playground/src/utils/grid.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { BackendStorageType, GridClient, KeypairType, NetworkEnv } from "@threefold/grid_client";
import { InsufficientBalanceError } from "@threefold/types";
import { markRaw } from "vue";

import type { SSHKeyData } from "@/types";

Expand All @@ -10,18 +11,20 @@ export async function getGrid(
projectName?: string,
) {
if (!profile) return null;
const grid = new GridClient({
mnemonic: profile.mnemonic,
network,
backendStorageType: BackendStorageType.tfkvstore,
keypairType: profile.keypairType || KeypairType.sr25519,
projectName,
substrateURL: window.env.SUBSTRATE_URL,
proxyURL: window.env.GRIDPROXY_URL,
graphqlURL: window.env.GRAPHQL_URL,
activationURL: window.env.ACTIVATION_SERVICE_URL,
relayURL: window.env.RELAY_DOMAIN,
});
const grid = markRaw(
new GridClient({
mnemonic: profile.mnemonic,
network,
backendStorageType: BackendStorageType.tfkvstore,
keypairType: profile.keypairType || KeypairType.sr25519,
projectName,
substrateURL: window.env.SUBSTRATE_URL,
proxyURL: window.env.GRIDPROXY_URL,
graphqlURL: window.env.GRAPHQL_URL,
activationURL: window.env.ACTIVATION_SERVICE_URL,
relayURL: window.env.RELAY_DOMAIN,
}),
);
try {
await grid.connect();
} catch (e) {
Expand Down

0 comments on commit 8363e82

Please sign in to comment.