Skip to content

Commit

Permalink
Merge branch 'staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
peachbits committed Aug 19, 2024
2 parents fc7912f + c7b3d5d commit 949c2e3
Show file tree
Hide file tree
Showing 67 changed files with 1,279 additions and 1,058 deletions.
23 changes: 20 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,24 @@

## Unreleased

## 4.10.0
- added: App distribution via Zealot

## 4.11.0

- added: Allow for Maestro specific iOS and Android builds
- added: Handle KYC error responses from Bity
- added: Kado buy via wire transfer
- changed: Use partners API to determine US state support for Mooopay, Simplex, and Banxa
- changed: Conditionalize use of Paybis promoCodes for new users <$1k purchases
- changed: Cache exchange rates for five minutes to account for server or connection instability
- changed: Query supported countries and US states for fiat plugins
- changed: Enable Bitpay payments for FIO names and domains
- fixed: Disable max spend for zkSync
- fixed: Do not show duplicate password-recovery modals when launching a freshly-installed app for the first time.
- fixed: Fix broken Bity message signing
- fixed: If handling a deep link requires a signed-in account, correctly save it for later.

## 4.10.0 (2024-08-07)

- added: Network names to wallet list cards
- added: 0x Gasless Swap exchange plugin
Expand All @@ -13,7 +30,7 @@
- changed: Replace native `Alert` with `showToast` and `ButtonsModal`
- changed: Show common chain icon as primary for L2 chains
- changed: Use new `FioService` to manage expired domains and `fioWallets` redux value
- change: Update generic stake plugins to use info server rollup for APY values
- changed: Update generic stake plugins to use info server rollup for APY values
- changed: Ui4 components renamed and reorganized
- changed: SendScene "Fee:" renamed to "Network Fee:"
- changed: Style of "Already have an account? Sign in" tappable text
Expand All @@ -27,7 +44,7 @@
- fixed: Buying non-BTC assets with Bity
- fixed: Misc styling fixes on SepaFormScene and AddressFormScene
- fixed: Pressing back during native fiat buy/sell flows results in stuck button spinners
- fixed: Broken Android paste into `TextInputModal` in "ScanQR" -> "Enter"
- fixed: Broken Android paste into `TextInputModal` in "ScanQR" -> "Enter"
- fixed: Promo cards not visible until scroll for new accounts

## 4.9.2 (2024-07-22)
Expand Down
33 changes: 24 additions & 9 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,17 @@ def buildProduction(String stageName) {
}
}

def buildSim(String stageName) {
stage("Build Sim ${stageName}") {
def buildMaestro(String stageName) {
stage("Build Maestro ${stageName}") {
if (env.BRANCH_NAME in ['develop', 'staging', 'master', 'beta', 'testMaestro']) {
if (stageName == 'ios' && params.IOS_BUILD_SIM) {
if (stageName == 'ios' && params.IOS_BUILD_MAESTRO) {
echo "Running on ${env.NODE_NAME}"
sh 'npm run prepare.ios'
sh "node -r sucrase/register ./scripts/deploy.ts edge ios-sim ${BRANCH_NAME}"
sh "node -r sucrase/register ./scripts/deploy.ts edge ios ${BRANCH_NAME} maestro"
}
if (stageName == 'android' && params.ANDROID_BUILD_MAESTRO) {
echo "Running on ${env.NODE_NAME}"
sh "node -r sucrase/register ./scripts/deploy.ts edge android ${BRANCH_NAME} maestro"
}
}
}
Expand All @@ -80,8 +84,9 @@ pipeline {
}
parameters {
booleanParam(name: 'ANDROID_BUILD', defaultValue: true, description: 'Build an Android version')
booleanParam(name: 'ANDROID_BUILD_MAESTRO', defaultValue: true, description: 'Build an Android Maestro version')
booleanParam(name: 'IOS_BUILD', defaultValue: true, description: 'Build an iOS version')
booleanParam(name: 'IOS_BUILD_SIM', defaultValue: true, description: 'Build an iOS simulator version')
booleanParam(name: 'IOS_BUILD_MAESTRO', defaultValue: true, description: 'Build an iOS simulator Maestro version')
booleanParam(name: 'VERBOSE', defaultValue: false, description: 'Complete build log output')
}
environment {
Expand Down Expand Up @@ -126,13 +131,13 @@ pipeline {
}
}
}
stage('IOS Simulator Build') {
stage('IOS Maestro Build') {
agent { label 'ios-build-sim' }
steps {
script {
preBuildStages('IOS Simulator', global.versionFile)
preTest('IOS Simulator')
buildSim('ios')
preBuildStages('IOS Maestro', global.versionFile)
preTest('IOS Maestro')
buildMaestro('ios')
}
}
}
Expand All @@ -146,6 +151,16 @@ pipeline {
}
}
}
stage('Android Maestro Build') {
agent { label 'android-build' }
steps {
script {
preBuildStages('Android', global.versionFile)
preTest('Android')
buildMaestro('android')
}
}
}
}
}
}
Expand Down
14 changes: 7 additions & 7 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ PODS:
- disklet (0.5.2):
- React
- DoubleConversion (1.1.6)
- edge-core-js (2.9.1-1):
- edge-core-js (2.11.0):
- React-Core
- edge-currency-accountbased (4.16.1):
- edge-currency-accountbased (4.18.2):
- React-Core
- edge-currency-plugins (3.2.1):
- React-Core
Expand Down Expand Up @@ -430,7 +430,7 @@ PODS:
- react-native-webview (13.8.4):
- RCT-Folly (= 2021.07.22.00)
- React-Core
- react-native-zcash (0.7.5):
- react-native-zcash (0.7.6):
- gRPC-Swift (~> 1.8)
- MnemonicSwift (~> 2.2)
- React-Core
Expand Down Expand Up @@ -1078,9 +1078,9 @@ SPEC CHECKSUMS:
CNIOLinux: 62e3505f50de558c393dc2f273dde71dcce518da
CNIOWindows: 3047f2d8165848a3936a0a755fee27c6b5ee479b
disklet: e7ed3e673ccad9d175a1675f9f3589ffbf69a5fd
DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953
edge-core-js: d202b3688f78d139c4df1c1ee4a5aee35304c42b
edge-currency-accountbased: 53d4cb6aa690cd0d893f29443d3a85a42bd334e6
DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5
edge-core-js: 115291774e243b9ca793ed4dbc597b126ec5bdfe
edge-currency-accountbased: 1d73ca354261e2375db1179ec90376ac1259208e
edge-currency-plugins: cc13fe0d8ed0385a3a9edca832dc2260b756c24b
edge-exchange-plugins: 2f16751c591f400577ce085f23018de39950bace
edge-login-ui-rn: e45ef3a1f5a0f17bc3a0e0c232a1d4467475fb73
Expand Down Expand Up @@ -1140,7 +1140,7 @@ SPEC CHECKSUMS:
react-native-safari-view: 955d7160d159241b8e9395d12d10ea0ef863dcdd
react-native-safe-area-context: dcab599c527c2d7de2d76507a523d20a0b83823d
react-native-webview: fa228e55c53372c2b361d2fa5e415844fa83eabf
react-native-zcash: 81d681fac3974783f66ae6e31a869fd7612e5495
react-native-zcash: bc6af55d97567a8898bf4cc1c5ef484698c44545
React-perflogger: 0cc42978a483a47f3696171dac2e7033936fc82d
React-RCTActionSheet: ea922b476d24f6d40b8e02ac3228412bd3637468
React-RCTAnimation: 7be2c148398eaa5beac950b2b5ec7102389ec3ad
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "edge-react-gui",
"version": "4.10.0",
"version": "4.11.0",
"private": true,
"description": "Edge Wallet React GUI",
"homepage": "https://edge.app",
Expand Down Expand Up @@ -97,12 +97,12 @@
"deepmerge": "^4.3.1",
"detect-bundler": "^1.1.0",
"disklet": "^0.5.2",
"edge-core-js": "^2.9.1-1",
"edge-currency-accountbased": "^4.16.1",
"edge-core-js": "^2.11.0",
"edge-currency-accountbased": "^4.18.2",
"edge-currency-monero": "^1.3.1",
"edge-currency-plugins": "^3.2.1",
"edge-exchange-plugins": "^2.7.4",
"edge-info-server": "^2.4.0",
"edge-info-server": "^2.6.0",
"edge-login-ui-rn": "^3.17.1",
"ethers": "^5.7.2",
"expo": "^48.0.0",
Expand Down Expand Up @@ -141,7 +141,7 @@
"react-native-mymonero-core": "^0.3.1",
"react-native-patina": "^0.1.6",
"react-native-permissions": "^4.1.5",
"react-native-piratechain": "^0.4.15",
"react-native-piratechain": "^0.4.16",
"react-native-reanimated": "^3.14.0",
"react-native-safari-view": "^2.1.0",
"react-native-safe-area-context": "^4.10.1",
Expand All @@ -154,7 +154,7 @@
"react-native-svg": "^15.3.0",
"react-native-vector-icons": "^10.1.0",
"react-native-webview": "^13.8.4",
"react-native-zcash": "^0.7.5",
"react-native-zcash": "^0.7.6",
"react-redux": "^8.1.1",
"redux": "^4.2.1",
"redux-thunk": "^2.3.0",
Expand Down
61 changes: 43 additions & 18 deletions scripts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ interface BuildConfigFile {
bundleId: string

// Upload options:
zealotUrl?: string
zealotApiToken?: string
zealotChannelKey?: string
appCenterApiToken: string
appCenterAppName: string
appCenterDistroGroup: string
Expand All @@ -55,7 +58,7 @@ interface BuildObj extends BuildConfigFile {
guiDir: string
guiPlatformDir: string
platformType: string // 'android' | 'ios'
simBuild: boolean
maestroBuild: boolean
repoBranch: string // 'develop' | 'master' | 'test'
tmpDir: string
buildArchivesDir: string
Expand Down Expand Up @@ -88,10 +91,11 @@ main()

function main() {
if (argv.length < 4) {
mylog('Usage: node -r sucrase/register deploy.ts [project] [platform] [branch]')
mylog('Usage: node -r sucrase/register deploy.ts [project] [platform] [branch] [test build]')
mylog(' project options: edge')
mylog(' platform options: ios, android, ios-sim')
mylog(' platform options: ios, android')
mylog(' branch options: master, develop')
mylog(' test build options (optional): maestro')
}

const buildObj: BuildObj = {} as any
Expand All @@ -102,8 +106,8 @@ function main() {

// buildCommonPre()
if (buildObj.platformType === 'ios') {
if (buildObj.simBuild) {
buildIosSim(buildObj)
if (buildObj.maestroBuild) {
buildIosMaestro(buildObj)
} else {
buildIos(buildObj)
}
Expand All @@ -115,9 +119,9 @@ function main() {

function makeCommonPre(argv: string[], buildObj: BuildObj) {
buildObj.guiDir = _rootProjectDir
buildObj.maestroBuild = argv[5] === 'maestro'
buildObj.repoBranch = argv[4] // master or develop
buildObj.platformType = argv[3] === 'ios-sim' ? 'ios' : argv[3] // ios or android
buildObj.simBuild = argv[3] === 'ios-sim'
buildObj.platformType = argv[3]
buildObj.projectName = argv[2]
buildObj.guiPlatformDir = buildObj.guiDir + buildObj.platformType
buildObj.tmpDir = `${buildObj.guiDir}temp`
Expand All @@ -136,13 +140,20 @@ function makeProject(buildObj: BuildObj) {
}

function makeCommonPost(buildObj: BuildObj) {
const envJsonPath = buildObj.guiDir + '/env.json'
let envJson
if (fs.existsSync(envJsonPath)) {
envJson = JSON.parse(fs.readFileSync(envJsonPath, 'utf8'))
}
if (buildObj.envJson != null) {
const envJsonPath = buildObj.guiDir + '/env.json'
let envJson = {}
if (fs.existsSync(envJsonPath)) {
envJson = JSON.parse(fs.readFileSync(envJsonPath, 'utf8'))
}
if (envJson == null) throw new Error('env.json file is missing')
envJson = { ...envJson, ...buildObj.envJson[buildObj.repoBranch] }
}
if (buildObj.maestroBuild) {
if (envJson == null) throw new Error('env.json file is missing')
envJson = { ...envJson, ENABLE_MAESTRO_BUILD: true }
}
if (envJson != null) {
fs.chmodSync(envJsonPath, 0o600)
fs.writeFileSync(envJsonPath, JSON.stringify(envJson, null, 2))
}
Expand Down Expand Up @@ -292,7 +303,7 @@ function buildIos(buildObj: BuildObj) {
buildObj.testRepoUrl = undefined
}

function buildIosSim(buildObj: BuildObj) {
function buildIosMaestro(buildObj: BuildObj) {
const { buildNum, guiDir, guiHash, guiPlatformDir, productName, productNameClean, repoBranch, tmpDir, xcodeScheme, xcodeWorkspace } = buildObj

chdir(guiDir)
Expand Down Expand Up @@ -334,6 +345,7 @@ function buildAndroid(buildObj: BuildObj) {
platformType,
repoBranch,
guiPlatformDir,
maestroBuild,
bundleToolPath,
androidKeyStore,
androidKeyStoreAlias,
Expand Down Expand Up @@ -361,8 +373,10 @@ function buildAndroid(buildObj: BuildObj) {
call('./gradlew signingReport')
call(sprintf('./gradlew %s', buildObj.androidTask))

const testBuild = maestroBuild ? '-maestro' : ''

// Process the AAB files created into APK format and place in archive directory
const outfile = `${buildObj.productNameClean}-${buildObj.repoBranch}-${buildObj.buildNum}`
const outfile = `${buildObj.productNameClean}-${buildObj.repoBranch}-${buildObj.buildNum}${testBuild}`
const archiveDir = join(buildArchivesDir, repoBranch, platformType, String(buildNum))
fs.mkdirSync(archiveDir, { recursive: true })
const aabPath = join(archiveDir, `${outfile}.aab`)
Expand All @@ -381,11 +395,11 @@ function buildAndroid(buildObj: BuildObj) {
}

function buildCommonPost(buildObj: BuildObj) {
const { simBuild } = buildObj
const { maestroBuild, zealotApiToken, zealotChannelKey, zealotUrl } = buildObj
let curl
const notes = `${buildObj.productName} ${buildObj.version} (${buildObj.buildNum}) branch: ${buildObj.repoBranch} #${buildObj.guiHash}`

if (buildObj.hockeyAppToken && buildObj.hockeyAppId && !simBuild) {
if (buildObj.hockeyAppToken && buildObj.hockeyAppId && !maestroBuild) {
mylog('\n\nUploading to HockeyApp')
mylog('**********************\n')
const url = sprintf('https://rink.hockeyapp.net/api/2/apps/%s/app_versions/upload', buildObj.hockeyAppId)
Expand All @@ -408,7 +422,7 @@ function buildCommonPost(buildObj: BuildObj) {
mylog('\nUploaded to HockeyApp')
}

if (buildObj.appCenterApiToken && buildObj.appCenterAppName && buildObj.appCenterGroupName && !simBuild) {
if (buildObj.appCenterApiToken && buildObj.appCenterAppName && buildObj.appCenterGroupName && !maestroBuild) {
mylog('\n\nUploading to App Center')
mylog('***********************\n')

Expand All @@ -420,6 +434,14 @@ function buildCommonPost(buildObj: BuildObj) {
mylog('\n*** Upload to App Center Complete ***')
}

if (zealotApiToken != null && zealotUrl != null && zealotChannelKey != null && !maestroBuild) {
mylog(`\n\nUploading to Zealot: ${zealotUrl}`)
mylog('***********************************************************************\n')

call(`curl -X POST "${zealotUrl}/api/apps/upload?token=${zealotApiToken}&channel_key=${zealotChannelKey}" -F "file=@${buildObj.ipaFile}"`)
mylog('\n*** Upload to Zealot Complete ***')
}

if (buildObj.rsyncLocation != null) {
const { buildNum, guiHash, platformType, productNameClean, repoBranch, testRepoUrl, version } = buildObj

Expand All @@ -428,7 +450,10 @@ function buildCommonPost(buildObj: BuildObj) {

const datePrefix = new Date().toISOString().slice(2, 19).replace(/:/gi, '').replace(/-/gi, '')
const [fileExtension] = buildObj.ipaFile.split('.').reverse()
const rsyncFile = escapePath(`${datePrefix}--${productNameClean}--${platformType}--${repoBranch}--${buildNum}--${guiHash.slice(0, 8)}.${fileExtension}`)
const testBuild = maestroBuild ? '--maestro' : ''
const rsyncFile = escapePath(
`${datePrefix}--${productNameClean}--${platformType}--${repoBranch}--${buildNum}--${guiHash.slice(0, 8)}${testBuild}.${fileExtension}`
)

const rsyncFilePath = join(buildObj.rsyncLocation, rsyncFile)
call(`rsync -avz -e "ssh -i ${githubSshKey}" ${buildObj.ipaFile} ${rsyncFilePath}`)
Expand Down
18 changes: 17 additions & 1 deletion src/__tests__/__snapshots__/GuiPlugins.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ exports[`Production plugin data Buy plugins match snapshot on iOS + US 1`] = `
"deepPath": "",
"deepQuery": {},
"description": "Fee: ~2%
Settlement: ~5 minutes",
Settlement: ~5 minutes
Limit $1000",
"paymentType": "iach",
"paymentTypeLogoKey": "bank",
"paymentTypes": [
Expand Down Expand Up @@ -208,6 +209,21 @@ Settlement: 10 - 30 minutes",
"pluginId": "creditcard",
"title": "Credit and Debit Card",
},
{
"cryptoCodes": [],
"deepPath": "",
"deepQuery": {},
"description": "Fee: ~2%
Settlement: ~5 minutes
Limit $10000",
"paymentType": "wire",
"paymentTypeLogoKey": "bank",
"paymentTypes": [
"wire",
],
"pluginId": "wire",
"title": "Bank Wire Transfer",
},
{
"cryptoCodes": [
"BTC",
Expand Down
Loading

0 comments on commit 949c2e3

Please sign in to comment.