Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
(kw-138): Deploy wallet to mainnet (#45)
Browse files Browse the repository at this point in the history
* chore: add ttd currency

* feat: ensure account initialization

* chore: set currency default on store init

* chore: pin skips phone number

* fix: remove rewards for test event

* chore: remove unnecessary notifications

* chore: bump to 1.34.2

* fix: reduce selected vendor sheet height

* chore: remove vendors from services

* feat: dynamic vendor links

* chore: enable firebase for alfajores builds

* chore: remove vendor from env file

* feat: prepare mainnet envs for deployment

* feat: add dynamic firebase rtdb url

* chore: bump build number
  • Loading branch information
shottah authored Aug 19, 2022
1 parent ab4dbf5 commit 85dfa88
Show file tree
Hide file tree
Showing 15 changed files with 31 additions and 34 deletions.
3 changes: 1 addition & 2 deletions .env.alfajores
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SMS_RETRIEVER_APP_SIGNATURE=GH+4Okn6nOW
FORNO_ENABLED_INITIALLY=true
DEFAULT_SYNC_MODE=5
DEV_SETTINGS_ACTIVE_INITIALLY=false
FIREBASE_ENABLED=false
FIREBASE_ENABLED=true
SHOW_TESTNET_BANNER=true
SHOW_GET_INVITE_LINK=true
APP_BUNDLE_ID=io.zed.alfajores.dev
Expand All @@ -20,4 +20,3 @@ GETH_USE_STATIC_NODES=true
SENTRY_ENABLED=true
# Only for development, use with caution
GETH_START_HTTP_RPC_SERVER=false
KOLEKTIVO_CMS_URL=https://api.kolektivo.cw
1 change: 0 additions & 1 deletion .env.alfajoresdev
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ GETH_USE_STATIC_NODES=true
SENTRY_ENABLED=false
# Only for development, use with caution
GETH_START_HTTP_RPC_SERVER=false
KOLEKTIVO_CMS_URL=https://api.kolektivo.cw
1 change: 0 additions & 1 deletion .env.alfajoresnightly
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ GETH_USE_STATIC_NODES=true
SENTRY_ENABLED=true
# Only for development, use with caution
GETH_START_HTTP_RPC_SERVER=false
KOLEKTIVO_CMS_URL=https://api.kolektivo.cw
5 changes: 2 additions & 3 deletions .env.mainnet
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,16 @@ SMS_RETRIEVER_APP_SIGNATURE=bU9E4ctGtIW
FORNO_ENABLED_INITIALLY=true
DEFAULT_SYNC_MODE=5
DEV_SETTINGS_ACTIVE_INITIALLY=false
FIREBASE_ENABLED=false
FIREBASE_ENABLED=true
SHOW_TESTNET_BANNER=false
SHOW_GET_INVITE_LINK=false
APP_BUNDLE_ID=io.zed.kolektivo
APP_STORE_ID=1520414263
APP_DISPLAY_NAME=Valora
APP_DISPLAY_NAME=Kolektivo
IOS_GOOGLE_SERVICE_PLIST=GoogleService-Info.mainnet.plist
DYNAMIC_DOWNLOAD_LINK=https://vlra.app/invite
GETH_USE_FULL_NODE_DISCOVERY=true
GETH_USE_STATIC_NODES=true
SENTRY_ENABLED=true
# Only for development, use with caution
GETH_START_HTTP_RPC_SERVER=false
KOLEKTIVO_CMS_URL=https://api.kolektivo.cw
1 change: 0 additions & 1 deletion .env.mainnetdev
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ GETH_USE_STATIC_NODES=true
SENTRY_ENABLED=false
# Only for development, use with caution
GETH_START_HTTP_RPC_SERVER=false
KOLEKTIVO_CMS_URL=https://api.kolektivo.cw
1 change: 0 additions & 1 deletion .env.mainnetnightly
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ GETH_USE_STATIC_NODES=true
SENTRY_ENABLED=true
# Only for development, use with caution
GETH_START_HTTP_RPC_SERVER=false
KOLEKTIVO_CMS_URL=https://api.kolektivo.cw
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ CELO_RELEASE_KEY_ALIAS=celo-key-alias

# Setting this manually based on version number until we have this deploying via Cloud Build
# Example: v1.5.1 deployment number 1 = 1005001001 (1 005 001 001)
VERSION_CODE=1021071631
VERSION_CODE=1021071632
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
Expand Down
8 changes: 4 additions & 4 deletions ios/celo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = celo/celo.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 23;
CURRENT_PROJECT_VERSION = 24;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = 48TPT4QN6K;
HEADER_SEARCH_PATHS = "$(inherited)";
Expand Down Expand Up @@ -1212,7 +1212,7 @@
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = celo/celo.entitlements;
CURRENT_PROJECT_VERSION = 23;
CURRENT_PROJECT_VERSION = 24;
DEVELOPMENT_TEAM = 48TPT4QN6K;
HEADER_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = celo/Info.plist;
Expand Down Expand Up @@ -1423,7 +1423,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 23;
CURRENT_PROJECT_VERSION = 24;
ENABLE_BITCODE = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64 ";
Expand Down Expand Up @@ -1469,7 +1469,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
CURRENT_PROJECT_VERSION = 23;
CURRENT_PROJECT_VERSION = 24;
ENABLE_BITCODE = NO;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand Down
6 changes: 2 additions & 4 deletions src/api/vendors.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import fetch from 'node-fetch'
import Config from 'react-native-config'
import config from 'src/geth/networkConfig'

export const fetchAllVendors = async (): Promise<any> =>
await fetch(`${Config.KOLEKTIVO_CMS_URL}/api/vendors?populate=*`).then((response) =>
response.json()
)
await fetch(`${config.vendorServiceUrl}/vendors?populate=*`).then((response) => response.json())
1 change: 1 addition & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export const SENTRY_ENABLED = stringToBoolean(Config.SENTRY_ENABLED || 'false')
export const SUPERCHARGE_AVAILABLE_REWARDS_URL = Config.SUPERCHARGE_AVAILABLE_REWARDS_URL

// SECRETS
export const FIREBASE_DB_URL = keyOrUndefined(secretsFile, DEFAULT_TESTNET, 'FIREBASE_DB_URL')
export const SEGMENT_API_KEY = keyOrUndefined(secretsFile, DEFAULT_TESTNET, 'SEGMENT_API_KEY')
export const SENTRY_CLIENT_URL = keyOrUndefined(secretsFile, DEFAULT_TESTNET, 'SENTRY_CLIENT_URL')
export const RECAPTCHA_SITE_KEY = keyOrUndefined(secretsFile, DEFAULT_TESTNET, 'RECAPTCHA_SITE_KEY')
Expand Down
9 changes: 9 additions & 0 deletions src/geth/networkConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
BIDALI_URL,
DEFAULT_SYNC_MODE,
DEFAULT_TESTNET,
FIREBASE_DB_URL,
FORNO_ENABLED_INITIALLY,
GETH_USE_FULL_NODE_DISCOVERY,
GETH_USE_STATIC_NODES,
Expand Down Expand Up @@ -46,8 +47,12 @@ interface NetworkConfig {
inHouseLiquidityURL: string
setRegistrationPropertiesUrl: string
fetchExchangesUrl: string
vendorServiceUrl: string
firebaseDbUrl: string
}

const VENDOR_CMS_TESTNET = 'https://api.kolektivo.cw/api'
const VENDOR_CMS_MAINNET = 'https://vendors-production-dot-kolektivo-backend.uc.r.appspot.com/api'
const BLOCKCHAIN_API_TESTNET = 'https://alfajores-dot-kolektivo-backend.uc.r.appspot.com'
const BLOCKCHAIN_API_MAINNET = 'https://kolektivo-backend.uc.r.appspot.com'
const KOMENCI_URL_MAINNET = 'https://mainnet-komenci.azurefd.net'
Expand Down Expand Up @@ -123,6 +128,8 @@ const networkConfigs: { [testnet: string]: NetworkConfig } = {
inHouseLiquidityURL: 'https://liquidity-dot-celo-mobile-alfajores.appspot.com',
setRegistrationPropertiesUrl: SET_REGISTRATION_PROPERTIES_ALFAJORES,
fetchExchangesUrl: FETCH_EXCHANGES_URL_ALFAJORES,
vendorServiceUrl: VENDOR_CMS_TESTNET,
firebaseDbUrl: FIREBASE_DB_URL,
},
[Testnets.mainnet]: {
networkId: '42220',
Expand Down Expand Up @@ -152,6 +159,8 @@ const networkConfigs: { [testnet: string]: NetworkConfig } = {
inHouseLiquidityURL: 'https://liquidity-dot-celo-mobile-mainnet.appspot.com',
setRegistrationPropertiesUrl: SET_REGISTRATION_PROPERTIES_MAINNET,
fetchExchangesUrl: FETCH_EXCHANGES_URL_MAINNET,
vendorServiceUrl: VENDOR_CMS_MAINNET,
firebaseDbUrl: FIREBASE_DB_URL,
},
}

Expand Down
2 changes: 1 addition & 1 deletion src/icons/VendorMarker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ function VendorMarker({ color = colors.onboardingBlue, size = 32, ...props }: Pr
)
}

export default React.memo(VendorMarker)
export default VendorMarker
14 changes: 8 additions & 6 deletions src/map/MapScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useRef } from 'react'
import React, { useEffect, useRef } from 'react'
import { Platform, StyleSheet } from 'react-native'
import MapView from 'react-native-maps'
import Animated from 'react-native-reanimated'
Expand All @@ -21,11 +21,13 @@ const MapScreen = () => {
const mapViewRef = useRef<MapView>(null)
const { currentVendor, location } = useCurrentVendorLocation()

location &&
mapViewRef.current?.animateToRegion({
...location,
...LOCALE_OFFSET,
})
useEffect(() => {
location &&
mapViewRef.current?.animateToRegion({
...location,
...LOCALE_OFFSET,
})
}, [location])

const vendorLocationMarkers = () => (
<>
Expand Down
7 changes: 0 additions & 7 deletions src/services/Services.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { Dapp } from 'src/app/types'
import MobileTopUp from 'src/icons/MobileTopUp'
import Swap from 'src/icons/Swap'
import Vendors from 'src/icons/Vendors'
import { Screens } from 'src/navigator/Screens'

const Dapps: Dapp[] = [
{
Expand Down Expand Up @@ -31,11 +29,6 @@ export const CoreServices = [
icon: Swap,
dapp: Dapps[0],
},
{
title: 'servicesList.vendors',
icon: Vendors,
screen: Screens.VendorsScreen,
},
{
title: 'servicesList.mobileTopUp',
icon: MobileTopUp,
Expand Down
4 changes: 2 additions & 2 deletions src/vendors/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ export const useInteractiveBottomSheet = (bottomSheetRef: React.RefObject<Bottom

const handleVendorChange = () => {
if (currentVendor) {
bottomSheetRef.current?.snapToIndex(3)
} else {
bottomSheetRef.current?.snapToIndex(2)
} else {
bottomSheetRef.current?.snapToIndex(0)
}
}
return snapPoints
Expand Down

0 comments on commit 85dfa88

Please sign in to comment.