Skip to content

Commit

Permalink
while onboarding we request the address from Alice after making sure …
Browse files Browse the repository at this point in the history
…we have already our real address or at least a dummy
  • Loading branch information
silkroadnomad committed Apr 1, 2024
1 parent 1dd0707 commit 95ce4ee
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/lib/components/OnBoarding.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@
}
}
$:{
if(!requested &&
$connectedPeers >1 && //if connected
$did !== undefined &&
$orbitdb !== undefined ){
requestAddress($did,false,onBoardingToken)
requested = true
}
}
// $:{
// if(!requested &&
// $connectedPeers >1 && //if connected
// $did !== undefined &&
// $orbitdb !== undefined ){
// requestAddress($did,false,onBoardingToken)
// requested = true
// }
// }
$:scannedContact = $myAddressBook?.filter((it) => { return it.owner === $did })
$:{ //we need a dummy - if we have already real data don't ask them from the invited person!
Expand All @@ -66,6 +66,8 @@
sha256(JSON.stringify($selectedAddr)).then((sha256Hash)=>{
$selectedAddr._id = sha256Hash
$dbMyAddressBook.put($selectedAddr).then((orbitHash)=>console.log("dummy written with orbitHash",orbitHash))
requestAddress($did,false,onBoardingToken)
}) //hash is staying until end of life - we have only one address
}
dummyWritten=true
Expand Down

0 comments on commit 95ce4ee

Please sign in to comment.