diff --git a/DEV.md b/DEV.md index 3418ada..8da92c7 100644 --- a/DEV.md +++ b/DEV.md @@ -72,7 +72,17 @@ cargo run -p ngcli -- --save-key --save-config -s 127.0.0.1,14400, -u admin add-invitation --notos +``` + +and then open the link after replacing the port number from `14400` to `1421`. + +- run a local instance of `ngaccount`. this is useful if you want to test or develop the ngaccount part of the flow.. See the [README of ngaccount here](ngaccount/README.md). diff --git a/ng-app/src/routes/WalletCreate.svelte b/ng-app/src/routes/WalletCreate.svelte index 40163f6..8cb218d 100644 --- a/ng-app/src/routes/WalletCreate.svelte +++ b/ng-app/src/routes/WalletCreate.svelte @@ -195,9 +195,10 @@ invitation = await ng.decode_invitation(param.get("i")); window.location.replace(window.location.href.split("?")[0]); } else if (param.get("i")) { - invitation = await ng.get_local_bootstrap( + invitation = await ng.get_local_bootstrap_with_public( location.href, - param.get("i") + param.get("i"), + import.meta.env.PROD ); console.log("invitation", invitation); if (invitation && invitation.V0.url) { @@ -215,7 +216,9 @@ } } else { pre_invitation = await ng.get_local_bootstrap_with_public( - location.href + location.href, + undefined, + true ); console.log("pre_invitation", pre_invitation); } diff --git a/ng-sdk-js/src/lib.rs b/ng-sdk-js/src/lib.rs index 6c62fb3..7a1deb2 100644 --- a/ng-sdk-js/src/lib.rs +++ b/ng-sdk-js/src/lib.rs @@ -78,8 +78,12 @@ pub async fn get_local_bootstrap(location: String, invite: JsValue) -> JsValue { } #[wasm_bindgen] -pub async fn get_local_bootstrap_with_public(location: String, invite: JsValue) -> JsValue { - let res = retrieve_local_bootstrap(location, invite.as_string(), true).await; +pub async fn get_local_bootstrap_with_public( + location: String, + invite: JsValue, + must_be_public: bool, +) -> JsValue { + let res = retrieve_local_bootstrap(location, invite.as_string(), must_be_public).await; if res.is_some() { serde_wasm_bindgen::to_value(&res.unwrap()).unwrap() } else {