Skip to content

Commit 33b896a

Browse files
committed
feat: Add OS and app version details to core context
Pass appVersion, osType, and osVersion to EdgeContextOptions for use with the v2/coreRollup endpoint.
1 parent 58e59fe commit 33b896a

5 files changed

Lines changed: 18 additions & 52 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Unreleased (develop)
44

5+
- added: Pass OS and app version details to core context for v2/coreRollup endpoint
56
- changed: Append chain names to token codes in RampCreateScene
67

78
## 4.42.0 (staging)

eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ export default [
325325
'src/components/services/ContactsLoader.ts',
326326
'src/components/services/DeepLinkingManager.tsx',
327327
'src/components/services/EdgeContextCallbackManager.tsx',
328-
'src/components/services/EdgeCoreManager.tsx',
328+
329329
'src/components/services/FioService.ts',
330330
'src/components/services/LoanManagerService.ts',
331331
'src/components/services/NetworkActivity.ts',

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
"deprecated-react-native-prop-types": "^5.0.0",
106106
"detect-bundler": "^1.1.0",
107107
"disklet": "^0.5.2",
108-
"edge-core-js": "^2.38.2",
108+
"edge-core-js": "../edge-core-js",
109109
"edge-currency-accountbased": "^4.68.0",
110110
"edge-currency-monero": "^2.0.1",
111111
"edge-currency-plugins": "^3.8.10",

src/components/services/EdgeCoreManager.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ import {
2828
pluginUri as exchangeUri
2929
} from 'edge-exchange-plugins'
3030
import * as React from 'react'
31+
import { Platform } from 'react-native'
3132
import BootSplash from 'react-native-bootsplash'
32-
import { getBrand, getDeviceId } from 'react-native-device-info'
33+
import { getBrand, getDeviceId, getVersion } from 'react-native-device-info'
3334

3435
import { ENV } from '../../env'
3536
import { useAsyncEffect } from '../../hooks/useAsyncEffect'
@@ -40,6 +41,7 @@ import { addMetadataToContext } from '../../util/addMetadataToContext'
4041
import { allPlugins } from '../../util/corePlugins'
4142
import { fakeUser } from '../../util/fake-user'
4243
import { isMaestro } from '../../util/maestro'
44+
import { getOsVersion } from '../../util/utils'
4345
import { ButtonsModal } from '../modals/ButtonsModal'
4446
import { LoadingSplashScreen } from '../progress-indicators/LoadingSplashScreen'
4547
import { Airship, showError } from './AirshipInstance'
@@ -55,7 +57,10 @@ const contextOptions: EdgeContextOptions = {
5557
apiKey: ENV.EDGE_API_KEY,
5658
apiSecret: ENV.EDGE_API_SECRET,
5759
appId: '',
60+
appVersion: getVersion(),
5861
deviceDescription: `${getBrand()} ${getDeviceId()}`,
62+
osType: Platform.OS,
63+
osVersion: getOsVersion(),
5964

6065
// Use this to adjust logging verbosity on a plugin-by-plugin basis:
6166
logSettings: {
@@ -123,7 +128,7 @@ const crashReporter: EdgeCrashReporter = {
123128
* Mounts the edge-core-js WebView, and then mounts the rest of the app
124129
* once the core context is ready.
125130
*/
126-
export function EdgeCoreManager(props: Props) {
131+
export const EdgeCoreManager: React.FC<Props> = props => {
127132
const [context, setContext] = React.useState<EdgeContext | null>(null)
128133

129134
// Scratchpad values that should not trigger re-renders:
@@ -145,10 +150,10 @@ export function EdgeCoreManager(props: Props) {
145150
'EdgeCoreManager'
146151
)
147152

148-
function hideSplash() {
153+
function hideSplash(): void {
149154
if (!splashHidden.current) {
150155
setTimeout(() => {
151-
BootSplash.hide({ fade: true }).catch(err => {
156+
BootSplash.hide({ fade: true }).catch((err: unknown) => {
152157
showError(err)
153158
})
154159
}, 200)

yarn.lock

Lines changed: 6 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,20 +1063,7 @@
10631063
"@babel/parser" "^7.27.2"
10641064
"@babel/types" "^7.27.1"
10651065

1066-
"@babel/traverse--for-generate-function-map@npm:@babel/traverse@^7.25.3":
1067-
version "7.28.0"
1068-
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.28.0.tgz#518aa113359b062042379e333db18380b537e34b"
1069-
integrity sha512-mGe7UK5wWyh0bKRfupsUchrQGqvDbZDbKJw+kcRGSmdHVYrv+ltd0pnpDTVpiTqnaBru9iEvA8pz8W46v0Amwg==
1070-
dependencies:
1071-
"@babel/code-frame" "^7.27.1"
1072-
"@babel/generator" "^7.28.0"
1073-
"@babel/helper-globals" "^7.28.0"
1074-
"@babel/parser" "^7.28.0"
1075-
"@babel/template" "^7.27.2"
1076-
"@babel/types" "^7.28.0"
1077-
debug "^4.3.1"
1078-
1079-
"@babel/traverse@^7.25.3", "@babel/traverse@^7.27.1", "@babel/traverse@^7.27.3", "@babel/traverse@^7.28.0", "@babel/traverse@^7.7.0":
1066+
"@babel/traverse--for-generate-function-map@npm:@babel/traverse@^7.25.3", "@babel/traverse@^7.25.3", "@babel/traverse@^7.27.1", "@babel/traverse@^7.27.3", "@babel/traverse@^7.28.0", "@babel/traverse@^7.7.0":
10801067
version "7.28.0"
10811068
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.28.0.tgz#518aa113359b062042379e333db18380b537e34b"
10821069
integrity sha512-mGe7UK5wWyh0bKRfupsUchrQGqvDbZDbKJw+kcRGSmdHVYrv+ltd0pnpDTVpiTqnaBru9iEvA8pz8W46v0Amwg==
@@ -9539,10 +9526,8 @@ ed25519@0.0.4:
95399526
bindings "^1.2.1"
95409527
nan "^2.0.9"
95419528

9542-
edge-core-js@^2.38.2:
9543-
version "2.38.2"
9544-
resolved "https://registry.yarnpkg.com/edge-core-js/-/edge-core-js-2.38.2.tgz#724835000ec76eb1ae0ea27263ea22eea170d7c4"
9545-
integrity sha512-N7lZXB58HcOLZD0gaSFwWbchFkrgO9DEv3/kWTEBAgMfcjND93NjPrKrViNvTdz/NZWMsZrHLXrnwsAO6VvVdQ==
9529+
edge-core-js@../edge-core-js:
9530+
version "2.38.3"
95469531
dependencies:
95479532
aes-js "^3.1.0"
95489533
base-x "^4.0.0"
@@ -17769,16 +17754,7 @@ string-length@^4.0.2:
1776917754
char-regex "^1.0.2"
1777017755
strip-ansi "^6.0.0"
1777117756

17772-
"string-width-cjs@npm:string-width@^4.2.0":
17773-
version "4.2.3"
17774-
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
17775-
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
17776-
dependencies:
17777-
emoji-regex "^8.0.0"
17778-
is-fullwidth-code-point "^3.0.0"
17779-
strip-ansi "^6.0.1"
17780-
17781-
string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
17757+
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
1778217758
version "4.2.3"
1778317759
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
1778417760
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -17887,7 +17863,7 @@ stringify-object@^3.3.0:
1788717863
is-obj "^1.0.1"
1788817864
is-regexp "^1.0.0"
1788917865

17890-
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
17866+
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
1789117867
version "6.0.1"
1789217868
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
1789317869
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -17901,13 +17877,6 @@ strip-ansi@^5.0.0, strip-ansi@^5.2.0:
1790117877
dependencies:
1790217878
ansi-regex "^4.1.0"
1790317879

17904-
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
17905-
version "6.0.1"
17906-
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
17907-
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
17908-
dependencies:
17909-
ansi-regex "^5.0.1"
17910-
1791117880
strip-ansi@^7.0.0, strip-ansi@^7.0.1:
1791217881
version "7.1.0"
1791317882
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45"
@@ -19626,7 +19595,7 @@ wordwrapjs@^4.0.0:
1962619595
reduce-flatten "^2.0.0"
1962719596
typical "^5.2.0"
1962819597

19629-
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
19598+
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
1963019599
version "7.0.0"
1963119600
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
1963219601
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
@@ -19644,15 +19613,6 @@ wrap-ansi@^6.2.0:
1964419613
string-width "^4.1.0"
1964519614
strip-ansi "^6.0.0"
1964619615

19647-
wrap-ansi@^7.0.0:
19648-
version "7.0.0"
19649-
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
19650-
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
19651-
dependencies:
19652-
ansi-styles "^4.0.0"
19653-
string-width "^4.1.0"
19654-
strip-ansi "^6.0.0"
19655-
1965619616
wrap-ansi@^8.1.0:
1965719617
version "8.1.0"
1965819618
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"

0 commit comments

Comments
 (0)