chore: avoid importing all chopsticks in main chunk (#49)

This commit is contained in:
Carlo Sala
2025-05-20 16:28:56 +02:00
committed by GitHub
parent ee574f2f4c
commit 4e5aa4bb66
3 changed files with 17 additions and 14 deletions
+3 -2
View File
@@ -4,7 +4,6 @@ import { Chopsticks } from "@/components/Icons"
import { Button } from "@/components/ui/button"
import { chainClient$, lookup$ } from "@/state/chains/chain.state"
import { getTypeComplexity } from "@/utils"
import { setStorage } from "@acala-network/chopsticks-core"
import { toHex } from "@polkadot-api/utils"
import { state, useStateObservable } from "@react-rxjs/core"
import { createSignal } from "@react-rxjs/utils"
@@ -112,7 +111,9 @@ export const StorageSet: FC = () => {
)
return false
await setStorage(chopsticks, [
await (
await import("@acala-network/chopsticks-core")
).setStorage(chopsticks, [
[currentValue.encodedKey, toHex(currentValue.value)],
])
await chopsticks.newBlock()