nomad-xyz/monorepo

fix: configuration DI in sdk-bridge (discussion)

Opened this issue · 0 comments

khcd commented

Currently experiencing wasm issues due to configuration wasm being a second order dependency of sdk bridge package.

allow https://github.com/nomad-xyz/rust/tree/main/configuration/src to be injected as a dependency via constructor or other means

currently:

const nomadSDK = await import("@nomad-xyz/sdk-bridge");
const nomad = new nomadSDK.BridgeContext("development");

proposed:

const nomadSDK = await import("@nomad-xyz/sdk-bridge");
import * as configuration from "@nomad-xyz/configuration";
const nomad = new nomadSDK.BridgeContext(configuration.getBuiltin("development"));