diff --git a/ios/Podfile.lock b/ios/Podfile.lock index c8a346da720..faa13f73ab7 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -22,6 +22,8 @@ PODS: - React-Core - edge-currency-accountbased (2.8.1): - React-Core + - edge-exchange-plugins (1.0.0): + - React-Core - edge-login-ui-rn (2.14.1): - React - FBLazyVector (0.71.11) @@ -858,6 +860,7 @@ DEPENDENCIES: - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - edge-core-js (from `../node_modules/edge-core-js`) - edge-currency-accountbased (from `../node_modules/edge-currency-accountbased`) + - edge-exchange-plugins (from `../node_modules/edge-exchange-plugins`) - edge-login-ui-rn (from `../node_modules/edge-login-ui-rn`) - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`) @@ -1041,6 +1044,8 @@ EXTERNAL SOURCES: :path: "../node_modules/edge-core-js" edge-currency-accountbased: :path: "../node_modules/edge-currency-accountbased" + edge-exchange-plugins: + :path: "../node_modules/edge-exchange-plugins" edge-login-ui-rn: :path: "../node_modules/edge-login-ui-rn" FBLazyVector: @@ -1220,6 +1225,7 @@ SPEC CHECKSUMS: DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 edge-core-js: 48b390da31ef71c2ac09330ade6a187dc92b3edc edge-currency-accountbased: 72ecd349cc34652c0b401182aae89432a9b56f55 + edge-exchange-plugins: c1021e5658c0633da4272082be2a6b09657d5f61 edge-login-ui-rn: 7ecda4499b7cfba19b4f87775f7980d88a1b2d7a FBLazyVector: c511d4cd0210f416cb5c289bd5ae6b36d909b048 FBReactNativeSpec: a911fb22def57aef1d74215e8b6b8761d25c1c54 diff --git a/package.json b/package.json index dbd16ee4f3c..53f76c2604b 100644 --- a/package.json +++ b/package.json @@ -142,7 +142,7 @@ "edge-currency-accountbased": "^2.8.1", "edge-currency-monero": "^1.1.1", "edge-currency-plugins": "^2.4.0", - "edge-exchange-plugins": "^0.22.0", + "edge-exchange-plugins": "^1.0.0", "edge-info-server": "^1.0.2", "edge-login-ui-rn": "^2.14.1", "ethers": "^5.6.0", diff --git a/scripts/hack-travis.mjs b/scripts/hack-travis.mjs index adca0a5a3fb..3aa21273ced 100644 --- a/scripts/hack-travis.mjs +++ b/scripts/hack-travis.mjs @@ -13,8 +13,18 @@ editFile('package.json', text => .replace(/"eosjs-api".*/, '') ) +fs.writeFileSync( + 'src/edge-currency-accountbased.d.ts', + `declare module 'edge-currency-accountbased' { + export function makePluginIo(): any + export const debugUri: string + export const pluginUri: string +} +`, + 'utf8' +) + editFile('scripts/prepare.sh', text => text // - .replace(/cp -r node_modules\/edge-currency-accountbased.*/g, '') .replace(/node .\/node_modules\/.bin\/webpack/, '') ) diff --git a/src/components/services/EdgeCoreManager.tsx b/src/components/services/EdgeCoreManager.tsx index 219fe1e7551..cc853464f03 100644 --- a/src/components/services/EdgeCoreManager.tsx +++ b/src/components/services/EdgeCoreManager.tsx @@ -3,6 +3,7 @@ import detectBundler from 'detect-bundler' import { EdgeContext, EdgeContextOptions, EdgeCrashReporter, EdgeFakeWorld, EdgeNativeIo, MakeEdgeContext, MakeFakeEdgeWorld } from 'edge-core-js' import { debugUri as accountbasedDebugUri, makePluginIo as makeAccountbasedIo, pluginUri as accountbasedUri } from 'edge-currency-accountbased' import makeMoneroIo from 'edge-currency-monero/lib/react-native-io' +import { debugUri as exchangeDebugUri, pluginUri as exchangeUri } from 'edge-exchange-plugins' import * as React from 'react' import { Alert } from 'react-native' import RNBootSplash from 'react-native-bootsplash' @@ -113,6 +114,7 @@ export function EdgeCoreManager(props: Props) { const pluginUris = [ ENV.DEBUG_ACCOUNTBASED ? accountbasedDebugUri : accountbasedUri, + ENV.DEBUG_EXCHANGES ? exchangeDebugUri : exchangeUri, ENV.DEBUG_PLUGINS ? 'http://localhost:8101/plugin-bundle.js' : 'edge-core/plugin-bundle.js' ] diff --git a/src/declare-modules.d.ts b/src/declare-modules.d.ts index bb0a6a386aa..6fd1ecc0091 100644 --- a/src/declare-modules.d.ts +++ b/src/declare-modules.d.ts @@ -30,15 +30,6 @@ declare module 'csv-stringify/lib/browser/sync' { export default function stringify(input: any[], options?: any): string } -declare module 'edge-currency-accountbased' { - import { EdgeOtherMethods } from 'edge-core-js' - - export function makePluginIo(): EdgeOtherMethods - - export const debugUri: string - export const pluginUri: string -} - declare module 'edge-currency-monero/lib/react-native-io' declare module 'react-native-smart-splash-screen' declare module 'rn-id-blurview' diff --git a/src/envConfig.ts b/src/envConfig.ts index b44f3167a4e..a009b1398d5 100644 --- a/src/envConfig.ts +++ b/src/envConfig.ts @@ -215,6 +215,7 @@ export const asEnvConfig = asObject({ DEBUG_CORE: asOptional(asBoolean, false), DEBUG_PLUGINS: asOptional(asBoolean, false), DEBUG_ACCOUNTBASED: asOptional(asBoolean, false), + DEBUG_EXCHANGES: asOptional(asBoolean, false), DEBUG_VERBOSE_ERRORS: asOptional(asBoolean, false), DEBUG_THEME: asOptional(asBoolean, false), ENABLE_TEST_SERVERS: asOptional(asBoolean), diff --git a/src/util/corePluginBundle.js b/src/util/corePluginBundle.js index a445b109c6d..f3e9e350c10 100644 --- a/src/util/corePluginBundle.js +++ b/src/util/corePluginBundle.js @@ -2,7 +2,6 @@ import 'core-js' import 'edge-currency-monero' -import 'edge-exchange-plugins' import { setMemletConfig } from 'edge-currency-plugins' diff --git a/yarn.lock b/yarn.lock index 332a149b9e6..9df5b49a751 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1464,7 +1464,7 @@ "@ethersproject/logger" "^5.7.0" "@ethersproject/properties" "^5.7.0" -"@ethersproject/address@5.7.0", "@ethersproject/address@^5.5.0", "@ethersproject/address@^5.7.0": +"@ethersproject/address@5.7.0", "@ethersproject/address@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.7.0.tgz#19b56c4d74a3b0a46bfdbb6cfcc0a153fc697f37" integrity sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA== @@ -1513,7 +1513,7 @@ dependencies: "@ethersproject/bignumber" "^5.7.0" -"@ethersproject/contracts@5.7.0", "@ethersproject/contracts@^5.5.0": +"@ethersproject/contracts@5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.7.0.tgz#c305e775abd07e48aa590e1a877ed5c316f8bd1e" integrity sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg== @@ -1616,7 +1616,7 @@ dependencies: "@ethersproject/logger" "^5.7.0" -"@ethersproject/providers@5.7.2", "@ethersproject/providers@^5.5.3": +"@ethersproject/providers@5.7.2": version "5.7.2" resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.2.tgz#f8b1a4f275d7ce58cf0a2eec222269a08beb18cb" integrity sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg== @@ -1684,7 +1684,7 @@ elliptic "6.5.4" hash.js "1.1.7" -"@ethersproject/solidity@5.7.0", "@ethersproject/solidity@^5.5.0": +"@ethersproject/solidity@5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.7.0.tgz#5e9c911d8a2acce2a5ebb48a5e2e0af20b631cb8" integrity sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA== @@ -1838,9 +1838,9 @@ randombytes "^2.1.0" text-encoding "0.7.0" -"@fioprotocol/fiosdk@git+https://github.com/peachbits/fiosdk_typescript.git#d04449fff9f9b8c1487359a5b6bf64b7b53d0b6b": +"@fioprotocol/fiosdk@https://github.com/peachbits/fiosdk_typescript.git#d04449fff9f9b8c1487359a5b6bf64b7b53d0b6b": version "1.8.0" - resolved "git+https://github.com/peachbits/fiosdk_typescript.git#d04449fff9f9b8c1487359a5b6bf64b7b53d0b6b" + resolved "https://github.com/peachbits/fiosdk_typescript.git#d04449fff9f9b8c1487359a5b6bf64b7b53d0b6b" dependencies: "@fioprotocol/fiojs" "1.0.1" "@types/text-encoding" "0.0.35" @@ -7756,22 +7756,15 @@ edge-currency-plugins@^2.4.0: wifgrs "^2.0.6" ws "^7.4.6" -edge-exchange-plugins@^0.22.0: - version "0.22.0" - resolved "https://registry.yarnpkg.com/edge-exchange-plugins/-/edge-exchange-plugins-0.22.0.tgz#a6d7c5ea353d50518b695d41e92435504bd0fe44" - integrity sha512-LFprM9Uhr6VvHk7VZD2yEI4tD1brWuOzfbMDpuTnRV+/+eZvZtOSY/zNhs5lQ4i56wRyueCyXCYVsYmow/uhiQ== +edge-exchange-plugins@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/edge-exchange-plugins/-/edge-exchange-plugins-1.0.0.tgz#ebf1c68e735f6cde7f0146d64e3d06566614fa74" + integrity sha512-Wnn4Tl2s6AYxz4jipvQ8PUHuU7PYa2vMfYSp8TlHbxZ6ic2T5vKzpG3BBq2meqtyOifHzQjibkUTBu1qpi7d7Q== dependencies: - "@ethersproject/address" "^5.5.0" - "@ethersproject/contracts" "^5.5.0" - "@ethersproject/providers" "^5.5.3" - "@ethersproject/solidity" "^5.5.0" biggystring "^4.1.3" cleaners "^0.3.13" - esm "^3.2.4" ethers "^5.7.0" - hashjs "^1.2.0" - iso4217 "^0.2.0" - utf8 "^3.0.0" + regenerator-runtime "0.13.11" xrpl "^2.10.0" edge-info-server@^1.0.2: @@ -8456,11 +8449,6 @@ eslint@^8.19.0: strip-json-comments "^3.1.0" text-table "^0.2.0" -esm@^3.2.4: - version "3.2.4" - resolved "https://registry.yarnpkg.com/esm/-/esm-3.2.4.tgz#0b728b5d6043061bf552197407bf2c630717812b" - integrity sha512-wOuWtQCkkwD1WKQN/k3RsyGSSN+AmiUzdKftn8vaC+uV9JesYmQlODJxgXaaRz0LaaFIlUxZaUu5NPiUAjKAAA== - espree@^9.5.2: version "9.5.2" resolved "https://registry.yarnpkg.com/espree/-/espree-9.5.2.tgz#e994e7dc33a082a7a82dceaf12883a829353215b" @@ -8921,9 +8909,9 @@ eyes@^0.1.8: resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0" integrity sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ== -"eztz.js@git+https://github.com/EdgeApp/eztz.git#edge-fixes": +"eztz.js@https://github.com/EdgeApp/eztz.git#edge-fixes": version "0.0.1" - resolved "git+https://github.com/EdgeApp/eztz.git#eefa603586810c3d62f852e7f28cfe57c523b7db" + resolved "https://github.com/EdgeApp/eztz.git#eefa603586810c3d62f852e7f28cfe57c523b7db" dependencies: bignumber.js "^7.2.1" bip39 "^3.0.2" @@ -9805,11 +9793,6 @@ hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: inherits "^2.0.3" minimalistic-assert "^1.0.1" -hashjs@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/hashjs/-/hashjs-1.2.0.tgz#a40e2d69de57826774643029c7b1bb4f2390baaa" - integrity sha1-pA4tad5Xgmd0ZDApx7G7TyOQuqo= - hdkey@1.1.1, hdkey@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/hdkey/-/hdkey-1.1.1.tgz#c2b3bfd5883ff9529b72f2f08b28be0972a9f64a" @@ -10583,11 +10566,6 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== -iso4217@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/iso4217/-/iso4217-0.2.0.tgz#139ce00ac0cf0d360e48b22215c797f016b2840d" - integrity sha1-E5zgCsDPDTYOSLIiFceX8BayhA0= - iso8601-duration@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/iso8601-duration/-/iso8601-duration-1.3.0.tgz#29d7b69e0574e4acdee50c5e5e09adab4137ba5a" @@ -14206,7 +14184,7 @@ regenerate@^1.4.2: resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== -regenerator-runtime@0.13.2, regenerator-runtime@^0.11.0, regenerator-runtime@^0.13.11, regenerator-runtime@^0.13.2: +regenerator-runtime@0.13.11, regenerator-runtime@0.13.2, regenerator-runtime@^0.11.0, regenerator-runtime@^0.13.11, regenerator-runtime@^0.13.2: version "0.13.2" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz#32e59c9a6fb9b1a4aff09b4930ca2d4477343447" integrity sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==