Skip to content

Commit

Permalink
Merge branch 'staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
peachbits committed Jun 20, 2023
2 parents c6945a2 + 7fc2f90 commit 636cd4b
Show file tree
Hide file tree
Showing 103 changed files with 1,240 additions and 944 deletions.
1 change: 1 addition & 0 deletions .github/workflows/asana-attachment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# removed
1 change: 1 addition & 0 deletions .github/workflows/asana-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# removed
2 changes: 1 addition & 1 deletion .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ jobs:
steps:
- uses: actions/[email protected]
- name: Block WIP PR
uses: samholmes/block-wip-pr-action@v1.1.1
uses: samholmes/block-wip-pr-action@v1.2.0
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# edge-react-gui

## 3.12.0

## 3.11.0

## 3.10.0 (2023-05-25)

- Add Pepe (PEPE)
Expand Down
8 changes: 4 additions & 4 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ PODS:
- disklet (0.5.2):
- React
- DoubleConversion (1.1.6)
- edge-core-js (0.21.4):
- edge-core-js (1.0.1):
- React-Core
- edge-currency-accountbased (1.2.13):
- React-Core
- edge-login-ui-rn (1.4.7):
- edge-login-ui-rn (2.1.0):
- React
- FBLazyVector (0.67.5)
- FBReactNativeSpec (0.67.5):
Expand Down Expand Up @@ -1109,9 +1109,9 @@ SPEC CHECKSUMS:
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
disklet: e7ed3e673ccad9d175a1675f9f3589ffbf69a5fd
DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662
edge-core-js: bd6760a2efcca8610d961d71fe9c34f103add462
edge-core-js: faaac18a528eee7093d722a8d36a71c51512a2a3
edge-currency-accountbased: b5c9b417420254bcc5a92353eeb96bb82d84b24a
edge-login-ui-rn: f6711ffc1cb89e1449290dbceef40d76e67a3a3b
edge-login-ui-rn: 1bb5f0054181b0464970180f51a27f70d2f29e45
FBLazyVector: d2db9d00883282819d03bbd401b2ad4360d47580
FBReactNativeSpec: 94da4d84ba3b1acf459103320882daa481a2b62d
Firebase: 5f8193dff4b5b7c5d5ef72ae54bb76c08e2b841d
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "edge-react-gui",
"version": "3.11.1",
"version": "3.12.0",
"private": true,
"description": "Edge Wallet React GUI",
"homepage": "https://edge.app",
Expand All @@ -22,6 +22,8 @@
],
"scripts": {
"android:clean": "cd android && ./gradlew clean && rm -rf build && cd ../",
"android:dev": "react-native run-android --active-arch-only --variant=debug",
"android:dev:test-release": "react-native run-android --active-arch-only --variant=release",
"android:logcat": "adb logcat *:S ReactNative:V ReactNativeJS:V",
"android:release-clean-install": "npm run android:clean && npm run android:release && adb install -r android/app/build/outputs/apk/release/app-release.apk",
"android:release-install": "npm run android:release && adb install -r android/app/build/outputs/apk/release/app-release.apk",
Expand Down Expand Up @@ -59,7 +61,6 @@
"@ledgerhq/hw-transport-node-hid": "file:./patches/fake-hw-transport-node-hid",
"axios": "0.21.1",
"babel-runtime": "6.26.0",
"base-x": "3.0.4",
"bip39": "3.0.2",
"bn.js": "4.11.8",
"bs58": "4.0.1",
Expand Down Expand Up @@ -117,12 +118,12 @@
"deepmerge": "^4.3.1",
"detect-bundler": "^1.1.0",
"disklet": "^0.5.2",
"edge-core-js": "^0.21.4",
"edge-core-js": "^1.0.1",
"edge-currency-accountbased": "^1.2.13",
"edge-currency-monero": "^1.0.0",
"edge-currency-plugins": "^2.0.2",
"edge-exchange-plugins": "^0.19.5",
"edge-login-ui-rn": "^1.4.7",
"edge-login-ui-rn": "^2.1.0",
"edge-plugin-bity": "https://github.com/EdgeApp/edge-plugin-bity.git#2a52e6cb86512b98f69f8f5dd3105cdf6d0c2d8a",
"edge-plugin-simplex": "https://github.com/EdgeApp/edge-plugin-simplex.git#b11def82d84f2735b91f4b8104a9e0d3e8c3600d",
"edge-plugin-wyre": "https://github.com/EdgeApp/edge-plugin-wyre.git#28c143cd5828d3444bff62adc224839e33eb0bf9",
Expand Down
25 changes: 17 additions & 8 deletions scripts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ interface BuildObj extends BuildConfigFile {
tmpDir: string
buildArchivesDir: string
bundleToolPath: string
productNameClean: string

// Set in makeCommonPost:
buildNum: string
Expand Down Expand Up @@ -99,8 +100,8 @@ function makeCommonPre(argv: string[], buildObj: BuildObj) {
buildObj.repoBranch = argv[4] // master or develop
buildObj.platformType = argv[3] // ios or android
buildObj.projectName = argv[2]
buildObj.guiPlatformDir = buildObj.guiDir + '/' + buildObj.platformType
buildObj.tmpDir = `${buildObj.guiDir}/temp`
buildObj.guiPlatformDir = buildObj.guiDir + buildObj.platformType
buildObj.tmpDir = `${buildObj.guiDir}temp`
buildObj.buildArchivesDir = '/Users/jenkins/buildArchives'
}

Expand Down Expand Up @@ -144,6 +145,7 @@ function makeCommonPost(buildObj: BuildObj) {
buildObj.bundleUrl = 'main.jsbundle'
buildObj.bundleMapFile = '../ios-release.bundle.map'
}
buildObj.productNameClean = buildObj.productName.replace(' ', '')
}

// function buildCommonPre() {
Expand Down Expand Up @@ -220,8 +222,8 @@ function buildIos(buildObj: BuildObj) {

buildObj.dSymFile = escapePath(`${buildDir}/${archiveDir}/dSYMs/${buildObj.productName}.app.dSYM`)
// const appFile = sprintf('%s/%s/Products/Applications/%s.app', buildDir, archiveDir, buildObj.xcodeScheme)
buildObj.dSymZip = escapePath(`${buildObj.tmpDir}/${buildObj.productName}.dSYM.zip`)
buildObj.ipaFile = escapePath(`${buildObj.tmpDir}/${buildObj.productName}.ipa`)
buildObj.dSymZip = escapePath(`${buildObj.tmpDir}/${buildObj.productNameClean}-${buildObj.repoBranch}-${buildObj.buildNum}.dSYM.zip`)
buildObj.ipaFile = escapePath(`${buildObj.tmpDir}/${buildObj.productNameClean}-${buildObj.repoBranch}-${buildObj.buildNum}.ipa`)

if (fs.existsSync(buildObj.ipaFile)) {
call('rm ' + buildObj.ipaFile)
Expand Down Expand Up @@ -251,6 +253,10 @@ function buildIos(buildObj: BuildObj) {
cmdStr = `/usr/bin/zip -r ${buildObj.dSymZip} ${buildObj.dSymFile}`
call(cmdStr)

mylog(`Renaming IPA file to ${buildObj.ipaFile}`)
const buildOutputIpaFile = `${buildObj.tmpDir}/${buildObj.productName}.ipa`
fs.renameSync(buildOutputIpaFile, buildObj.ipaFile)

cmdStr = `cp -a "${buildDir}/${archiveDir}/Products/Applications/${buildObj.productName}.app/main.jsbundle" ${buildObj.guiPlatformDir}/`
call(cmdStr)
}
Expand Down Expand Up @@ -290,19 +296,22 @@ function buildAndroid(buildObj: BuildObj) {
call(sprintf('./gradlew %s', buildObj.androidTask))

// Process the AAB files created into APK format and place in archive directory
const outfile = `${buildObj.productNameClean}-${buildObj.repoBranch}-${buildObj.buildNum}`
const archiveDir = join(buildArchivesDir, repoBranch, platformType, String(buildNum))
fs.mkdirSync(archiveDir, { recursive: true })
const aabPath = join(archiveDir, 'app-release.aab')
const apksPath = join(archiveDir, 'app-release.apks')
const apkPathDir = join(archiveDir, 'apk_container')
const aabPath = join(archiveDir, `${outfile}.aab`)
const apksPath = join(archiveDir, `${outfile}.apks`)
const apkPathDir = join(archiveDir, `${outfile}_apk_container`)
fs.copyFileSync(join(guiPlatformDir, '/app/build/outputs/bundle/release/app-release.aab'), aabPath)

call(
`java -jar ${bundleToolPath} build-apks --overwrite --mode=universal --bundle=${aabPath} --output=${apksPath} --ks=${keyStoreFile} --ks-key-alias=${androidKeyStoreAlias} --ks-pass=pass:${androidKeyStorePassword}`
)
call(`unzip ${apksPath} -d ${apkPathDir}`)

buildObj.ipaFile = join(apkPathDir, 'universal.apk')
const universalApk = join(apkPathDir, 'universal.apk')
buildObj.ipaFile = join(apkPathDir, `${outfile}.apk`)
fs.renameSync(universalApk, buildObj.ipaFile)
}

function buildCommonPost(buildObj: BuildObj) {
Expand Down
22 changes: 0 additions & 22 deletions src/__tests__/__snapshots__/GuiPlugins.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -259,28 +259,6 @@ Limit: $1,000 per card, $10,000 per day
"pluginId": "rewardscard",
"title": "Visa® Card Program",
},
Object {
"cryptoCodes": Array [
"BTC",
"ETH",
"LINK",
"DAI",
"LTC",
],
"deepPath": "",
"deepQuery": Object {
"country": "US",
},
"description": "Fee: Varies / Settlement: 10 - 20 minutes
Limit: Varies",
"partnerIconPath": "mktg/bitaccess.png",
"paymentTypeLogoKey": "cash",
"paymentTypes": Array [
"cash",
],
"pluginId": "bitaccess",
"title": "Cash",
},
Object {
"cryptoCodes": Array [
"BTC",
Expand Down
32 changes: 16 additions & 16 deletions src/__tests__/amountQuotePlugin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,57 +26,57 @@ describe('creditCardPlugin', function () {
})
describe('getBestError', function () {
test('overLimit', function () {
const errors: FiatProviderError[] = [new FiatProviderError({ errorType: 'overLimit', errorAmount: 50 })]
const errors: FiatProviderError[] = [new FiatProviderError({ providerId: '', errorType: 'overLimit', errorAmount: 50 })]
const result = getBestError(errors, 'USD')
expect(result).toBe(sprintf(lstrings.fiat_plugin_buy_amount_over_limit, '50 USD'))
})
test('underLimit', function () {
const errors: FiatProviderError[] = [new FiatProviderError({ errorType: 'underLimit', errorAmount: 50 })]
const errors: FiatProviderError[] = [new FiatProviderError({ providerId: '', errorType: 'underLimit', errorAmount: 50 })]
const result = getBestError(errors, 'USD')
expect(result).toBe(sprintf(lstrings.fiat_plugin_buy_amount_under_limit, '50 USD'))
})
test('regionRestricted', function () {
const errors: FiatProviderError[] = [new FiatProviderError({ errorType: 'regionRestricted', displayCurrencyCode: FAKE_CODE })]
const errors: FiatProviderError[] = [new FiatProviderError({ providerId: '', errorType: 'regionRestricted', displayCurrencyCode: FAKE_CODE })]
const result = getBestError(errors, 'USD')
expect(result).toBe(sprintf(lstrings.fiat_plugin_buy_region_restricted, FAKE_CODE))
})
test('assetUnsupported', function () {
const errors: FiatProviderError[] = [new FiatProviderError({ errorType: 'assetUnsupported' })]
const errors: FiatProviderError[] = [new FiatProviderError({ providerId: '', errorType: 'assetUnsupported' })]
const result = getBestError(errors, 'USD')
expect(result).toBe(lstrings.fiat_plugin_asset_unsupported)
})
test('underLimit 1 2 3', function () {
const errors: FiatProviderError[] = [
new FiatProviderError({ errorType: 'underLimit', errorAmount: 1 }),
new FiatProviderError({ errorType: 'underLimit', errorAmount: 2 }),
new FiatProviderError({ errorType: 'underLimit', errorAmount: 3 })
new FiatProviderError({ providerId: '', errorType: 'underLimit', errorAmount: 1 }),
new FiatProviderError({ providerId: '', errorType: 'underLimit', errorAmount: 2 }),
new FiatProviderError({ providerId: '', errorType: 'underLimit', errorAmount: 3 })
]
const result = getBestError(errors, 'USD')
expect(result).toBe(sprintf(lstrings.fiat_plugin_buy_amount_under_limit, '1 USD'))
})
test('overLimit 1 2 3', function () {
const errors: FiatProviderError[] = [
new FiatProviderError({ errorType: 'overLimit', errorAmount: 1 }),
new FiatProviderError({ errorType: 'overLimit', errorAmount: 2 }),
new FiatProviderError({ errorType: 'overLimit', errorAmount: 3 })
new FiatProviderError({ providerId: '', errorType: 'overLimit', errorAmount: 1 }),
new FiatProviderError({ providerId: '', errorType: 'overLimit', errorAmount: 2 }),
new FiatProviderError({ providerId: '', errorType: 'overLimit', errorAmount: 3 })
]
const result = getBestError(errors, 'USD')
expect(result).toBe(sprintf(lstrings.fiat_plugin_buy_amount_over_limit, '3 USD'))
})
test('overLimit underLimit regionRestricted assetUnsupported', function () {
const errors: FiatProviderError[] = [
new FiatProviderError({ errorType: 'overLimit', errorAmount: 1 }),
new FiatProviderError({ errorType: 'underLimit', errorAmount: 2 }),
new FiatProviderError({ errorType: 'regionRestricted', displayCurrencyCode: FAKE_CODE }),
new FiatProviderError({ errorType: 'assetUnsupported' })
new FiatProviderError({ providerId: '', errorType: 'overLimit', errorAmount: 1 }),
new FiatProviderError({ providerId: '', errorType: 'underLimit', errorAmount: 2 }),
new FiatProviderError({ providerId: '', errorType: 'regionRestricted', displayCurrencyCode: FAKE_CODE }),
new FiatProviderError({ providerId: '', errorType: 'assetUnsupported' })
]
const result = getBestError(errors, 'USD')
expect(result).toBe(sprintf(lstrings.fiat_plugin_buy_amount_under_limit, '2 USD'))
})
test('regionRestricted assetUnsupported', function () {
const errors: FiatProviderError[] = [
new FiatProviderError({ errorType: 'regionRestricted', displayCurrencyCode: FAKE_CODE }),
new FiatProviderError({ errorType: 'assetUnsupported' })
new FiatProviderError({ providerId: '', errorType: 'regionRestricted', displayCurrencyCode: FAKE_CODE }),
new FiatProviderError({ providerId: '', errorType: 'assetUnsupported' })
]
const result = getBestError(errors, 'USD')
expect(result).toBe(sprintf(lstrings.fiat_plugin_buy_region_restricted, FAKE_CODE))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ exports[`PromoCard should render 1`] = `
}
>
<Text
accessibilityHint="Close"
allowFontScaling={false}
style={
Array [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,7 @@ Array [
}
>
<Text
accessibilityHint="Wallet settings"
allowFontScaling={false}
style={
Array [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,6 @@ Array [
<View>
<View>
<View
accessibilityHint="Close Modal"
accessible={true}
collapsable={false}
focusable={true}
Expand All @@ -373,6 +372,7 @@ Array [
}
>
<Text
accessibilityHint="Close modal"
allowFontScaling={false}
style={
Array [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,6 @@ exports[`AutoLogoutModal should render with loading props 1`] = `
"fontFaceDefault": "Quicksand-Regular",
"fontFaceMedium": "Quicksand-Medium",
"fontFaceSymbols": "Quicksand-Regular",
"guiPluginLogoBitaccess": Object {
"testUri": "../../../src/assets/images/guiPlugins/guiPluginLogoBitaccessDark.png",
},
"guiPluginLogoMoonpay": Object {
"testUri": "../../../src/assets/images/guiPlugins/guiPluginLogoMoonpayDark.png",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,6 @@ Array [
}
>
<View
accessibilityHint="Close Modal"
accessible={true}
collapsable={false}
focusable={true}
Expand All @@ -625,6 +624,7 @@ Array [
}
>
<Text
accessibilityHint="Close modal"
allowFontScaling={false}
style={
Array [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ exports[`CreateWalletImportScene should render with loading props 1`] = `
}
>
<ImportKeySvg
accessibilityHint="Import Key"
color="#00f1a2"
height={36}
width={83}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ exports[`CurrencySettings should render 1`] = `
</Text>
<Text
accessibilityHint="On undefined"
accessibilityRole="radio"
allowFontScaling={false}
style={
Array [
Expand Down Expand Up @@ -241,6 +243,8 @@ exports[`CurrencySettings should render 1`] = `
</Text>
<Text
accessibilityHint="Off undefined"
accessibilityRole="radio"
allowFontScaling={false}
style={
Array [
Expand Down Expand Up @@ -325,6 +329,8 @@ exports[`CurrencySettings should render 1`] = `
</Text>
<Text
accessibilityHint="Off undefined"
accessibilityRole="radio"
allowFontScaling={false}
style={
Array [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ exports[`EdgeLoginScene should render with loading props 1`] = `
}
>
<ActivityIndicator
accessibilityHint="Loading"
color="#00f1a2"
size="large"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,6 @@ exports[`FioAddressList should render with loading props 1`] = `
"fontFaceDefault": "Quicksand-Regular",
"fontFaceMedium": "Quicksand-Medium",
"fontFaceSymbols": "Quicksand-Regular",
"guiPluginLogoBitaccess": Object {
"testUri": "../../../src/assets/images/guiPlugins/guiPluginLogoBitaccessDark.png",
},
"guiPluginLogoMoonpay": Object {
"testUri": "../../../src/assets/images/guiPlugins/guiPluginLogoMoonpayDark.png",
},
Expand Down Expand Up @@ -592,9 +589,6 @@ exports[`FioAddressList should render with loading props 1`] = `
"fontFaceDefault": "Quicksand-Regular",
"fontFaceMedium": "Quicksand-Medium",
"fontFaceSymbols": "Quicksand-Regular",
"guiPluginLogoBitaccess": Object {
"testUri": "../../../src/assets/images/guiPlugins/guiPluginLogoBitaccessDark.png",
},
"guiPluginLogoMoonpay": Object {
"testUri": "../../../src/assets/images/guiPlugins/guiPluginLogoMoonpayDark.png",
},
Expand Down
Loading

0 comments on commit 636cd4b

Please sign in to comment.