helium / maker-starter-app

Apache License 2.0
36 stars 39 forks source link

Unable to Onboard a new hotspot using the maker starter app #31

Closed cmdl-dev closed 2 years ago

cmdl-dev commented 2 years ago

Hello,

I'm am trying to onboard a new hotspot, but unable to finish the process. I keep getting a 404 hotspot not found when checking the hotspot detail using the helium sdk. getHotspotDetails(hotspotAddress)

File: HotspotSetupWifiConnectingScreen.tsx
  const goToNextStep = useCallback(async () => {
    const address = await getAddress()
    const hotspot = await getHotspotDetails(hotspotAddress)
    if (hotspot && hotspot.owner === address) {
      navigation.replace('OwnedHotspotErrorScreen')
    } else if (hotspot && hotspot.owner !== address) {
      navigation.replace('NotHotspotOwnerErrorScreen')
    } else {
      navigation.replace('HotspotSetupLocationInfoScreen', {
        hotspotAddress,
        addGatewayTxn,
        hotspotType,
      })
    }
  }, [addGatewayTxn, hotspotAddress, hotspotType, navigation])

It seems like getting the hotspot information is able to be retrieved from the helium api.

cokes518 commented 2 years ago

My guess is you haven’t pulled the gateway address from the Hotspot itself, but I’ve tagged an engineer to clarify.

tyler-whitman commented 2 years ago

My guess is you haven’t pulled the gateway address from the Hotspot itself, but I’ve tagged an engineer to clarify.

Yes this is correct. A 404 is expected when onboarding a hotspot as it has not been added to the chain yet. The hotspot address should be read by the app via bluetooth or your own website/api.

tyler-whitman commented 2 years ago

Closing this as its an expected error. Let us know if you still need assistance.