Skip to content

Commit

Permalink
holy shit i got ndk to work (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
₿en committed Aug 24, 2023
1 parent 680166d commit 0df2ddf
Show file tree
Hide file tree
Showing 4 changed files with 881 additions and 60 deletions.
4 changes: 3 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
presets: [['module:metro-react-native-babel-preset', {
unstable_transformProfile: 'hermes-stable'
}]],
plugins: [['@babel/plugin-proposal-decorators', { legacy: true }], 'react-native-reanimated/plugin'],
};
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
},
"dependencies": {
"@mempool/mempool.js": "^2.3.0",
"@nostr-dev-kit/ndk": "^0.8.5",
"@nostr-dev-kit/ndk-react": "^0.1.1",
"@react-native-async-storage/async-storage": "^1.17.11",
"@react-native-clipboard/clipboard": "1.11.2",
"@react-navigation/bottom-tabs": "^6.5.3",
Expand All @@ -30,7 +32,7 @@
"lodash": "^4.17.21",
"mobx": "^6.7.0",
"mobx-react": "^7.6.0",
"nostr-tools": "1.10.1",
"nostr-tools": "^1.14.2",
"process": "^0.11.10",
"react": "18.2.0",
"react-native": "0.71.7",
Expand Down
17 changes: 13 additions & 4 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import { BayWalletNavigator, OnboardNavigator } from './navigation';
import { BaseComponent, Loading } from './components';
import { useDataStore } from './store';
import { observer } from 'mobx-react';
import { NDKProvider } from '@nostr-dev-kit/ndk-react';

const AppNavigator = observer(() => {
const { onboardingStore: { done } } = useDataStore()

const AppRoot = useCallback(() => {
const AppRoot = useCallback(() => {
if (done === undefined) {
return (
<BaseComponent>
Expand All @@ -23,9 +24,17 @@ const AppNavigator = observer(() => {
if (!done) return <OnboardNavigator />

return (
<LightningNodeProvider>
<BayWalletNavigator />
</LightningNodeProvider>
<NDKProvider
relayUrls={[
"wss://relay.damus.io",
"wss://relay.snort.social",
"wss://purplepag.es",
]}
>
<LightningNodeProvider>
<BayWalletNavigator />
</LightningNodeProvider>
</NDKProvider>
)

}, [done])
Expand Down

0 comments on commit 0df2ddf

Please sign in to comment.