Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hsjoberg committed Jul 10, 2020
1 parent f677ba6 commit a26ec9a
Show file tree
Hide file tree
Showing 14 changed files with 1,366 additions and 1,034 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
- run: cp /go/src/github.com/lightningnetwork/lnd/mobile/build/android/Lndmobile.aar android/lndmobile
- run: yarn
- run: yarn gen-proto
- run: yarn test
# Compile a bundled dev build https://stackoverflow.com/a/56520746
- run: ./node_modules/.bin/react-native bundle --platform android --dev false --entry-file index.ts --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
- run: cd android && ./gradlew assembleDebug
Expand Down
2 changes: 1 addition & 1 deletion mocks/lndmobile/autopilot.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { autopilotrpc } from "../../proto/proto-autopilot";
import { autopilotrpc } from "../../proto/proto";

/**
* @throws
Expand Down
36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"devtools": "redux-devtools --hostname=192.168.1.100 --port=8000",
"test": "jest --silent",
"test-update-snapshot": "jest --silent --updateSnapshot",
"gen-proto": "pbjs -t static-module -w es6 --force-long -o proto/proto.js proto/rpc.proto proto/autopilotrpc/autopilot.proto proto/walletrpc/walletkit.proto proto/signrpc/signer.proto && pbts -o proto/proto.d.ts proto/proto.js",
"gen-proto": "pbjs -t static-module -w es6 --force-long -o proto/proto.js proto/rpc.proto proto/autopilotrpc/autopilot.proto proto/walletrpc/walletkit.proto proto/signrpc/signer.proto proto/routerrpc/router.proto && pbts -o proto/proto.d.ts proto/proto.js",
"regtest-debug": "npx react-native run-android --variant chainregtestNormalDebug --appIdSuffix regtest.debug",
"testnet-debug": "react-native run-android --variant chaintestnetNormalDebug --appIdSuffix testnet.debug",
"testnet": "react-native run-android --variant chaintestnetNormalRelease --appIdSuffix testnet",
Expand All @@ -25,9 +25,9 @@
"@react-native-community/masked-view": "0.1.10",
"@react-native-community/react-native-clipboard": "^1.0.1",
"@react-native-community/slider": "3.0.0",
"@react-navigation/bottom-tabs": "5.5.2",
"@react-navigation/native": "5.5.1",
"@react-navigation/stack": "5.4.2",
"@react-navigation/bottom-tabs": "5.6.1",
"@react-navigation/native": "5.6.1",
"@react-navigation/stack": "5.6.2",
"@types/aes-js": "^3.1.1",
"@types/sha.js": "^2.4.0",
"aes-js": "^3.1.2",
Expand All @@ -47,9 +47,9 @@
"react-native": "0.62.2",
"react-native-animatable": "1.3.3",
"react-native-build-config": "^0.3.2",
"react-native-camera": "3.30.0",
"react-native-camera": "3.31.0",
"react-native-dialogs": "1.1.1",
"react-native-document-picker": "3.5.2",
"react-native-document-picker": "3.5.3",
"react-native-easy-grid": "0.2.2",
"react-native-fingerprint-scanner": "6.0.0",
"react-native-fs": "2.16.6",
Expand All @@ -61,52 +61,52 @@
"react-native-maps": "0.27.1",
"react-native-modal": "11.5.6",
"react-native-progress": "^4.1.2",
"react-native-push-notification": "3.5.2",
"react-native-push-notification": "4.0.0",
"react-native-qrcode-svg": "6.0.6",
"react-native-reanimated": "1.9.0",
"react-native-safe-area-context": "3.0.5",
"react-native-safe-area-context": "3.0.7",
"react-native-screens": "2.9.0",
"react-native-securerandom": "1.0.0",
"react-native-sound": "^0.11.0",
"react-native-sqlite-storage": "5.0.0",
"react-native-svg": "12.1.0",
"react-native-webln": "0.1.4",
"react-native-webview": "10.3.1",
"react-native-webview": "10.3.2",
"secp256k1": "^4.0.1",
"sha.js": "^2.4.11",
"webln": "^0.2.2"
},
"devDependencies": {
"@babel/core": "7.10.3",
"@babel/runtime": "7.10.3",
"@babel/core": "7.10.4",
"@babel/runtime": "7.10.4",
"@testing-library/react-native": "5.0.3",
"@types/base64-js": "1.3.0",
"@types/bech32": "1.1.2",
"@types/color": "3.0.1",
"@types/crypto-js": "^3.1.47",
"@types/jest": "26.0.0",
"@types/jest": "26.0.4",
"@types/long": "4.0.1",
"@types/react": "16.9.38",
"@types/react-native": "0.62.13",
"@types/react": "16.9.42",
"@types/react-native": "0.62.18",
"@types/react-native-push-notification": "3.0.9",
"@types/react-native-sqlite-storage": "3.3.2",
"@types/react-test-renderer": "16.9.2",
"@types/remote-redux-devtools": "0.5.4",
"@types/secp256k1": "^4.0.1",
"babel-jest": "26.0.1",
"babel-jest": "26.1.0",
"bolt11": "1.2.7",
"jest": "26.0.1",
"jest": "26.1.0",
"jest-date-mock": "1.0.8",
"jest-fetch-mock": "3.0.3",
"jetifier": "1.6.6",
"metro-react-native-babel-preset": "0.59.0",
"metro-react-native-babel-preset": "0.60.0",
"react-test-renderer": "16.13.1",
"redux-devtools-cli": "^0.0.1-1",
"remote-redux-devtools": "^0.5.16",
"tslint": "6.1.2",
"tslint-config-airbnb": "^5.11.2",
"tslint-react": "5.0.0",
"tslint-react-native": "0.0.7",
"typescript": "3.9.5"
"typescript": "3.9.6"
}
}
3 changes: 3 additions & 0 deletions src/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import Loading from "./windows/Loading";

import { useStoreState, useStoreActions } from "./state/store";
import { toast } from "./utils";
import CameraFullscreen from "./windows/CameraFullscreen";

const RootStack = createStackNavigator();

Expand All @@ -31,6 +32,7 @@ export type RootStackParamList = {
InitLightning: undefined;

Loading: undefined;
Welcome: undefined;
Overview: undefined;
Help: undefined;
TransactionDetails: {
Expand Down Expand Up @@ -124,6 +126,7 @@ export default function Main() {
<RootStack.Navigator initialRouteName={initialRoute} screenOptions={screenOptions}>
<RootStack.Screen name="Welcome" component={Welcome} />
<RootStack.Screen name="Loading" component={Loading} />
<RootStack.Screen name="CameraFullscreen" component={CameraFullscreen} />

<RootStack.Screen name="Overview" component={Overview} />
<RootStack.Screen name="Help" component={Help} />
Expand Down
5 changes: 3 additions & 2 deletions src/components/Content.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { ReactNode } from "react";
import { Content } from "native-base";
import { StyleProp, ViewStyle, StyleSheet } from "react-native";
import { ScrollView } from "react-native-gesture-handler";

export interface IContentProps {
children?: ReactNode;
Expand All @@ -9,13 +10,13 @@ export interface IContentProps {
}
export default function BlixtContent({ children, style, centered }: IContentProps) {
return (
<Content contentContainerStyle={[
<ScrollView contentContainerStyle={[
{ padding: 14 },
centered ? centeredStyle.style : {},
style,
]}>
{children}
</Content>
</ScrollView>
);
}

Expand Down
15 changes: 13 additions & 2 deletions src/windows/CameraFullscreen.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import React, { useState } from "react";
import { StatusBar } from "react-native";
import Camera from "../components/Camera";
import BarcodeMask from "../components/BarCodeMask";
import { smallScreen } from "../utils/device";
import { blixtTheme } from "../../native-base-theme/variables/commonColor";

type onReadCallback = (address: string) => void;

Expand All @@ -10,8 +13,9 @@ export default function CameraFullscreen({ navigation, route }: any) {
return (
<>
<StatusBar
backgroundColor="transparent"
hidden={false}
translucent={false}
translucent={true}
networkActivityIndicatorVisible={true}
barStyle="light-content"
/>
Expand All @@ -24,7 +28,14 @@ export default function CameraFullscreen({ navigation, route }: any) {
}
}}
onNotAuthorized={() => setTimeout(() => navigation.pop(), 1)}
/>
>
<BarcodeMask
showAnimatedLine={false}
edgeColor={blixtTheme.primary}
width={smallScreen ? 270 : 290}
height={smallScreen ? 270 : 290}
/>
</Camera>
</>
);
}
Loading

0 comments on commit a26ec9a

Please sign in to comment.