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

Wakala #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
Binary file added .DS_Store
Binary file not shown.
33 changes: 0 additions & 33 deletions Project_Name/Readme.md

This file was deleted.

File renamed without changes.
90 changes: 90 additions & 0 deletions Wakala/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
import "node-libs-react-native/globals";
import React from "react";
import "./global";
import { NavigationContainer } from "@react-navigation/native";
import { Provider } from "react-redux";
import { createStore } from "redux";
import AppLoading from "expo-app-loading";
import AsyncStorage from "@react-native-async-storage/async-storage";
import {
useFonts,
Inter_400Regular,
Inter_500Medium,
Inter_600SemiBold,
Inter_700Bold,
} from "@expo-google-fonts/inter";
import {
Rubik_400Regular,
Rubik_500Medium,
Rubik_600SemiBold,
Rubik_700Bold,
} from "@expo-google-fonts/rubik";
import { DMSans_700Bold, DMSans_400Regular } from "@expo-google-fonts/dm-sans";

import globalStore from "./src/redux/GlobalStore";
import Screens from "./src/screens";
import { Magic } from "@magic-sdk/react-native";
import { LogBox } from "react-native";
import ContractMethods from "./src/utils/celo-integration/ContractMethods";
LogBox.ignoreLogs([
"Warning: The provided value 'moz",
"Warning: The provided value 'ms-stream",
]);

const store = createStore(globalStore);
const magic = new Magic("pk_live_5B2A9951805695BB", {
network: {
rpcUrl: "https://alfajores-forno.celo-testnet.org",
},
});

const loadAppSession = async () => {
try {
let user = await AsyncStorage.getItem("user");
let data = JSON.parse(user);
let action = { type: "INIT", value: { ...data, magic: magic } };
//console.log(data)
store.dispatch(action);
return true;
} catch (err) {
console.log(err);
return true;
}
};

const App = () => {
let [fontsLoaded] = useFonts({
Inter_400Regular,
Inter_500Medium,
Inter_600SemiBold,
Inter_700Bold,
Rubik_400Regular,
Rubik_500Medium,
Rubik_600SemiBold,
Rubik_700Bold,
DMSans_700Bold,
DMSans_400Regular,
});

let [isReady, setReady] = React.useState(false);
if (!isReady || !fontsLoaded) {
return (
<AppLoading
startAsync={loadAppSession}
onFinish={() => setReady(true)}
onError={console.warn}
autoHideSplash={true}
/>
);
} else {
return (
<Provider store={store}>
<NavigationContainer>
<Screens />
</NavigationContainer>
</Provider>
);
}
};

export default App;
File renamed without changes.
44 changes: 44 additions & 0 deletions Wakala/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Wakala Interface

## 1. Resources

1. All designs can be found [on Figma](https://www.figma.com/file/ERJ7bYyBWdqJw1ID9nZJ2N/Wakala?node-id=1059%3A1278).

2. [Board with all stories organized by flow](https://github.com/WakalaDAO/wakala-interface/projects/2)

3. [Kanban board for tracking progress](https://github.com/WakalaDAO/wakala-interface/projects/3)


## 2. Who is working on this:
1. Product: [@SteffenKrogmann](https://github.com/SteffenKrogmann)

2. Design: [@ChegeMartinx](https://github.com/ChegeMartinx)

3. Developers:

- [@AbijahKaj](https://github.com/AbijahKaj)
- [@Alphonce-Mutebi](https://github.com/Alphonce-Mutebi)
- [@Kapersky1337](https://github.com/Kapersky1337)
- [@Muhani99](https://github.com/Muhani99)
- [@onumengine](https://github.com/onumengine)
- [@sebastiaohns](https://github.com/sebastiaohns)


## 3. Workflow
1. The [story](https://github.com/Wakala/wakala-interface/labels/story) issues contain wireframes, designs, Figma links, and context/acceptance criteria.

2. Progress is tracked on the [Kanban board project](https://github.com/WakalaDAO/wakala-interface/projects/3).

3. Keep your PRs small. PRs require 3 reviewers.

4. For finished UIs: Move them to column "4. Feedback | Testing" on the [Kanban board](https://github.com/WakalaDAO/wakala-interface/projects/3) and assign them to [@ChegeMartinx](https://github.com/ChegeMartinx) for testing.

5. For integrated UIs/stories: Move them to column "6. Testing" on the [Kanban board](https://github.com/WakalaDAO/wakala-interface/projects/3) and assign them to @SteffenKrogmann](https://github.com/SteffenKrogmann) for testing.

6. Never close an issue, just reassign.

7. If you have a question/issue related to product/concept, file an issue for [@SteffenKrogmann](https://github.com/SteffenKrogmann).

8. If you need a design change, file an issue for [@ChegeMartinx](https://github.com/ChegeMartinx).

9. For issues related to smart contracts and APIs, file an issue for [@Muhani99](https://github.com/Muhani99) and tag it [api](https://github.com/WakalaDAO/wakala-interface/labels/api).
36 changes: 36 additions & 0 deletions Wakala/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"expo": {
"name": "Wakala",
"slug": "wakala-dev",
"owner": "wakala",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./src/assets/icon.png",
"splash": {
"image": "./src/assets/splash.png",
"resizeMode": "cover",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.wakala.wakaladev"
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./src/assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
},
"package": "com.wakala.wakaladev"
},
"web": {
"favicon": "./src/assets/favicon.png"
},
"description": ""
}
}
File renamed without changes.
7 changes: 7 additions & 0 deletions Wakala/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = function (api) {
api.cache(true);
return {
presets: ["babel-preset-expo"],
plugins: ["react-native-reanimated/plugin"],
};
};
File renamed without changes.
23 changes: 23 additions & 0 deletions Wakala/global.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
export interface Global {
btoa: any
self: any
Buffer: any
process: any
location: any
}

declare var global: Global
if (typeof global.self === 'undefined') {
global.self = global
}
if (typeof btoa === 'undefined') {
global.btoa = function (str) {
return new Buffer(str, 'binary').toString('base64')
}
}

global.Buffer = require('buffer').Buffer
global.process = require('process')
global.location = {
protocol: 'https',
}
9 changes: 9 additions & 0 deletions Wakala/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import 'react-native-gesture-handler';
import { registerRootComponent } from 'expo';

import App from './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);
22 changes: 22 additions & 0 deletions Wakala/metro.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const { getDefaultConfig } = require("metro-config");
const defaultConfig = getDefaultConfig.getDefaultValues(__dirname);

const crypto = require.resolve("crypto-browserify");
const url = require.resolve("url/");

module.exports = {
resolver: {
assetExts: [...defaultConfig.resolver.assetExts, "pem"],
extraNodeModules: {
crypto,
url,
fs: require.resolve("expo-file-system"),
http: require.resolve("stream-http"),
https: require.resolve("https-browserify"),
net: require.resolve("react-native-tcp"),
os: require.resolve("os-browserify/browser.js"),
path: require.resolve("path-browserify"),
stream: require.resolve("readable-stream"),
},
},
};
81 changes: 81 additions & 0 deletions Wakala/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"scripts": {
"start": "react-native start",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"@celo-tools/use-contractkit": "^1.3.0",
"@celo/contractkit": "^1.3.3",
"@expo-google-fonts/dm-sans": "^0.2.0",
"@expo-google-fonts/inter": "^0.2.0",
"@expo-google-fonts/rubik": "^0.2.0",
"@haskkor/react-native-pincode": "^1.22.6",
"@magic-sdk/react-native": "^6.2.0",
"@react-native-async-storage/async-storage": "^1.15.11",
"@react-native-community/clipboard": "^1.5.1",
"@react-native-community/masked-view": "^0.1.11",
"@react-navigation/drawer": "^6.1.8",
"@react-navigation/native": "^6.0.6",
"@react-navigation/stack": "^6.0.11",
"bignumber": "^1.1.0",
"crypto-browserify": "^3.12.0",
"expo": "~43.0.0",
"expo-app-loading": "~1.2.1",
"expo-constants": "~12.1.3",
"expo-file-system": "^13.0.3",
"expo-font": "~10.0.3",
"expo-linear-gradient": "^10.0.3",
"expo-secure-store": "~11.0.3",
"expo-splash-screen": "~0.13.5",
"expo-status-bar": "~1.1.0",
"expo-updates": "~0.10.13",
"https-browserify": "^1.0.0",
"lodash": "^4.17.21",
"node-libs-browser": "^2.2.1",
"node-libs-react-native": "^1.2.1",
"os-browserify": "^0.3.0",
"path-browserify": "^1.0.1",
"radio-buttons-react-native": "^1.0.4",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-native": "0.64.3",
"react-native-country-flag": "^1.1.4",
"react-native-fade-in-out": "^1.0.6",
"react-native-gesture-handler": "~1.10.2",
"react-native-keyboard-aware-scroll-view": "^0.9.5",
"react-native-keychain": "^8.0.0",
"react-native-masked-text": "^1.13.0",
"react-native-numpad": "^0.3.0",
"react-native-paper": "^4.10.0",
"react-native-phone-number-input": "^2.1.0",
"react-native-reanimated": "~2.2.0",
"react-native-redash": "^16.2.2",
"react-native-responsive-fontsize": "^0.5.1",
"react-native-safe-area-context": "3.3.2",
"react-native-screens": "~3.8.0",
"react-native-svg": "^12.1.1",
"react-native-tcp": "^4.0.0",
"react-native-web": "0.17.1",
"react-native-webview": "^9.4.0",
"@expo/vector-icons": "^12.0.5",
"@react-navigation/core": "^6.1.0",
"react-redux": "^7.2.6",
"readable-stream": "^3.6.0",
"redux": "^4.1.2",
"stream-http": "^3.2.0",
"vm-browserify": "^1.1.2",
"web3": "^1.6.1"
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@types/react-native": "~0.64.12",
"prop-types": "^15.7.2",
"rn-nodeify": "^10.3.0"
},
"private": true,
"name": "wakala-interface",
"version": "1.0.0"
}
26 changes: 26 additions & 0 deletions Wakala/shim.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
if (typeof __dirname === 'undefined') global.__dirname = '/'
if (typeof __filename === 'undefined') global.__filename = ''
if (typeof process === 'undefined') {
global.process = require('process')
} else {
const bProcess = require('process')
for (var p in bProcess) {
if (!(p in process)) {
process[p] = bProcess[p]
}
}
}

process.browser = false
if (typeof Buffer === 'undefined') global.Buffer = require('buffer').Buffer

// global.location = global.location || { port: 80 }
const isDev = typeof __DEV__ === 'boolean' && __DEV__
process.env['NODE_ENV'] = isDev ? 'development' : 'production'
if (typeof localStorage !== 'undefined') {
localStorage.debug = isDev ? '*' : ''
}

// If using the crypto shim, uncomment the following line to ensure
// crypto is loaded first, so it can populate global.crypto
// require('crypto')
Binary file added Wakala/src/assets/adaptive-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Wakala/src/assets/animation/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const PROGRESS_ANIMATION = require("./progress-bar-water-fills-circle.json")
Loading