Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP] Build flow for mobile app (#1476)
* fix CI * bitrise config * bitrise config * bitrise config * bitrise config * bitrise config * bitrise config * bitrise config * bitrise config * react-native-ci
- Loading branch information
Showing
18 changed files
with
102 additions
and
428 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...idTest/java/org/gooddollar/DetoxTest.java → ...idTest/java/com/gooddollar/DetoxTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package org.gooddollar; | ||
package com.gooddollar; | ||
|
||
import com.wix.detox.Detox; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,5 @@ | |
* @format | ||
*/ | ||
|
||
require('./shim.js') | ||
require('./native.js') | ||
|
||
import './shim.js' | ||
import './native.js' |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,4 @@ | ||
import { useCallback, useEffect, useState } from 'react' | ||
import API from '../API/api' | ||
import { delay } from '../utils/async' | ||
import logger from '../logger/pino-logger' | ||
export { default as useConnectionWeb3 } from './useConnectionWeb3' | ||
export { default as useConnectionGun } from './useConnectionGun' | ||
export { default as useConnection } from './useConnection' | ||
|
||
const log = logger.child({ from: 'hasConnectionChange' }) | ||
|
||
export const useAPIConnection = () => { | ||
const [isConnection, setIsConnection] = useState(false) | ||
|
||
/** | ||
* Don't start app if server isn't responding | ||
*/ | ||
const apiReady = useCallback(async () => { | ||
try { | ||
await API.ready | ||
const res = await Promise.race([ | ||
API.ping() | ||
.then(_ => true) | ||
.catch(_ => 'ping error'), | ||
delay(3000).then(_ => 'timeout'), | ||
]) | ||
log.debug('apiReady:', { res }) | ||
if (res !== true) { | ||
setIsConnection(false) | ||
await delay(3000) | ||
return apiReady() | ||
} | ||
setIsConnection(true) | ||
return | ||
} catch (e) { | ||
log.debug('apiReady:', e.message) | ||
setIsConnection(false) | ||
await delay(3000) | ||
|
||
// return apiReady() | ||
} | ||
}) | ||
|
||
useEffect(() => { | ||
apiReady() | ||
}, [apiReady]) | ||
|
||
return isConnection | ||
} | ||
export { default as useAPIConnection } from './useAPIConnection' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default () => true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { useCallback, useEffect, useState } from 'react' | ||
import API from '../API/api' | ||
import logger from '../logger/pino-logger' | ||
import { delay } from '../utils/async' | ||
|
||
const log = logger.child({ from: 'useAPIConnection' }) | ||
|
||
export default () => { | ||
const [isConnection, setIsConnection] = useState(false) | ||
|
||
/** | ||
* Don't start app if server isn't responding | ||
*/ | ||
const apiReady = useCallback(async () => { | ||
try { | ||
await API.ready | ||
const res = await Promise.race([ | ||
API.ping() | ||
.then(_ => true) | ||
.catch(_ => 'ping error'), | ||
delay(3000).then(_ => 'timeout'), | ||
]) | ||
log.debug('apiReady:', { res }) | ||
if (res !== true) { | ||
setIsConnection(false) | ||
await delay(3000) | ||
return apiReady() | ||
} | ||
setIsConnection(true) | ||
return | ||
} catch (e) { | ||
log.debug('apiReady:', e.message) | ||
setIsConnection(false) | ||
await delay(3000) | ||
|
||
// return apiReady() | ||
} | ||
}) | ||
|
||
useEffect(() => { | ||
apiReady() | ||
}, [apiReady]) | ||
|
||
return isConnection | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default () => true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default () => true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default () => true |