diff --git a/README.md b/README.md
index 6ca6cb3..8442cd8 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@ Instate is an conceptual protocol created to build localized applications with l
## @instate/kit
-ConnectButton exports Rainbowkit's original ConnectButton with an additional LocalAccountButton that let user's pick the local account they would like to use for your application. Just like for networks, you can require a certain location and
+This kit exports Rainbowkit's original ConnectButton with an additional LocalAccountButton that let user's pick the local account they would like to use for your application. Just like for networks, you can require a certain location and
propose a local account switch to your user, or (soon) a move if the user doesn't have a local account in your application vicinity.
diff --git a/apps/subgraph/generated/schema.ts b/apps/subgraph/generated/schema.ts
index 0b2897b..97b699d 100644
--- a/apps/subgraph/generated/schema.ts
+++ b/apps/subgraph/generated/schema.ts
@@ -505,6 +505,19 @@ export class NetworkStateTravel extends Entity {
set nextGeohash(value: string) {
this.set("nextGeohash", Value.fromString(value));
}
+
+ get transactionHash(): Bytes {
+ let value = this.get("transactionHash");
+ if (!value || value.kind == ValueKind.NULL) {
+ throw new Error("Cannot return null for a required field.");
+ } else {
+ return value.toBytes();
+ }
+ }
+
+ set transactionHash(value: Bytes) {
+ this.set("transactionHash", Value.fromBytes(value));
+ }
}
export class LocalRecord extends Entity {
diff --git a/apps/subgraph/schema.graphql b/apps/subgraph/schema.graphql
index 0082630..796b78c 100644
--- a/apps/subgraph/schema.graphql
+++ b/apps/subgraph/schema.graphql
@@ -40,6 +40,7 @@ type NetworkStateTravel @entity(immutable: true) {
account: Bytes! # address
previousGeohash: String! # string
nextGeohash: String! # string
+ transactionHash: Bytes!
}
# --------------------- RECORD ---------------------
diff --git a/apps/subgraph/src/state.ts b/apps/subgraph/src/state.ts
index 1425c4d..ad81910 100644
--- a/apps/subgraph/src/state.ts
+++ b/apps/subgraph/src/state.ts
@@ -16,6 +16,7 @@ export function handleNetworkStateTravel(event: StateMoveEvent): void {
travel.account = event.params.account;
travel.previousGeohash = event.params.previousGeohash;
travel.nextGeohash = event.params.nextGeohash;
+ travel.transactionHash = event.transaction.hash;
let agent = Agent.load(event.params.account);
diff --git a/apps/web/app/map/layout.tsx b/apps/web/app/map/layout.tsx
index 3e7c472..81c02b2 100644
--- a/apps/web/app/map/layout.tsx
+++ b/apps/web/app/map/layout.tsx
@@ -5,7 +5,6 @@ import { commonLocations } from '@/services/constants'
import AccountMarker from '@/components/Map/AccountMarker'
import FogLayer from '@/components/Map/Fog'
import AppNavigationBar from '@/components/AppNavigationBar'
-import AppMapControls from '@/components/AppMapControls'
import usePath from '@/hooks/usePath'
import NetworkStateLayers from '@/components/Map/NetworkStateLayers'
import { ConnectButton } from '@instate/kit'
@@ -44,9 +43,6 @@ const Home = ({ children }: HomeProps) => {
{isProfile &&
- Local Account:{' '} - {geohash} -
-- {truncateAddress(id, 6)} -
++ Local Account:{' '} + + {record.geohash} + +
++ Connected Local Account:{' '} + {localAccount?.geohash} +
+ {localAccount && ( + +{truncateAddress(localAccount?.id, 6)}
+ + )} +Nothing here yet
)} diff --git a/apps/web/components/Map/AccountMarker.tsx b/apps/web/components/Map/AccountMarker.tsx index fea0184..abdaed0 100644 --- a/apps/web/components/Map/AccountMarker.tsx +++ b/apps/web/components/Map/AccountMarker.tsx @@ -4,14 +4,12 @@ import { useEffect } from 'react' import { MapPinIcon } from '@heroicons/react/24/outline' import { useAccount } from 'wagmi' import classNames from 'classnames' -import { emojiAvatarForAddress, useLocalAccount } from '@instate/kit' +import { emojiAvatarForAddress } from '@instate/kit' import usePath from '@/hooks/usePath' -import useMapUtils from '@/hooks/useMapUtils' +import AccountZoomEffects from './AccountZoomEffects' const AccountMarker = () => { const { isProfile } = usePath() - const { localAccount } = useLocalAccount() - const { flyToGeohash } = useMapUtils() const { address } = useAccount() const { @@ -23,13 +21,6 @@ const AccountMarker = () => { updatePosition(latitude, longitude) }, []) - useEffect(() => { - const { geohash } = localAccount || {} - if (geohash) { - flyToGeohash(geohash, 3) - } - }, [localAccount]) - if (!isProfile) return null return ( @@ -57,6 +48,7 @@ const AccountMarker = () => {{position.geohash}
-Motion:
- You've never visted this location, create your local account - now: -
+ {localCase === 'create-account' && ( ++ You've never visted this location, create your local + account now: +
+ )}