Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow for specialized apps #1419

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,5 +177,16 @@ module.exports = {
},
files: ["packages/components/navigation/**"],
},
{
rules: {
"no-restricted-imports": [
"error",
{
patterns: [],
},
],
},
files: ["packages/dapp-root/**"],
},
],
};
8 changes: 8 additions & 0 deletions apps/gno-dapp/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { registerRootComponent } from "expo";

import App from "@/dapp-root/App";

// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
// It also ensures that whether you load the app in Expo Go or in a native build,
// the environment is set up appropriately
registerRootComponent(App);
8 changes: 8 additions & 0 deletions apps/teritori-dapp/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { registerRootComponent } from "expo";

import App from "@/dapp-root/App";

// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
// It also ensures that whether you load the app in Expo Go or in a native build,
// the environment is set up appropriately
registerRootComponent(App);
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "teritori-dapp",
"version": "1.0.0",
"main": "node_modules/expo/AppEntry.js",
"main": "apps/teritori-dapp/index.js",
"scripts": {
"start": "expo start",
"android": "expo run:android",
Expand Down
File renamed without changes.
File renamed without changes.
41 changes: 19 additions & 22 deletions Root.tsx → packages/dapp-root/Root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,25 @@ import { SafeAreaProvider } from "react-native-safe-area-context";
import { Provider as ReduxProvider } from "react-redux";
import { PersistGate } from "redux-persist/integration/react";

import { MultisigDeauth } from "./packages/components/multisig/MultisigDeauth";
import { Navigator } from "./packages/components/navigation/Navigator";
import { FeedbacksContextProvider } from "./packages/context/FeedbacksProvider";
import { MediaPlayerContextProvider } from "./packages/context/MediaPlayerProvider";
import { MessageContextProvider } from "./packages/context/MessageProvider";
import { SearchBarContextProvider } from "./packages/context/SearchBarProvider";
import { TNSMetaDataListContextProvider } from "./packages/context/TNSMetaDataListProvider";
import { TNSContextProvider } from "./packages/context/TNSProvider";
import { TransactionModalsProvider } from "./packages/context/TransactionModalsProvider";
import { WalletControlContextProvider } from "./packages/context/WalletControlProvider";
import {
useWallets,
WalletsProvider,
} from "./packages/context/WalletsProvider";
import { useSelectedNetworkId } from "./packages/hooks/useSelectedNetwork";
import useSelectedWallet from "./packages/hooks/useSelectedWallet";
import { getAvailableApps } from "./packages/screens/DAppStore/query/getFromFile";
import { setAvailableApps } from "./packages/store/slices/dapps-store";
import { setSelectedWalletId } from "./packages/store/slices/settings";
import { persistor, store, useAppDispatch } from "./packages/store/store";
import { isElectron } from "./packages/utils/isElectron";
import { linking } from "./packages/utils/navigation";
import { MultisigDeauth } from "@/components/multisig/MultisigDeauth";
import { Navigator } from "@/components/navigation/Navigator";
import { FeedbacksContextProvider } from "@/context/FeedbacksProvider";
import { MediaPlayerContextProvider } from "@/context/MediaPlayerProvider";
import { MessageContextProvider } from "@/context/MessageProvider";
import { SearchBarContextProvider } from "@/context/SearchBarProvider";
import { TNSMetaDataListContextProvider } from "@/context/TNSMetaDataListProvider";
import { TNSContextProvider } from "@/context/TNSProvider";
import { TransactionModalsProvider } from "@/context/TransactionModalsProvider";
import { WalletControlContextProvider } from "@/context/WalletControlProvider";
import { useWallets, WalletsProvider } from "@/context/WalletsProvider";
import { useSelectedNetworkId } from "@/hooks/useSelectedNetwork";
import useSelectedWallet from "@/hooks/useSelectedWallet";
import { getAvailableApps } from "@/screens/DAppStore/query/getFromFile";
import { setAvailableApps } from "@/store/slices/dapps-store";
import { setSelectedWalletId } from "@/store/slices/settings";
import { persistor, store, useAppDispatch } from "@/store/store";
import { isElectron } from "@/utils/isElectron";
import { linking } from "@/utils/navigation";

if (!globalThis.Buffer) {
globalThis.Buffer = require("buffer").Buffer;
Expand Down
Loading