Skip to content

Commit

Permalink
feat: make RegisterDevice working
Browse files Browse the repository at this point in the history
Signed-off-by: D4ryl00 <d4ryl00@gmail.com>
  • Loading branch information
D4ryl00 committed Jun 17, 2024
1 parent a5e342f commit f414eeb
Show file tree
Hide file tree
Showing 20 changed files with 691 additions and 68 deletions.
16 changes: 8 additions & 8 deletions mobile/.env
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Prod

EXPO_PUBLIC_GNO_REMOTE=https://api.gno.berty.io:443
EXPO_PUBLIC_FAUCET_REMOTE=https://faucetpass.gno.berty.io
EXPO_PUBLIC_INDEXER_REMOTE=https://indexer.gno.berty.io
EXPO_PUBLIC_PUSH_REMOTE=https://push.gno.berty.io
# EXPO_PUBLIC_GNO_REMOTE=https://api.gno.berty.io:443
# EXPO_PUBLIC_FAUCET_REMOTE=https://faucetpass.gno.berty.io
# EXPO_PUBLIC_INDEXER_REMOTE=https://indexer.gno.berty.io
# EXPO_PUBLIC_PUSH_REMOTE=https://push.gno.berty.io

EXPO_PUBLIC_GNO_CHAIN_ID=dev

# local

# EXPO_PUBLIC_GNO_REMOTE=http://localhost:26657
# EXPO_PUBLIC_FAUCET_REMOTE=http://localhost:8545
# EXPO_PUBLIC_INDEXER_REMOTE=http://localhost:8546
# EXPO_PUBLIC_PUSH_REMOTE=http://localhost:26661
EXPO_PUBLIC_GNO_REMOTE=http://localhost:26657
EXPO_PUBLIC_FAUCET_REMOTE=http://localhost:5050
EXPO_PUBLIC_INDEXER_REMOTE=http://localhost:26660
EXPO_PUBLIC_PUSH_REMOTE=http://localhost:26661

3 changes: 2 additions & 1 deletion mobile/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ android.reverse:
fi
adb -s $(ANDROID_DEVICE) reverse tcp:8081 tcp:8081 # metro
adb -s $(ANDROID_DEVICE) reverse tcp:26657 tcp:26657 # gnodev
adb -s $(ANDROID_DEVICE) reverse tcp:8545 tcp:8545 # faucet
adb -s $(ANDROID_DEVICE) reverse tcp:5050 tcp:5050 # faucet
adb -s $(ANDROID_DEVICE) reverse tcp:8546 tcp:8546 # tx-indexer
adb -s $(ANDROID_DEVICE) reverse tcp:26660 tcp:26660 # indexer
adb -s $(ANDROID_DEVICE) reverse tcp:26661 tcp:26661 # push notifications
.PHONY: android.reverse

start: node_modules
Expand Down
6 changes: 3 additions & 3 deletions mobile/app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { store } from "@gno/redux";
import { Guard } from "@gno/components/auth/guard";
import { GnoNativeProvider } from "@gnolang/gnonative";
import { IndexerProvider } from "@gno/provider/indexer-provider";
import { PushProvider } from "@gno/provider/push-provider";
import { NotificationProvider } from "@gno/provider/notification-provider";

const gnoDefaultConfig = {
remote: process.env.EXPO_PUBLIC_GNO_REMOTE!,
Expand All @@ -30,7 +30,7 @@ const pushDefaultConfig = {
export default function AppLayout() {
return (
<GnoNativeProvider config={gnoDefaultConfig}>
<PushProvider config={pushDefaultConfig}>
<NotificationProvider config={pushDefaultConfig}>
<IndexerProvider config={indexerDefaultConfig}>
<Provider store={store}>
<ThemeProvider value={DefaultTheme}>
Expand All @@ -46,7 +46,7 @@ export default function AppLayout() {
</ThemeProvider>
</Provider>
</IndexerProvider>
</PushProvider>
</NotificationProvider>
</GnoNativeProvider>
);
}
50 changes: 50 additions & 0 deletions mobile/src/api/indexer/indexerservice_connect.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// @generated by protoc-gen-connect-es v1.4.0
// @generated from file indexerservice.proto (package land.gno.dsocial.indexerservice.v1, syntax proto3)
/* eslint-disable */
// @ts-nocheck

import { GetHomePostsRequest, GetHomePostsResponse, HelloRequest, HelloResponse, HelloStreamRequest, HelloStreamResponse } from "./indexerservice_pb.js";
import { MethodKind } from "@bufbuild/protobuf";

/**
* IndexerService is the service to interact with the dSocial Indexer
*
* @generated from service land.gno.dsocial.indexerservice.v1.IndexerService
*/
export declare const IndexerService: {
readonly typeName: "land.gno.dsocial.indexerservice.v1.IndexerService",
readonly methods: {
/**
* @generated from rpc land.gno.dsocial.indexerservice.v1.IndexerService.GetHomePosts
*/
readonly getHomePosts: {
readonly name: "GetHomePosts",
readonly I: typeof GetHomePostsRequest,
readonly O: typeof GetHomePostsResponse,
readonly kind: MethodKind.Unary,
},
/**
* Hello is for debug purposes
*
* @generated from rpc land.gno.dsocial.indexerservice.v1.IndexerService.Hello
*/
readonly hello: {
readonly name: "Hello",
readonly I: typeof HelloRequest,
readonly O: typeof HelloResponse,
readonly kind: MethodKind.Unary,
},
/**
* HelloStream is for debug purposes
*
* @generated from rpc land.gno.dsocial.indexerservice.v1.IndexerService.HelloStream
*/
readonly helloStream: {
readonly name: "HelloStream",
readonly I: typeof HelloStreamRequest,
readonly O: typeof HelloStreamResponse,
readonly kind: MethodKind.ServerStreaming,
},
}
};

50 changes: 50 additions & 0 deletions mobile/src/api/indexer/indexerservice_connect.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// @generated by protoc-gen-connect-es v1.4.0
// @generated from file indexerservice.proto (package land.gno.dsocial.indexerservice.v1, syntax proto3)
/* eslint-disable */
// @ts-nocheck

import { GetHomePostsRequest, GetHomePostsResponse, HelloRequest, HelloResponse, HelloStreamRequest, HelloStreamResponse } from "./indexerservice_pb.js";
import { MethodKind } from "@bufbuild/protobuf";

/**
* IndexerService is the service to interact with the dSocial Indexer
*
* @generated from service land.gno.dsocial.indexerservice.v1.IndexerService
*/
export const IndexerService = {
typeName: "land.gno.dsocial.indexerservice.v1.IndexerService",
methods: {
/**
* @generated from rpc land.gno.dsocial.indexerservice.v1.IndexerService.GetHomePosts
*/
getHomePosts: {
name: "GetHomePosts",
I: GetHomePostsRequest,
O: GetHomePostsResponse,
kind: MethodKind.Unary,
},
/**
* Hello is for debug purposes
*
* @generated from rpc land.gno.dsocial.indexerservice.v1.IndexerService.Hello
*/
hello: {
name: "Hello",
I: HelloRequest,
O: HelloResponse,
kind: MethodKind.Unary,
},
/**
* HelloStream is for debug purposes
*
* @generated from rpc land.gno.dsocial.indexerservice.v1.IndexerService.HelloStream
*/
helloStream: {
name: "HelloStream",
I: HelloStreamRequest,
O: HelloStreamResponse,
kind: MethodKind.ServerStreaming,
},
}
};

Loading

0 comments on commit f414eeb

Please sign in to comment.