Avoid crypto.randomUUID because it is only available in "secure" contexts
This commit is contained in:
parent
d57bcd06c4
commit
ef88fa5aec
|
@ -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 html from "@syndicate-lang/html";
|
||||||
import wsRelay from "@syndicate-lang/ws-relay";
|
import wsRelay from "@syndicate-lang/ws-relay";
|
||||||
import { ExampleDefinition } from './gen/example';
|
import { ExampleDefinition } from './gen/example';
|
||||||
|
@ -23,7 +23,7 @@ function bootApp(ds: Ref) {
|
||||||
const serverCap = Sturdy.asSturdyRef(new Reader<Ref>(
|
const serverCap = Sturdy.asSturdyRef(new Reader<Ref>(
|
||||||
'<ref "syndicate" [] #[pkgN9TBmEd3Q04grVG4Zdw==]>').next());
|
'<ref "syndicate" [] #[pkgN9TBmEd3Q04grVG4Zdw==]>').next());
|
||||||
|
|
||||||
const this_instance = crypto.randomUUID();
|
const this_instance = randomId(16);
|
||||||
|
|
||||||
during wsRelay.Resolved({
|
during wsRelay.Resolved({
|
||||||
"addr": wsRelay.RelayAddress(Schemas.transportAddress.WebSocket(
|
"addr": wsRelay.RelayAddress(Schemas.transportAddress.WebSocket(
|
||||||
|
|
Loading…
Reference in New Issue