Skip to content

Commit 28d9a08

Browse files
lmcmzAntonlpetkov-swtpettrovjellegerbrandy
committed
Seperate env (#215)
* Add ios-dev env * Change dev to stg * FIx Android config * fix issue when current date * add count when pending prop to a join request * remove commented code * remove unused functionalities * fix images url * fixed explore link in profile page when no commons * CM-449 data update for commons , proposals and votes (#190) * Show random image in the last step of common creation & set default as cover image in the dao data * Fixed data in UI for images, files and links * Removed logs * Updated the way of saving proposal data to IPFS * Changed description type * add dismiss to transaction error bottom sheet (#195) Co-authored-by: Anton <anton@Antons-Mac-mini.local> * Cm 409 number of proposals and layout fix (#196) * fix layout issue * show number of all proposals Co-authored-by: Anton <anton@Antons-Mac-mini.local> * add uid to user doc (#197) Co-authored-by: Anton <anton@Antons-Mac-mini.local> * update flow of common creation with the new static loading screen (#198) Co-authored-by: Anton <anton@Antons-Mac-mini.local> * add links and files proper links (#199) Co-authored-by: Anton <anton@Antons-Mac-mini.local> * some language fixes (#200) * header now shows dao title, proposal shows title from description * pass fundingDeadline * fix sums (#203) * fix sums * make rule inclusive not exclusive Co-authored-by: Anton <anton@Antons-Mac-mini.local> * update daos with real pics from db (#204) Co-authored-by: Anton <anton@Antons-Mac-mini.local> * better error when fundign gaol is not reached yet (#206) * hide create funding proposal button when still funding (#208) Co-authored-by: Anton <anton@Antons-Mac-mini.local> * CM-463-update-proposal-votes (#207) Co-authored-by: jelle <jellegerbrandy@gmail.com> * update arc.js to 40 * remove some logging and add some error handling * use v8_6 of the subgraph * Change file name * Change shell * Fix iOS config issue * add some TODOs in the code * Change common-dev * Fix typo * commit env files, tweaks * Add config in Xcode * Remove cp env file Co-authored-by: Anton <anton@Antons-Mac-mini.local> Co-authored-by: lpetkov-sw <lyubomir.petkov@limechain.tech> Co-authored-by: Anton Petrov <tpettrov@gmail.com> Co-authored-by: Jelle <jellegerbrandy@gmail.com> Co-authored-by: Adam LEvi <leviadam@gmail.com>
1 parent 04bbe85 commit 28d9a08

32 files changed

+907
-1238
lines changed

packages/common/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,6 @@ google-services.json
7474

7575
# IconFont
7676
/src/Assets/iconfont
77+
/.env
78+
.env.stg
79+
tmp.xcconfig

packages/common/App.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -90,21 +90,14 @@ const App = ({userStore, bottomSheetStore}) => {
9090
const [loading, setLoading] = useState(true);
9191
const hudRef = useRef();
9292

93-
// const getTestEth = async address => {
94-
// console.log('getting test eth for user: ', address);
95-
// const req = await fetch(
96-
// `https://us-central1-common-daostack.cloudfunctions.net/api/send-test-eth/${address}`,
97-
// );
98-
// console.log('result from eth request: ', req);
99-
// };
10093
useEffect(() => {
10194
messaging()
10295
.registerDeviceForRemoteMessages()
10396
.then(() => {
10497
return messaging().requestPermission();
10598
})
10699
.then(settings => {
107-
console.log('Notification settings', settings);
100+
// console.log('Notification settings', settings);
108101
if (settings) {
109102
return NotificationService.saveTokenToDatabase();
110103
}
@@ -118,7 +111,7 @@ const App = ({userStore, bottomSheetStore}) => {
118111
const showLisenter = DeviceEventEmitter.addListener(
119112
'HUD',
120113
(content, isLoading = false) => {
121-
hudRef.current.show(content, isLoading ? DURATION.FOREVER : 1500);
114+
hudRef.current.show(content, isLoading ? DURATION.FOREVER : 15000);
122115
},
123116
);
124117
const hidelisenter = DeviceEventEmitter.addListener('HideHUD', () => {
@@ -224,7 +217,6 @@ const App = ({userStore, bottomSheetStore}) => {
224217
return unsubscribeAll;
225218
}, []);
226219

227-
228220
if (loading) {
229221
return <View style={{flex: 1}} />;
230222
}

packages/common/__tests__/App-test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ it('getUser should return user', async () => {
1515
console.log('users: ', await FirebaseService.getUser());
1616
};
1717

18-
console.log('USERS >>>', user);
1918

2019
expect(user.length).toBeGreaterThan(0);
2120
});

packages/common/android/app/build.gradle

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
apply plugin: "com.android.application"
22
apply plugin: 'io.fabric'
33

4+
apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"
5+
46
import com.android.build.OutputFile
57

68
/**
@@ -135,6 +137,20 @@ android {
135137
versionCode 1
136138
versionName "1.0"
137139
multiDexEnabled true
140+
141+
// react-native-config
142+
resValue "string", "build_config_package", "com.daostack.common"
143+
}
144+
145+
flavorDimensions "version"
146+
productFlavors {
147+
staging {
148+
applicationIdSuffix ".staging"
149+
dimension "version"
150+
}
151+
production {
152+
dimension "version"
153+
}
138154
}
139155
splits {
140156
abi {

packages/common/android/app/proguard-rules.pro

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@
88
# http://developer.android.com/guide/developing/tools/proguard.html
99

1010
# Add any project specific keep options here:
11+
12+
-keep class <package_name>.BuildConfig { *; }
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<color name="kprogresshud_default_color">#b1000000</color>
4+
<color name="kprogresshud_grey_color">#449E9E9E</color>
5+
</resources>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<resources>
2+
<string name="app_name">common-stg</string>
3+
</resources>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<resources>
2+
3+
<!-- Base application theme. -->
4+
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
5+
<!-- Customize your theme here. -->
6+
<item name="android:textColor">#000000</item>
7+
</style>
8+
9+
<style name="Theme.HUD.FullScreenDialog" parent="Theme.AppCompat.Dialog">
10+
<item name="android:windowContentOverlay">@null</item>
11+
<item name="android:windowFrame">@null</item>
12+
<item name="android:windowIsTranslucent">true</item>
13+
<item name="android:windowNoTitle">true</item>
14+
<item name="android:windowBackground">@android:color/transparent</item>
15+
<item name="android:backgroundDimEnabled">true</item>
16+
<item name="android:backgroundDimAmount">0</item>
17+
<item name="colorPrimaryDark">@android:color/transparent</item>
18+
<item name="android:windowIsFloating">false</item>
19+
</style>
20+
21+
</resources>

packages/common/env/env.prod

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
ENV=production
2+
ARC_VERSION=0.1.1-rc.21
3+
GRAPH_VERSION=v8_2_exp_xdai
4+
graphHttpLink=https://api.thegraph.com/subgraphs/name/daostack/
5+
graphwsLink=wss://api.thegraph.com/subgraphs/name/daostack/
6+
ipfsLink=https://api.thegraph.com/ipfs-daostack/api/v0
7+
web3ProviderUrl=https://dai.poa.network
8+
relayerUrl=https://us-central1-common-daostack.cloudfunctions.net/relayer/
9+
web3NetworkId=100
10+
COMMONTOKENADDRESS=0x2ea0be07dfc0357f40884365f2c9cfd2a36d4a6e
11+
firebaseWebClientId=854172758045-l3summ7br1b9p1tv2tp6gha0j8kki3cq.apps.googleusercontent.com
12+
13+

packages/common/env/env.stg

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
ENV=staging
2+
ARC_VERSION=0.1.1-rc.23
3+
GRAPH_VERSION=v8_6_exp_kovan
4+
graphHttpLink=https://api.thegraph.com/subgraphs/name/daostack/
5+
graphwsLink=wss://api.thegraph.com/subgraphs/name/daostack/
6+
ipfsLink=https://api.thegraph.com/ipfs-daostack/api/v0
7+
web3ProviderUrl=https://kovan.infura.io/v3/3c08878d00734c0c98a3e4741d0b4cfc
8+
relayerUrl=https://us-central1-common-staging-50741.cloudfunctions.net/relayer
9+
web3NetworkId=42
10+
COMMONTOKENADDRESS=0xdff3e43710d39d2ba5dda7a8d959ed22cc905b01
11+
firebaseWebClientId=78965953367-gp6r7vuvceqj4k8gngrqkng98thgqmo8.apps.googleusercontent.com

0 commit comments

Comments
 (0)