-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
30 lines (28 loc) · 982 Bytes
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import 'react-native-get-random-values';
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';
import { ConnectionProvider } from './components/ConnectionProvider';
import { AuthorizationProvider } from './components/AuthProvider';
import { clusterApiUrl } from '@solana/web3.js';
import { MainScreen } from './screens/MainScreen';
import { NFTProvider } from './components/NFTProvider';
global.Buffer = require('buffer').Buffer;
export default function App() {
// const cluster = "localhost" as any;
// const endpoint = 'http://10.0.2.2:8899';
const cluster = "devnet";
const endpoint = clusterApiUrl(cluster);
return (
<ConnectionProvider
endpoint={endpoint}
cluster={cluster}
config={{ commitment: "processed" }}
>
<AuthorizationProvider cluster={cluster}>
<NFTProvider>
<MainScreen/>
</NFTProvider>
</AuthorizationProvider>
</ConnectionProvider>
);
}