Avoid crypto.randomUUID because it is only available in "secure" contexts

This commit is contained in:
Tony Garnock-Jones 2022-10-18 21:01:47 +02:00
parent d57bcd06c4
commit ef88fa5aec
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
import { Dataspace, Ref, Sturdy, Reader, Schemas, Embedded } from "@syndicate-lang/core";
import { Dataspace, Ref, Sturdy, Reader, Schemas, Embedded, randomId } from "@syndicate-lang/core";
import html from "@syndicate-lang/html";
import wsRelay from "@syndicate-lang/ws-relay";
import { ExampleDefinition } from './gen/example';
@ -23,7 +23,7 @@ function bootApp(ds: Ref) {
const serverCap = Sturdy.asSturdyRef(new Reader<Ref>(
'<ref "syndicate" [] #[pkgN9TBmEd3Q04grVG4Zdw==]>').next());
const this_instance = crypto.randomUUID();
const this_instance = randomId(16);
during wsRelay.Resolved({
"addr": wsRelay.RelayAddress(Schemas.transportAddress.WebSocket(