Skip to content

Commit

Permalink
Merge pull request #312 from BitPortal/0.4.2_fiexd_02
Browse files Browse the repository at this point in the history
0.4.2 fixed 02
  • Loading branch information
waterFallFlow authored Nov 22, 2018
2 parents 6725206 + e057b31 commit 69f52cf
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .env.development
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ENV=development
BITPORTAL_API_REST_URL=https://staging-api.bitportal.io
BITPORTAL_API_MARKET_URL=https://market.bitportal.io/api/v2
BITPROTAL_API_TRACE_URL=http://a276fba2.ngrok.io
BITPROTAL_API_TRACE_URL=http://35.187.150.99
BITPORTAL_API_WEBSOCKET_URL=ws://staging-api.bitportal.io
BITPORTAL_API_CMS_URL=https://cms.bitportal.io
BITPORTAL_API_EOS_URL=https://api-kylin.eosasia.one
Expand Down
2 changes: 1 addition & 1 deletion ios/bitportal/en.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
"NSPhotoLibraryUsageDescription" = "Enable album access";
"NSBluetoothPeripheralUsageDescription" = "Enable bluetooth access";
"NSCameraUsageDescription" = "Enable camera access";
"NSCameraUsageDescription" = "\"BitPortal\" request to enable camera access to scan the QR code";
"NSAppleMusicUsageDescription" = "Enable media access";
"NSMotionUsageDescription" = "Enable fitness access";
"NSSpeechRecognitionUsageDescription" = "Enable microphone access";
Expand Down
2 changes: 1 addition & 1 deletion ios/bitportal/zh-Hans.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
"NSPhotoLibraryUsageDescription" = "开启相册权限";
"NSBluetoothPeripheralUsageDescription" = "开启蓝牙权限";
"NSCameraUsageDescription" = "开启摄像权限";
"NSCameraUsageDescription" = "\"BitPortal\"请求开启摄像头权限以扫描二维码";
"NSAppleMusicUsageDescription" = "访问媒体资料库";
"NSMotionUsageDescription" = "开启运动健身权限";
"NSSpeechRecognitionUsageDescription" = "开启语音识别权限";
Expand Down
10 changes: 5 additions & 5 deletions shared/sagas/eosAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,9 @@ function* importEOSAccountRequested(action: Action<ImportEOSAccountParams>) {
walletId: eosAccountName,
chainType: 'eos',
ownerKey: publicKey,
activeKey: publicKey,
note: ''
activeKey: publicKey
}
// console.log('###--', params)
yield put(traceImport(params))
} catch (e) {
yield put(actions.importEOSAccountFailed(getErrorMessage(e)))
Expand Down Expand Up @@ -241,22 +241,23 @@ function* getEOSKeyAccountsRequested(action: Action<GetEOSKeyAccountsParams>) {
}

yield put(actions.getEOSKeyAccountsSucceeded(result))
if (action.payload.componentId)
if (action.payload.componentId) {
push('BitPortal.AccountSelection', action.payload.componentId, {
keyPermissions,
publicKey,
privateKey,
password,
hint
})
}
} catch (e) {
yield put(actions.getEOSKeyAccountsFailed(getEOSErrorMessage(e)))
}
}

function* getEOSAccountRequested(action: Action<GetEOSAccountParams>) {
if (!action.payload) return

try {
const eosAccountName = action.payload.eosAccountName
const eosAccountCreationInfo = yield select((state: RootState) => state.eosAccount.get('eosAccountCreationInfo'))
Expand All @@ -278,7 +279,6 @@ function* getEOSAccountRequested(action: Action<GetEOSAccountParams>) {
const code = 'eosio.token'
const data = yield call(eos.getCurrencyBalance, { code, account: eosAccountName })
const symbol = (data && data[0]) ? data[0].split(' ')[1] : 'eos'

const params = {
language,
deviceId,
Expand Down
11 changes: 11 additions & 0 deletions shared/sagas/trace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,19 @@ function* traceVotes(action: Action<TraceVotesParams>) {
}
}

function* traceImport(action: Action<TraceVotesParams>) {
if (!action.payload) return

try {
yield call(api.traceImport, action.payload)
} catch (e) {
console.log('###', e)
}
}

export default function* tokenSaga() {
yield takeEvery(String(actions.traceTransaction), traceTransaction)
yield takeEvery(String(actions.traceStake), traceStake)
yield takeEvery(String(actions.traceVotes), traceVotes)
yield takeEvery(String(actions.traceImport), traceImport)
}
15 changes: 8 additions & 7 deletions shared/screens/Assets/MenuPopUp/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ const styles = StyleSheet.create({
borderBottomWidth: StyleSheet.hairlineWidth,
backgroundColor: Colors.bgColor_30_31_37
},
bgContainer: {
marginTop: -SCREEN_HEIGHT,
paddingHorizontal: 15,
justifyContent: 'flex-end',
flexDirection: 'row',
},
center: {
alignItems: 'center',
justifyContent: 'center'
Expand All @@ -36,12 +30,19 @@ const styles = StyleSheet.create({
justifyContent: 'space-between',
flexDirection: 'row'
},
bgContainer: {
marginTop: -SCREEN_HEIGHT+NAV_BAR_HEIGHT,
width: 170,
minHeight: 100,
marginLeft: SCREEN_WIDTH-180,
justifyContent: 'flex-end',
flexDirection: 'row',
},
contentContainer: {
borderRadius: 5,
minWidth: 100,
minHeight: 100,
padding: 15,
marginTop: NAV_BAR_HEIGHT,
backgroundColor: Colors.minorThemeColor
},
btnContainer: {
Expand Down

0 comments on commit 69f52cf

Please sign in to comment.