diff --git a/demo/AppNavigator.js b/demo/AppNavigator.js
index 9414c749..b7ddf0c7 100644
--- a/demo/AppNavigator.js
+++ b/demo/AppNavigator.js
@@ -1,25 +1,26 @@
import { createStackNavigator, createAppContainer } from "react-navigation";
-import Home from "./screens/Home";
-import ListLands from "./screens/ListLands";
-import LandClaim from "./screens/LandClaim";
-import OnboardingHome from "./screens/OnboardingHome";
-import EthereumQuestion from "./screens/EthereumQuestion";
-import EthereumSignUp from "./screens/EthereumSignUp";
-import EthereumSignIn from "./screens/EthereumSignIn";
-import Colors from "@constants/Colors";
+
+import HomeScreen from "./screens/HomeScreen";
+import ListLandsScreen from "./screens/ListLandsScreen";
+import LandClaimScreen from "./screens/LandClaimScreen";
+import OnboardingHomeScreen from "./screens/OnboardingHomeScreen";
+import EthereumQuestionScreen from "./screens/EthereumQuestionScreen";
+import EthereumSignUpScreen from "./screens/EthereumSignUpScreen";
+import EthereumSignInScreen from "./screens/EthereumSignInScreen";
+import Colors from "@constants/Colors.js";
const AppNavigator = createStackNavigator(
{
- Home,
- ListLands,
- LandClaim,
- OnboardingHome,
- EthereumQuestion,
- EthereumSignUp,
- EthereumSignIn,
+ HomeScreen,
+ ListLandsScreen,
+ LandClaimScreen,
+ OnboardingHomeScreen,
+ EthereumQuestionScreen,
+ EthereumSignUpScreen,
+ EthereumSignInScreen,
},
{
- initialRouteName: "Home",
+ initialRouteName: "HomeScreen",
defaultNavigationOptions: {
headerStyle: {
backgroundColor: Colors.headerBackgroundColor,
diff --git a/demo/components/presentational/EthereumQuestion.js b/demo/components/presentational/EthereumQuestion.js
new file mode 100644
index 00000000..411f9875
--- /dev/null
+++ b/demo/components/presentational/EthereumQuestion.js
@@ -0,0 +1,32 @@
+import React from "react";
+import { Button, StyleSheet, View } from "react-native";
+import { responsiveHeight } from "react-native-responsive-dimensions";
+import LargeText from "./LargeText";
+import Colors from "@constants/Colors";
+
+export default function EthereumQuestion(props) {
+ return (
+
+ {`Are you new to Ethereum?`}
+
+
+
+
+
+
+
+ );
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ backgroundColor: Colors.backgroundColor,
+ alignItems: "center",
+ justifyContent: "center",
+ },
+ buttonView: {
+ flexDirection: "row",
+ marginTop: responsiveHeight(4),
+ },
+});
diff --git a/demo/components/presentational/EthereumQuestion.test.js b/demo/components/presentational/EthereumQuestion.test.js
new file mode 100644
index 00000000..149dfb44
--- /dev/null
+++ b/demo/components/presentational/EthereumQuestion.test.js
@@ -0,0 +1,11 @@
+import React from "react";
+import { shallow } from "enzyme";
+import EthereumQuestion from "./EthereumQuestion";
+
+describe("EthereumQuestion", () => {
+ it("renders the component", async () => {
+ expect(
+ shallow( {}} onSignIn={() => {}} />)
+ ).toMatchSnapshot();
+ });
+});
diff --git a/demo/components/presentational/EthereumSignIn.js b/demo/components/presentational/EthereumSignIn.js
new file mode 100644
index 00000000..8748eaf2
--- /dev/null
+++ b/demo/components/presentational/EthereumSignIn.js
@@ -0,0 +1,29 @@
+import React from "react";
+import { Button, StyleSheet, View } from "react-native";
+import { responsiveHeight } from "react-native-responsive-dimensions";
+import LargeText from "./LargeText";
+import Colors from "@constants/Colors";
+
+export default function EthereumSignIn(props) {
+ return (
+
+ {`Cool. Let's start by hooking this app with your wallet.`}
+
+
+
+
+ );
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ backgroundColor: Colors.backgroundColor,
+ alignItems: "center",
+ justifyContent: "center",
+ },
+ buttonView: {
+ flexDirection: "row",
+ marginTop: responsiveHeight(5),
+ },
+});
diff --git a/demo/components/presentational/EthereumSignIn.test.js b/demo/components/presentational/EthereumSignIn.test.js
new file mode 100644
index 00000000..5237fce8
--- /dev/null
+++ b/demo/components/presentational/EthereumSignIn.test.js
@@ -0,0 +1,9 @@
+import React from "react";
+import { shallow } from "enzyme";
+import EthereumSignIn from "./EthereumSignIn";
+
+describe("EthereumSignIn", () => {
+ it("renders the component", async () => {
+ expect(shallow( {}} />)).toMatchSnapshot();
+ });
+});
diff --git a/demo/screens/EthereumSignUp.js b/demo/components/presentational/EthereumSignUp.js
similarity index 88%
rename from demo/screens/EthereumSignUp.js
rename to demo/components/presentational/EthereumSignUp.js
index f6a75ea2..75fc795d 100644
--- a/demo/screens/EthereumSignUp.js
+++ b/demo/components/presentational/EthereumSignUp.js
@@ -1,5 +1,6 @@
import React from "react";
import { StyleSheet, KeyboardAvoidingView } from "react-native";
+import { responsiveHeight } from "react-native-responsive-dimensions";
import { Header } from "react-navigation";
import Colors from "@constants/Colors";
import LargeText from "@presentational/LargeText";
@@ -7,7 +8,7 @@ import EthereumSignUpForm from "@presentational/EthereumSignUpForm";
export default class EthereumSignUp extends React.Component {
render() {
- const OFFSET = 20;
+ const OFFSET = responsiveHeight(3);
return (
{
+ it("renders the component", async () => {
+ expect(shallow()).toMatchSnapshot();
+ });
+});
diff --git a/demo/components/presentational/EthereumSignUpForm.js b/demo/components/presentational/EthereumSignUpForm.js
index 381c7d78..38c6c131 100644
--- a/demo/components/presentational/EthereumSignUpForm.js
+++ b/demo/components/presentational/EthereumSignUpForm.js
@@ -1,5 +1,10 @@
import React from "react";
import { Button, StyleSheet, View, Text, TextInput } from "react-native";
+import {
+ responsiveHeight,
+ responsiveWidth,
+ responsiveFontSize,
+} from "react-native-responsive-dimensions";
import { Account } from "tasit-sdk";
export default class EthereumSignUpForm extends React.Component {
@@ -43,11 +48,15 @@ export default class EthereumSignUpForm extends React.Component {
const styles = StyleSheet.create({
userRow: { flexDirection: "row" },
userInputView: { flex: 1, alignItems: "flex-end" },
- userInput: { justifyContent: "flex-start", width: 90, fontSize: 20 },
+ userInput: {
+ justifyContent: "flex-start",
+ width: responsiveWidth(28),
+ fontSize: responsiveFontSize(3),
+ },
ensView: { flex: 1 },
- ensText: { justifyContent: "flex-end", fontSize: 20 },
+ ensText: { justifyContent: "flex-end", fontSize: responsiveFontSize(3) },
buttonView: {
flexDirection: "row",
- marginTop: 30,
+ marginTop: responsiveHeight(5),
},
});
diff --git a/demo/components/presentational/Home.js b/demo/components/presentational/Home.js
new file mode 100644
index 00000000..c343d962
--- /dev/null
+++ b/demo/components/presentational/Home.js
@@ -0,0 +1,23 @@
+import React from "react";
+import { Image, Button, StyleSheet, View } from "react-native";
+import LargeText from "./LargeText";
+import Colors from "@constants/Colors";
+
+export default function Home(props) {
+ return (
+
+
+ {`Tasit`}
+
+
+ );
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ backgroundColor: Colors.backgroundColor,
+ alignItems: "center",
+ justifyContent: "center",
+ },
+});
diff --git a/demo/components/presentational/Home.test.js b/demo/components/presentational/Home.test.js
new file mode 100644
index 00000000..f04105e8
--- /dev/null
+++ b/demo/components/presentational/Home.test.js
@@ -0,0 +1,9 @@
+import React from "react";
+import { shallow } from "enzyme";
+import Home from "./Home";
+
+describe("Home", () => {
+ it("renders the component", async () => {
+ expect(shallow( {}} />)).toMatchSnapshot();
+ });
+});
diff --git a/demo/components/presentational/Land.js b/demo/components/presentational/Land.js
index 0126fa22..7c2ff149 100644
--- a/demo/components/presentational/Land.js
+++ b/demo/components/presentational/Land.js
@@ -1,5 +1,6 @@
import React from "react";
import { Image, StyleSheet, View, Text } from "react-native";
+import { responsiveWidth } from "react-native-responsive-dimensions";
export default function Land({ land }) {
return (
@@ -15,6 +16,6 @@ export default function Land({ land }) {
const styles = StyleSheet.create({
landContainer: {
- width: 224,
+ width: responsiveWidth(60),
},
});
diff --git a/demo/components/presentational/Land.test.js b/demo/components/presentational/Land.test.js
new file mode 100644
index 00000000..5699fd33
--- /dev/null
+++ b/demo/components/presentational/Land.test.js
@@ -0,0 +1,16 @@
+import React from "react";
+import { shallow } from "enzyme";
+import Land from "./Land";
+
+describe("Land", () => {
+ it("renders the component", async () => {
+ const land = {
+ id: -1,
+ name: "Not found",
+ img: require("../../assets/images/icon.png"),
+ priceMana: 0,
+ priceUsd: 0,
+ };
+ expect(shallow()).toMatchSnapshot();
+ });
+});
diff --git a/demo/components/presentational/LandClaim.js b/demo/components/presentational/LandClaim.js
new file mode 100644
index 00000000..6886ff5c
--- /dev/null
+++ b/demo/components/presentational/LandClaim.js
@@ -0,0 +1,33 @@
+import React from "react";
+import { StyleSheet, View, Button } from "react-native";
+import { responsiveHeight } from "react-native-responsive-dimensions";
+import Land from "./Land";
+import Colors from "@constants/Colors";
+
+export default function LandClaim(props) {
+ return (
+
+
+
+
+
+
+ );
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ backgroundColor: Colors.backgroundColor,
+ alignItems: "center",
+ justifyContent: "center",
+ },
+ buttonView: {
+ flexDirection: "row",
+ marginTop: responsiveHeight(5),
+ },
+});
diff --git a/demo/components/presentational/LandClaim.test.js b/demo/components/presentational/LandClaim.test.js
new file mode 100644
index 00000000..54d4f397
--- /dev/null
+++ b/demo/components/presentational/LandClaim.test.js
@@ -0,0 +1,9 @@
+import React from "react";
+import { shallow } from "enzyme";
+import LandClaim from "./LandClaim";
+
+describe("LandClaim", () => {
+ it("renders the component", async () => {
+ expect(shallow( {}} />)).toMatchSnapshot();
+ });
+});
diff --git a/demo/components/presentational/LandRow.js b/demo/components/presentational/LandRow.js
new file mode 100644
index 00000000..e986b3f6
--- /dev/null
+++ b/demo/components/presentational/LandRow.js
@@ -0,0 +1,29 @@
+import React from "react";
+import { StyleSheet, View, TouchableHighlight } from "react-native";
+import {
+ responsiveHeight,
+ responsiveWidth,
+} from "react-native-responsive-dimensions";
+import Land from "./Land";
+
+export default function LandRow(props) {
+ return (
+
+
+
+
+
+ );
+}
+
+const styles = StyleSheet.create({
+ row: {
+ paddingTop: responsiveHeight(3),
+ paddingBottom: responsiveHeight(3),
+ paddingLeft: responsiveWidth(3),
+ paddingRight: responsiveWidth(3),
+ marginBottom: responsiveHeight(1),
+ alignItems: "center",
+ justifyContent: "center",
+ },
+});
diff --git a/demo/components/presentational/LandRow.test.js b/demo/components/presentational/LandRow.test.js
new file mode 100644
index 00000000..76949f4c
--- /dev/null
+++ b/demo/components/presentational/LandRow.test.js
@@ -0,0 +1,9 @@
+import React from "react";
+import { shallow } from "enzyme";
+import LandRow from "./LandRow";
+
+describe("LandRow", () => {
+ it("renders the component", async () => {
+ expect(shallow()).toMatchSnapshot();
+ });
+});
diff --git a/demo/components/presentational/LargeText.js b/demo/components/presentational/LargeText.js
index d5bded2e..f419652c 100644
--- a/demo/components/presentational/LargeText.js
+++ b/demo/components/presentational/LargeText.js
@@ -1,6 +1,9 @@
import React from "react";
import { StyleSheet, Text } from "react-native";
-import { responsiveHeight } from "react-native-responsive-dimensions";
+import {
+ responsiveHeight,
+ responsiveFontSize,
+} from "react-native-responsive-dimensions";
import Colors from "@constants/Colors";
export default function LargeText(props) {
@@ -10,7 +13,7 @@ export default function LargeText(props) {
const styles = StyleSheet.create({
text: {
padding: responsiveHeight(2),
- fontSize: 30,
+ fontSize: responsiveFontSize(4),
textAlign: "center",
fontWeight: "bold",
color: Colors.textColor,
diff --git a/demo/components/presentational/LargeText.test.js b/demo/components/presentational/LargeText.test.js
new file mode 100644
index 00000000..9e6a7d16
--- /dev/null
+++ b/demo/components/presentational/LargeText.test.js
@@ -0,0 +1,9 @@
+import React from "react";
+import { shallow } from "enzyme";
+import LargeText from "./LargeText";
+
+describe("LargeText", () => {
+ it("renders the component", async () => {
+ expect(shallow()).toMatchSnapshot();
+ });
+});
diff --git a/demo/components/presentational/ListLands.js b/demo/components/presentational/ListLands.js
new file mode 100644
index 00000000..cfcbd7eb
--- /dev/null
+++ b/demo/components/presentational/ListLands.js
@@ -0,0 +1,20 @@
+import React from "react";
+import { ListView, StyleSheet } from "react-native";
+import Colors from "@constants/Colors";
+
+export default function ListLands(props) {
+ return (
+
+ );
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ backgroundColor: Colors.backgroundColor,
+ },
+});
diff --git a/demo/components/presentational/ListLands.test.js b/demo/components/presentational/ListLands.test.js
new file mode 100644
index 00000000..85902502
--- /dev/null
+++ b/demo/components/presentational/ListLands.test.js
@@ -0,0 +1,9 @@
+import React from "react";
+import { shallow } from "enzyme";
+import ListLands from "./ListLands";
+
+describe("ListLands", () => {
+ it("renders the component", async () => {
+ expect(shallow()).toMatchSnapshot();
+ });
+});
diff --git a/demo/components/presentational/OnboardingHome.js b/demo/components/presentational/OnboardingHome.js
new file mode 100644
index 00000000..e67fb6ef
--- /dev/null
+++ b/demo/components/presentational/OnboardingHome.js
@@ -0,0 +1,30 @@
+import React from "react";
+import { Image, Button, StyleSheet, View } from "react-native";
+import { responsiveHeight } from "react-native-responsive-dimensions";
+import LargeText from "./LargeText";
+import Colors from "@constants/Colors";
+
+export default function OnboardingHome(props) {
+ return (
+
+
+ {`Let's get you set up with a secure way to store this land!`}
+
+
+
+
+ );
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ backgroundColor: Colors.backgroundColor,
+ alignItems: "center",
+ justifyContent: "center",
+ },
+ buttonView: {
+ flexDirection: "row",
+ marginTop: responsiveHeight(5),
+ },
+});
diff --git a/demo/components/presentational/OnboardingHome.test.js b/demo/components/presentational/OnboardingHome.test.js
new file mode 100644
index 00000000..ca8bbf3c
--- /dev/null
+++ b/demo/components/presentational/OnboardingHome.test.js
@@ -0,0 +1,9 @@
+import React from "react";
+import { shallow } from "enzyme";
+import OnboardingHome from "./OnboardingHome";
+
+describe("OnboardingHome", () => {
+ it("renders the component", async () => {
+ expect(shallow( {}} />)).toMatchSnapshot();
+ });
+});
diff --git a/demo/components/presentational/__snapshots__/EthereumQuestion.test.js.snap b/demo/components/presentational/__snapshots__/EthereumQuestion.test.js.snap
new file mode 100644
index 00000000..4d50dd2a
--- /dev/null
+++ b/demo/components/presentational/__snapshots__/EthereumQuestion.test.js.snap
@@ -0,0 +1,44 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`EthereumQuestion renders the component 1`] = `
+
+
+ Are you new to Ethereum?
+
+
+
+
+
+
+
+
+`;
diff --git a/demo/components/presentational/__snapshots__/EthereumSignIn.test.js.snap b/demo/components/presentational/__snapshots__/EthereumSignIn.test.js.snap
new file mode 100644
index 00000000..58b10e9f
--- /dev/null
+++ b/demo/components/presentational/__snapshots__/EthereumSignIn.test.js.snap
@@ -0,0 +1,31 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`EthereumSignIn renders the component 1`] = `
+
+
+ Cool. Let's start by hooking this app with your wallet.
+
+
+
+
+
+`;
diff --git a/demo/components/presentational/__snapshots__/EthereumSignUp.test.js.snap b/demo/components/presentational/__snapshots__/EthereumSignUp.test.js.snap
new file mode 100644
index 00000000..b01990e0
--- /dev/null
+++ b/demo/components/presentational/__snapshots__/EthereumSignUp.test.js.snap
@@ -0,0 +1,22 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`EthereumSignUp renders the component 1`] = `
+
+
+ Cool. Let's start by picking your Tasit username.
+
+
+
+`;
diff --git a/demo/components/presentational/__snapshots__/EthereumSignUpForm.test.js.snap b/demo/components/presentational/__snapshots__/EthereumSignUpForm.test.js.snap
index b9b6c0bb..9ec4b3bc 100644
--- a/demo/components/presentational/__snapshots__/EthereumSignUpForm.test.js.snap
+++ b/demo/components/presentational/__snapshots__/EthereumSignUpForm.test.js.snap
@@ -25,9 +25,9 @@ exports[`EthereumSignUpForm renders the component 1`] = `
placeholder="username"
style={
Object {
- "fontSize": 20,
+ "fontSize": 45.89389937671454,
"justifyContent": "flex-start",
- "width": 90,
+ "width": 210.00000000000003,
}
}
underlineColorAndroid="transparent"
@@ -44,7 +44,7 @@ exports[`EthereumSignUpForm renders the component 1`] = `
diff --git a/demo/components/presentational/__snapshots__/Home.test.js.snap b/demo/components/presentational/__snapshots__/Home.test.js.snap
new file mode 100644
index 00000000..c12ed8f1
--- /dev/null
+++ b/demo/components/presentational/__snapshots__/Home.test.js.snap
@@ -0,0 +1,25 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Home renders the component 1`] = `
+
+
+
+ Tasit
+
+
+
+`;
diff --git a/demo/components/presentational/__snapshots__/Land.test.js.snap b/demo/components/presentational/__snapshots__/Land.test.js.snap
new file mode 100644
index 00000000..60c640f0
--- /dev/null
+++ b/demo/components/presentational/__snapshots__/Land.test.js.snap
@@ -0,0 +1,24 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Land renders the component 1`] = `
+
+
+
+ Not found
+
+
+ 0
+ MANA (~$
+ 0
+ )
+
+
+`;
diff --git a/demo/components/presentational/__snapshots__/LandClaim.test.js.snap b/demo/components/presentational/__snapshots__/LandClaim.test.js.snap
new file mode 100644
index 00000000..29fa2055
--- /dev/null
+++ b/demo/components/presentational/__snapshots__/LandClaim.test.js.snap
@@ -0,0 +1,29 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`LandClaim renders the component 1`] = `
+
+
+
+
+
+
+`;
diff --git a/demo/components/presentational/__snapshots__/LandRow.test.js.snap b/demo/components/presentational/__snapshots__/LandRow.test.js.snap
new file mode 100644
index 00000000..5073ec3a
--- /dev/null
+++ b/demo/components/presentational/__snapshots__/LandRow.test.js.snap
@@ -0,0 +1,25 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`LandRow renders the component 1`] = `
+
+
+
+
+
+`;
diff --git a/demo/components/presentational/__snapshots__/LargeText.test.js.snap b/demo/components/presentational/__snapshots__/LargeText.test.js.snap
new file mode 100644
index 00000000..4aeeb005
--- /dev/null
+++ b/demo/components/presentational/__snapshots__/LargeText.test.js.snap
@@ -0,0 +1,15 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`LargeText renders the component 1`] = `
+
+`;
diff --git a/demo/components/presentational/__snapshots__/ListLands.test.js.snap b/demo/components/presentational/__snapshots__/ListLands.test.js.snap
new file mode 100644
index 00000000..7a8967fd
--- /dev/null
+++ b/demo/components/presentational/__snapshots__/ListLands.test.js.snap
@@ -0,0 +1,13 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`ListLands renders the component 1`] = `
+
+`;
diff --git a/demo/components/presentational/__snapshots__/OnboardingHome.test.js.snap b/demo/components/presentational/__snapshots__/OnboardingHome.test.js.snap
new file mode 100644
index 00000000..86dd00c7
--- /dev/null
+++ b/demo/components/presentational/__snapshots__/OnboardingHome.test.js.snap
@@ -0,0 +1,34 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`OnboardingHome renders the component 1`] = `
+
+
+
+ Let's get you set up with a secure way to store this land!
+
+
+
+
+
+`;
diff --git a/demo/package-lock.json b/demo/package-lock.json
index 63b6fe90..277b53d8 100644
--- a/demo/package-lock.json
+++ b/demo/package-lock.json
@@ -4422,7 +4422,6 @@
"qs": "^6.5.0",
"react-native-branch": "2.2.5",
"react-native-gesture-handler": "1.0.9",
- "react-native-maps": "github:expo/react-native-maps#e6f98ff7272e5d0a7fe974a41f28593af2d77bb2",
"react-native-reanimated": "1.0.0-alpha.10",
"react-native-screens": "1.0.0-alpha.15",
"react-native-svg": "8.0.8",
@@ -4453,6 +4452,10 @@
"invariant": "^2.2.2",
"prop-types": "^15.5.10"
}
+ },
+ "react-native-maps": {
+ "version": "github:expo/react-native-maps#e6f98ff7272e5d0a7fe974a41f28593af2d77bb2",
+ "from": "github:expo/react-native-maps#e6f98ff7272e5d0a7fe974a41f28593af2d77bb2"
}
}
},
@@ -5326,11 +5329,13 @@
},
"balanced-match": {
"version": "1.0.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
+ "optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -5348,7 +5353,8 @@
},
"concat-map": {
"version": "0.0.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"console-control-strings": {
"version": "1.1.0",
@@ -5480,17 +5486,20 @@
"minimatch": {
"version": "3.0.4",
"bundled": true,
+ "optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "0.0.8",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"minipass": {
"version": "2.2.4",
"bundled": true,
+ "optional": true,
"requires": {
"safe-buffer": "^5.1.1",
"yallist": "^3.0.0"
@@ -5507,6 +5516,7 @@
"mkdirp": {
"version": "0.5.1",
"bundled": true,
+ "optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -5590,6 +5600,7 @@
"once": {
"version": "1.4.0",
"bundled": true,
+ "optional": true,
"requires": {
"wrappy": "1"
}
@@ -10184,10 +10195,6 @@
"prop-types": "^15.5.10"
}
},
- "react-native-maps": {
- "version": "github:expo/react-native-maps#e6f98ff7272e5d0a7fe974a41f28593af2d77bb2",
- "from": "github:expo/react-native-maps#v0.22.1-exp.0"
- },
"react-native-reanimated": {
"version": "1.0.0-alpha.10",
"resolved": "https://registry.npmjs.org/react-native-reanimated/-/react-native-reanimated-1.0.0-alpha.10.tgz",
diff --git a/demo/screens/EthereumQuestion.js b/demo/screens/EthereumQuestion.js
deleted file mode 100644
index ebde46ea..00000000
--- a/demo/screens/EthereumQuestion.js
+++ /dev/null
@@ -1,39 +0,0 @@
-import React from "react";
-import { Button, StyleSheet, View } from "react-native";
-import LargeText from "@presentational/LargeText";
-import Colors from "@constants/Colors";
-
-export default class EthereumQuestion extends React.Component {
- render() {
- return (
-
- {`Are you new to Ethereum?`}
-
-
-
-
-
- );
- }
-}
-
-const styles = StyleSheet.create({
- container: {
- flex: 1,
- backgroundColor: Colors.backgroundColor,
- alignItems: "center",
- justifyContent: "center",
- },
- buttonView: {
- flexDirection: "row",
- marginTop: 20,
- },
-});
diff --git a/demo/screens/EthereumQuestionScreen.js b/demo/screens/EthereumQuestionScreen.js
new file mode 100644
index 00000000..b4a5974e
--- /dev/null
+++ b/demo/screens/EthereumQuestionScreen.js
@@ -0,0 +1,13 @@
+import React from "react";
+import EthereumQuestion from "@presentational/EthereumQuestion";
+
+export default class EthereumQuestionScreen extends React.Component {
+ render() {
+ return (
+ this.props.navigation.navigate("EthereumSignUpScreen")}
+ onSignIn={() => this.props.navigation.navigate("EthereumSignInScreen")}
+ />
+ );
+ }
+}
diff --git a/demo/screens/EthereumQuestionScreen.test.js b/demo/screens/EthereumQuestionScreen.test.js
new file mode 100644
index 00000000..4503c6a1
--- /dev/null
+++ b/demo/screens/EthereumQuestionScreen.test.js
@@ -0,0 +1,15 @@
+import React from "react";
+import NavigationTestUtils from "react-navigation/NavigationTestUtils";
+import { shallow } from "enzyme";
+import EthereumQuestionScreen from "./EthereumQuestionScreen";
+
+describe("EthereumQuestionScreen", () => {
+ jest.useFakeTimers();
+ beforeEach(() => {
+ NavigationTestUtils.resetInternalState();
+ });
+
+ it("renders the component", async () => {
+ expect(shallow()).toMatchSnapshot();
+ });
+});
diff --git a/demo/screens/EthereumSignIn.js b/demo/screens/EthereumSignIn.js
deleted file mode 100644
index d8565d69..00000000
--- a/demo/screens/EthereumSignIn.js
+++ /dev/null
@@ -1,30 +0,0 @@
-import React from "react";
-import { Button, StyleSheet, View } from "react-native";
-import LargeText from "@presentational/LargeText";
-import Colors from "@constants/Colors";
-
-export default class EthereumSignIn extends React.Component {
- render() {
- return (
-
- {`Cool. Let's start by hooking this app with your wallet.`}
-
-
-
- );
- }
-}
-
-const styles = StyleSheet.create({
- container: {
- flex: 1,
- backgroundColor: Colors.backgroundColor,
- alignItems: "center",
- justifyContent: "center",
- },
- buttonView: {
- flexDirection: "row",
- marginTop: 30,
- },
-});
diff --git a/demo/screens/EthereumSignInScreen.js b/demo/screens/EthereumSignInScreen.js
new file mode 100644
index 00000000..2a84265e
--- /dev/null
+++ b/demo/screens/EthereumSignInScreen.js
@@ -0,0 +1,8 @@
+import React from "react";
+import EthereumSignIn from "@presentational/EthereumSignIn";
+
+export default class EthereumSignInScreen extends React.Component {
+ render() {
+ return {}} />;
+ }
+}
diff --git a/demo/screens/EthereumSignInScreen.test.js b/demo/screens/EthereumSignInScreen.test.js
new file mode 100644
index 00000000..c1c31345
--- /dev/null
+++ b/demo/screens/EthereumSignInScreen.test.js
@@ -0,0 +1,15 @@
+import React from "react";
+import NavigationTestUtils from "react-navigation/NavigationTestUtils";
+import { shallow } from "enzyme";
+import EthereumSignInScreen from "./EthereumSignInScreen";
+
+describe("EthereumSignIn", () => {
+ jest.useFakeTimers();
+ beforeEach(() => {
+ NavigationTestUtils.resetInternalState();
+ });
+
+ it("renders the component", async () => {
+ expect(shallow()).toMatchSnapshot();
+ });
+});
diff --git a/demo/screens/EthereumSignUpScreen.js b/demo/screens/EthereumSignUpScreen.js
new file mode 100644
index 00000000..dd0fd32f
--- /dev/null
+++ b/demo/screens/EthereumSignUpScreen.js
@@ -0,0 +1,8 @@
+import React from "react";
+import EthereumSignUp from "@presentational/EthereumSignUp";
+
+export default class EthereumSignUpScreen extends React.Component {
+ render() {
+ return ;
+ }
+}
diff --git a/demo/screens/EthereumSignUpScreen.test.js b/demo/screens/EthereumSignUpScreen.test.js
new file mode 100644
index 00000000..f76064e2
--- /dev/null
+++ b/demo/screens/EthereumSignUpScreen.test.js
@@ -0,0 +1,15 @@
+import React from "react";
+import NavigationTestUtils from "react-navigation/NavigationTestUtils";
+import { shallow } from "enzyme";
+import EthereumSignUpScreen from "./EthereumSignUpScreen";
+
+describe("EthereumSignUpScreen", () => {
+ jest.useFakeTimers();
+ beforeEach(() => {
+ NavigationTestUtils.resetInternalState();
+ });
+
+ it("renders the component", async () => {
+ expect(shallow()).toMatchSnapshot();
+ });
+});
diff --git a/demo/screens/Home.js b/demo/screens/Home.js
deleted file mode 100644
index f1a4f369..00000000
--- a/demo/screens/Home.js
+++ /dev/null
@@ -1,28 +0,0 @@
-import React from "react";
-import { Image, Button, StyleSheet, View } from "react-native";
-import LargeText from "@presentational/LargeText";
-import Colors from "@constants/Colors";
-
-export default class Home extends React.Component {
- render() {
- return (
-
-
- {`Tasit`}
-
- );
- }
-}
-
-const styles = StyleSheet.create({
- container: {
- flex: 1,
- backgroundColor: Colors.backgroundColor,
- alignItems: "center",
- justifyContent: "center",
- },
-});
diff --git a/demo/screens/HomeScreen.js b/demo/screens/HomeScreen.js
new file mode 100644
index 00000000..80f0f87d
--- /dev/null
+++ b/demo/screens/HomeScreen.js
@@ -0,0 +1,10 @@
+import React from "react";
+import Home from "@presentational/Home";
+
+export default class HomeScreen extends React.Component {
+ render() {
+ return (
+ this.props.navigation.navigate("ListLandsScreen")} />
+ );
+ }
+}
diff --git a/demo/screens/HomeScreen.test.js b/demo/screens/HomeScreen.test.js
new file mode 100644
index 00000000..c4966285
--- /dev/null
+++ b/demo/screens/HomeScreen.test.js
@@ -0,0 +1,15 @@
+import React from "react";
+import NavigationTestUtils from "react-navigation/NavigationTestUtils";
+import { shallow } from "enzyme";
+import HomeScreen from "./HomeScreen";
+
+describe("HomeScreen", () => {
+ jest.useFakeTimers();
+ beforeEach(() => {
+ NavigationTestUtils.resetInternalState();
+ });
+
+ it("renders the component", async () => {
+ expect(shallow()).toMatchSnapshot();
+ });
+});
diff --git a/demo/screens/LandClaim.js b/demo/screens/LandClaim.js
deleted file mode 100644
index 1aefc0ec..00000000
--- a/demo/screens/LandClaim.js
+++ /dev/null
@@ -1,42 +0,0 @@
-import React from "react";
-import { StyleSheet, View, Button } from "react-native";
-import Land from "@presentational/Land";
-import Colors from "@constants/Colors";
-
-export default class Lands extends React.Component {
- render() {
- const { navigation } = this.props;
- const land = navigation.getParam("land", {
- id: -1,
- name: "Not found",
- img: require("../assets/images/icon.png"),
- priceMana: 0,
- priceUsd: 0,
- });
- return (
-
-
-
-
-
- );
- }
-}
-
-const styles = StyleSheet.create({
- container: {
- flex: 1,
- backgroundColor: Colors.backgroundColor,
- alignItems: "center",
- justifyContent: "center",
- },
- buttonView: {
- flexDirection: "row",
- marginTop: 30,
- },
-});
diff --git a/demo/screens/LandClaimScreen.js b/demo/screens/LandClaimScreen.js
new file mode 100644
index 00000000..ce076606
--- /dev/null
+++ b/demo/screens/LandClaimScreen.js
@@ -0,0 +1,21 @@
+import React from "react";
+import LandClaim from "@presentational/LandClaim";
+
+export default class LandClaimScreen extends React.Component {
+ render() {
+ const { navigation } = this.props;
+ const land = navigation.getParam("land", {
+ id: -1,
+ name: "Not found",
+ img: require("../assets/images/icon.png"),
+ priceMana: 0,
+ priceUsd: 0,
+ });
+ return (
+ this.props.navigation.navigate("OnboardingHomeScreen")}
+ />
+ );
+ }
+}
diff --git a/demo/screens/LandClaimScreen.test.js b/demo/screens/LandClaimScreen.test.js
new file mode 100644
index 00000000..cb215664
--- /dev/null
+++ b/demo/screens/LandClaimScreen.test.js
@@ -0,0 +1,18 @@
+import React from "react";
+import NavigationTestUtils from "react-navigation/NavigationTestUtils";
+import { shallow } from "enzyme";
+import LandClaimScreen from "./LandClaimScreen";
+
+describe("LandClaimScreen", () => {
+ jest.useFakeTimers();
+ beforeEach(() => {
+ NavigationTestUtils.resetInternalState();
+ });
+
+ it("renders the component", async () => {
+ const navigation = { getParam: jest.fn() };
+ expect(
+ shallow()
+ ).toMatchSnapshot();
+ });
+});
diff --git a/demo/screens/ListLands.js b/demo/screens/ListLandsScreen.js
similarity index 52%
rename from demo/screens/ListLands.js
rename to demo/screens/ListLandsScreen.js
index 3609e6bd..4bb14777 100644
--- a/demo/screens/ListLands.js
+++ b/demo/screens/ListLandsScreen.js
@@ -1,7 +1,7 @@
import React from "react";
-import { ListView, StyleSheet, View, TouchableHighlight } from "react-native";
-import Land from "@presentational/Land";
-import Colors from "@constants/Colors";
+import { ListView } from "react-native";
+import ListLands from "@presentational/ListLands";
+import LandRow from "@presentational/LandRow";
const rows = [
{
@@ -38,49 +38,23 @@ const rowHasChanged = (r1, r2) => r1.id !== r2.id;
const ds = new ListView.DataSource({ rowHasChanged });
-function LandRow(props) {
- const { onPress, rowData } = props;
- return (
-
-
-
-
-
- );
-}
-
-export default class ListLands extends React.Component {
+export default class ListLandsScreen extends React.Component {
state = {
dataSource: ds.cloneWithRows(rows),
};
- renderRow = rowData => {
+ renderRow = land => {
const handlePress = () =>
- this.props.navigation.navigate("LandClaim", { land: rowData });
-
- return ;
+ this.props.navigation.navigate("LandClaimScreen", { land: land });
+ return ;
};
render() {
return (
-
);
}
}
-
-const styles = StyleSheet.create({
- container: {
- flex: 1,
- backgroundColor: Colors.backgroundColor,
- },
- row: {
- padding: 15,
- marginBottom: 5,
- alignItems: "center",
- justifyContent: "center",
- },
-});
diff --git a/demo/screens/ListLandsScreen.test.js b/demo/screens/ListLandsScreen.test.js
new file mode 100644
index 00000000..ee7c54d9
--- /dev/null
+++ b/demo/screens/ListLandsScreen.test.js
@@ -0,0 +1,15 @@
+import React from "react";
+import NavigationTestUtils from "react-navigation/NavigationTestUtils";
+import { shallow } from "enzyme";
+import ListLandsScreen from "./ListLandsScreen";
+
+describe("ListLandsScreen", () => {
+ jest.useFakeTimers();
+ beforeEach(() => {
+ NavigationTestUtils.resetInternalState();
+ });
+
+ it("renders the component", async () => {
+ expect(shallow()).toMatchSnapshot();
+ });
+});
diff --git a/demo/screens/OnboardingHome.js b/demo/screens/OnboardingHome.js
deleted file mode 100644
index d8e5b56a..00000000
--- a/demo/screens/OnboardingHome.js
+++ /dev/null
@@ -1,34 +0,0 @@
-import React from "react";
-import { Image, Button, StyleSheet, View } from "react-native";
-import LargeText from "@presentational/LargeText";
-import Colors from "@constants/Colors";
-
-export default class OnboardingHome extends React.Component {
- render() {
- return (
-
-
- {`Let's get you set up with a secure way to store this land!`}
-
-
-
- );
- }
-}
-
-const styles = StyleSheet.create({
- container: {
- flex: 1,
- backgroundColor: Colors.backgroundColor,
- alignItems: "center",
- justifyContent: "center",
- },
- buttonView: {
- flexDirection: "row",
- marginTop: 30,
- },
-});
diff --git a/demo/screens/OnboardingHomeScreen.js b/demo/screens/OnboardingHomeScreen.js
new file mode 100644
index 00000000..80364405
--- /dev/null
+++ b/demo/screens/OnboardingHomeScreen.js
@@ -0,0 +1,12 @@
+import React from "react";
+import OnboardingHome from "@presentational/OnboardingHome";
+
+export default class OnboardingHomeScreen extends React.Component {
+ render() {
+ return (
+ this.props.navigation.navigate("EthereumQuestionScreen")}
+ />
+ );
+ }
+}
diff --git a/demo/screens/OnboardingHomeScreen.test.js b/demo/screens/OnboardingHomeScreen.test.js
new file mode 100644
index 00000000..f149175b
--- /dev/null
+++ b/demo/screens/OnboardingHomeScreen.test.js
@@ -0,0 +1,15 @@
+import React from "react";
+import NavigationTestUtils from "react-navigation/NavigationTestUtils";
+import { shallow } from "enzyme";
+import OnboardingHomeScreen from "./OnboardingHomeScreen";
+
+describe("OnboardingHome", () => {
+ jest.useFakeTimers();
+ beforeEach(() => {
+ NavigationTestUtils.resetInternalState();
+ });
+
+ it("renders the component", async () => {
+ expect(shallow()).toMatchSnapshot();
+ });
+});
diff --git a/demo/screens/__snapshots__/EthereumQuestionScreen.test.js.snap b/demo/screens/__snapshots__/EthereumQuestionScreen.test.js.snap
new file mode 100644
index 00000000..4525bea2
--- /dev/null
+++ b/demo/screens/__snapshots__/EthereumQuestionScreen.test.js.snap
@@ -0,0 +1,8 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`EthereumQuestionScreen renders the component 1`] = `
+
+`;
diff --git a/demo/screens/__snapshots__/EthereumSignInScreen.test.js.snap b/demo/screens/__snapshots__/EthereumSignInScreen.test.js.snap
new file mode 100644
index 00000000..d0a63e2e
--- /dev/null
+++ b/demo/screens/__snapshots__/EthereumSignInScreen.test.js.snap
@@ -0,0 +1,7 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`EthereumSignIn renders the component 1`] = `
+
+`;
diff --git a/demo/screens/__snapshots__/EthereumSignUpScreen.test.js.snap b/demo/screens/__snapshots__/EthereumSignUpScreen.test.js.snap
new file mode 100644
index 00000000..2aa0a090
--- /dev/null
+++ b/demo/screens/__snapshots__/EthereumSignUpScreen.test.js.snap
@@ -0,0 +1,3 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`EthereumSignUpScreen renders the component 1`] = ``;
diff --git a/demo/screens/__snapshots__/HomeScreen.test.js.snap b/demo/screens/__snapshots__/HomeScreen.test.js.snap
new file mode 100644
index 00000000..c6698593
--- /dev/null
+++ b/demo/screens/__snapshots__/HomeScreen.test.js.snap
@@ -0,0 +1,7 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`HomeScreen renders the component 1`] = `
+
+`;
diff --git a/demo/screens/__snapshots__/LandClaimScreen.test.js.snap b/demo/screens/__snapshots__/LandClaimScreen.test.js.snap
new file mode 100644
index 00000000..17cf5c8d
--- /dev/null
+++ b/demo/screens/__snapshots__/LandClaimScreen.test.js.snap
@@ -0,0 +1,7 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`LandClaimScreen renders the component 1`] = `
+
+`;
diff --git a/demo/screens/__snapshots__/ListLandsScreen.test.js.snap b/demo/screens/__snapshots__/ListLandsScreen.test.js.snap
new file mode 100644
index 00000000..bed9bdde
--- /dev/null
+++ b/demo/screens/__snapshots__/ListLandsScreen.test.js.snap
@@ -0,0 +1,7 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`ListLandsScreen renders the component 1`] = `
+
+`;
diff --git a/demo/screens/__snapshots__/OnboardingHomeScreen.test.js.snap b/demo/screens/__snapshots__/OnboardingHomeScreen.test.js.snap
new file mode 100644
index 00000000..ca38212f
--- /dev/null
+++ b/demo/screens/__snapshots__/OnboardingHomeScreen.test.js.snap
@@ -0,0 +1,7 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`OnboardingHome renders the component 1`] = `
+
+`;