minor fixes

Niko PLP 2 weeks ago
parent 990fec1869
commit 7b1d2f50c2
  1. 2
      helpers/nextgraphweb/README.md
  2. 3
      helpers/nextgraphweb/src/index.ts
  3. 2
      ng-repo/src/types.rs
  4. 2
      ng-sdk-js/example-webapp-react/src/Contacts.tsx

@ -24,7 +24,7 @@ And our community forum where you can ask questions is here [https://forum.nextg
Read our [getting started guide](https://docs.nextgraph.org/en/getting-started/).
You need to create a Wallet for yourself, on one of our Public Broker Service Provider. Alternativey, you can do everything locally, as [described below](#local-development)
You need to create a Wallet for yourself, on one of our Public Broker Service Provider. Alternatively, you can do everything locally, as [described below](#local-development)
```
npm i nextgraphweb

@ -138,7 +138,6 @@ async function rpc( method:string, args?: any) : Promise<any> {
const { readable, writablePort } = new RemoteReadableStream();
//console.log("POSTING",method, args);
if (method==="doc_subscribe") {
let callback = args[2];
let new_args = [args[0],args[1]];
initialized?.postMessage({ method, args:new_args, port: writablePort }, iframe_config.origin, [writablePort]);
@ -147,14 +146,12 @@ async function rpc( method:string, args?: any) : Promise<any> {
resolve(()=>{
// unsub function that does nothing.
//TODO: implement it
//console.log("unsubscribed!");
});
for (var msg; msg = await reader.read(); ) {
if (msg.done) break;
if (msg.value.error) {
throw new Error(msg.value.ret);
} else if (msg.value.stream) {
//console.log("GOT",msg.value.ret);
(callback)(msg.value.ret);
}
// TODO: deal with end of stream

@ -2761,7 +2761,7 @@ pub struct CommitContentV0 {
pub metadata: Vec<u8>,
/// reference to an Object with a CommitBody inside.
/// When the commit is reverted or erased (after compaction/snapshot), the CommitBody is deleted, creating a dangling reference
/// When the commit is reverted or erased (before compaction/snapshot), the CommitBody is deleted, creating a dangling reference
pub body: ObjectRef,
}

@ -21,7 +21,7 @@ export const Contacts: FunctionComponent = () => {
return <>
<div className="centered">
<div className="flex flex-wrap justify-center gap-5 mb-10">
<div className="flex flex-wrap justify-center gap-5 mt-10 mb-10">
<MakeContact/>
</div>
<div className="flex flex-wrap justify-center gap-5 mb-10">

Loading…
Cancel
Save