onekeyhq / app-monorepo Goto Github PK
View Code? Open in Web Editor NEWSecure, open source and community driven crypto wallet runs on all platforms and trusted by millions.
Home Page: https://onekey.so
Secure, open source and community driven crypto wallet runs on all platforms and trusted by millions.
Home Page: https://onekey.so
Describe the bug
While resolving module @onekeyhq/app/src/hardware/OnekeyLite/types
, the Haste package @onekeyhq/app
was found. However the module. Indeed, none of these files exist:
/Users/user/Downloads/working/app-monorepo/packages/app/src/hardware/OnekeyLite/types(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
When I try to install expo-dev-client, and run yarn android I get errors.
To reproduce the problem, run yarn workspace @onekeyhq/app add expo-dev-client
And then try running for android or ios the build will not work.
I need expo-dev-client to test the app with better testing environement, specially if you're trying to test ios on non macOS system.
Is it possible to add this package and make the build work at the same time ?
i used onekey to connect a dapp website, but after scanning the qr code, the website prompted "invalid address".
the website uses walletconnect of version 2.
i guess it's caused by the mismatch of walletconnect version.
when i run yarn ios
i get
error: unable to attach DB: error: accessing build database "/Users/jacopomosconi/Library/Developer/Xcode/DerivedData/OneKeyWallet-clovgltvlcltewaayddbggaboclu/Build/Intermediates.noindex/XCBuildData/build.db": database is locked Possibly there are two concurrent builds running in the same filesystem location.
Possible solution: Upgrade electron-builder
Xcode14.0.1 Packaging error
The certificate is configured
The error is as follows: What else do you need to configure when packing?
error build: Command PhaseScriptExecution failed with a nonzero exit code
It's probably M1/arm related base on the error message, tried Google around but no progress.
Thanks.
full output of yarn ios
:
yarn run v1.22.17
$ expo run:ios
› Planning build
› Executing react-native-config Pods/react-native-config » [CP-User] Config codegen
› Executing expo-constants Pods/EXConstants » [CP-User] Generate app.config for prebuilt Constants.manifest
› Compiling react-native-config Pods/react-native-config » ReactNativeConfig.m
› Packaging react-native-config Pods/react-native-config » libreact-native-config.a
› Executing OneKeyWallet » Start Packager on http://localhost:8081
› Linking OneKeyWallet » OneKeyWallet
❌ ld: building for iOS Simulator, but linking in dylib built for iOS, file '/Users/naeemo/Workspace/github/app-monorepo/packages/app/ios/OneKeyWallet/Frameworks/GPChannelSDKCore.framework/GPChannelSDKCore' for architecture arm64
❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)
› 2 error(s), and 0 warning(s)
Failed to build iOS project. "xcodebuild" exited with error code 65.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I was trying to generate the APK for testing but not able to generate it. I have a review the guideline but not able to find the steps.
您好,我作为开发人员遇到了问题,我想将我的自定义令牌添加到 onekey,但我找不到带有预设令牌列表的文件 (Hello i have an issue as a developer, I want to add my custom token to onekey but i cant find the file with the preset token list)
sui updated their SDK, but onekey didn't
In the below example :-
{
"_id": "62e8a3d28edb7c3c91a5584a",
"name": "Tether",
"symbol": "USDT",
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"decimals": 6,
"logoURI": "https://common.onekey-asset.com/token/evm-1/0xdAC17F958D2ee523a2206206994597C13D831ec7.jpg",
"impl": "evm",
"status": "LISTED",
"verified": true,
"security": false,
"addToIndex": true,
"chainId": "1",
"source": [
"sushi",
"Uniswap Labs Default",
"Coingecko"
],
"checked": true,
"coingeckoId": "tether",
"swftId": "USDT(ERC20)",
"createdAt": "2022-08-02T04:10:58.205Z",
"updatedAt": "2022-11-28T15:13:18.247Z",
"__v": 0,
"marketCap": 67600751622.405464
}
You can see 2 properties which is verified and security. How and on what base, do you set them ?
看起来是一个很不错的项目,请问是否有移动开发岗位?
i'm trying to use expo go on my iphone but everytime i get 2 errors:
1- TypeError: null is not an object (evaluating 'RNRandomBytes.seed')
2-
Invariant Violation: "main" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and AppRegistry.registerComponent wasn't called.
someone know why and how to resolve it?
full output
iOS Bundling complete 299ms
iOS Running app on iPhone di jacopo
TypeError: null is not an object (evaluating 'RNRandomBytes.seed')
at /Users/jacopomosconi/Downloads/app-monorepo-1.0.3 2/node_modules/react-native/Libraries/Core/ExceptionsManager.js:104:6 in reportException
at /Users/jacopomosconi/Downloads/app-monorepo-1.0.3 2/node_modules/react-native/Libraries/Core/ExceptionsManager.js:172:19 in handleException
at /Users/jacopomosconi/Downloads/app-monorepo-1.0.3 2/node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:6 in handleError
at /Users/jacopomosconi/Downloads/app-monorepo-1.0.3 2/node_modules/@react-native/polyfills/error-guard.js:49:36 in ErrorUtils.reportFatalError
at /Users/jacopomosconi/Downloads/app-monorepo-1.0.3 2/node_modules/metro-runtime/src/polyfills/require.js:204:6 in guardedLoadModule
at http://172.20.10.2:8081/__generated__/AppEntry.bundle?platform=ios&dev=true&hot=false&strict=false&minify=false:1102510:3 in global code
Invariant Violation: "main" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called.
at /Users/jacopomosconi/Downloads/app-monorepo-1.0.3 2/node_modules/react-native/Libraries/Core/ExceptionsManager.js:104:6 in reportException
at /Users/jacopomosconi/Downloads/app-monorepo-1.0.3 2/node_modules/react-native/Libraries/Core/ExceptionsManager.js:172:19 in handleException
at /Users/jacopomosconi/Downloads/app-monorepo-1.0.3 2/node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:6 in handleError
at /Users/jacopomosconi/Downloads/app-monorepo-1.0.3 2/node_modules/@react-native/polyfills/error-guard.js:49:36 in ErrorUtils.reportFatalError
I'm trying to add expo-notification or firebase-notification service other than JPush notification service.
Beacuse It's not possible to create an account In JPush service.
Prerequisites
Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
Describe the bug
On the Swap & Bridge page, select the USDC - ETH trading pair, enter 1 ETH in the ETH box, and Rate field display 1 USDC ≈ 1176 ETH on the details page.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Rate: 1 ETH ≈ 1176 UDDC
Desktop (please complete the following information):
I'm trying to replace this variable
const DEFAULT_ONLINE_ENDPOINT = 'https://fiat.onekeycn.com';
with my own server but, I can't find any repo for it.
我运行的是3.16.0最后一个版本代码
系统版本:ios15.1 、 ios14.6
Prerequisites
Describe the bug
I downloaded the code and tried to follow the first step to install yarn dependencies in windows 11.
It throws the error as attached in the screenshot.
Log:
'bash' is not recognized as an internal or external command,
operable program or batch file.
command not found: bash
To Reproduce
Steps to reproduce the behavior:
test it https://www.bitaddress.org:
1E6jFXWBCjKYpD1nrXK3enqpEUpx8SYcAy
Kz4q9nCZTLBmmd9c7ucpg9CnNG97jZSVuniQRWWhYpk9Ak4zcSC5
result: unsupport syntax
Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
iOS 连接 OneKey 之后不能获取账户
iOS 连接到 OneKey 之后,使用 BTC 恢复账户,进入恢复账户页面之后报错 Excepted Point, got a
后面的信息看不到了,然后回到恢复账户的页面。
直接 USB 连接到 Windows 上之后可以获取到账户。
iOS 的 APP 是用**账号下载的,开发者是 ONEKEY LIMITED
,版本是 1.2.0-20220530063
。
OneKey 的固件版本是和蓝牙固件版本都已经更新了,固件版本 2.2.0
,蓝牙版本 1.2.1
。
正确恢复账户
如上所述
<--- Last few GCs --->
[18314:0x7fce52100000] 452694 ms: Mark-sweep (reduce) 1976.8 (2083.1) -> 1976.8 (2083.1) MB, 3478.8 / 0.0 ms (average mu = 0.232, current mu = 0.148) allocation failure GC in old space requested
[18314:0x7fce52100000] 457620 ms: Mark-sweep (reduce) 1976.8 (2083.1) -> 1976.8 (2083.1) MB, 4129.6 / 0.0 ms (average mu = 0.197, current mu = 0.162) allocation failure GC in old space requested
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0x1045e6285 node::Abort() (.cold.1) [/usr/local/bin/node]
2: 0x1032e7509 node::Abort() [/usr/local/bin/node]
The result from this endpoint token/list
Is the following :-
{
"_id": "62e8a3d48edb7c3c91a56327",
"name": "USD Coin",
"symbol": "USDC",
"address": "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d",
"decimals": 18,
"logoURI": "https://common.onekey-asset.com/token/evm-56/0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d.jpg",
"impl": "evm",
"status": "LISTED",
"verified": true,
"security": false,
"addToIndex": true,
"chainId": "56",
"source": [
"sushi",
"pancakeswap-extended",
"Coingecko"
],
"checked": true,
"coingeckoId": "usd-coin",
"swftId": "USDC(BSC)",
"createdAt": "2022-08-02T04:11:00.341Z",
"updatedAt": "2022-09-16T16:46:52.184Z",
"__v": 0,
"marketCap": 52152103479.05381
}
But some tokens doesn't have the swftId property, why is that?
And what is swftId ?
Hey!
I noticed this repo uses react-native-crypto, which itself uses crypto-browserify under the hood. crypto-browserify is a JS-based implementation for crypto, which is slower than Margelo's react-native-quick-crypto, since that uses C++ (OpenSSL) with JSI under the hood.
If you want to replace react-native-crypto with the faster react-native-quick-crypto, I'm happy to help out or answer questions! 😄
I'm trying to get the private of the address and create a WIF, this is what I tried to do ?
import * as bitcoin from 'bitcoinjs-lib';
import BIP32Factory from 'bip32';
import bs58check from 'bs58check';
import * as ecc from 'tiny-secp256k1';
import * as bip39 from 'bip39';
const bip32 = BIP32Factory(ecc);
function getAddress(node: any, network?: any): string {
return bitcoin.payments.p2pkh({ pubkey: node.publicKey, network }).address!;
}
const mnemonic = 'spare motion marriage tongue receive pole seat leader view unable human air';
const seed = bip39.mnemonicToSeedSync(mnemonic);
const node = bip32.fromSeed(seed);
const root = node.derivePath("m/44'/0'/0'");
const xpub = root.neutered().toBase58();
// console.log('xpub', xpub);
console.log(root.privateKey.toString('hex'));
console.log(xpub);
console.log(root.toWIF());
// receive addresses
console.log(getAddress(node.derivePath("m/44'/0'/0'")));
const decodedXpub = bs58check.decode(xpub);
// console.log(decodedXpub.slice(45, 78).toString('hex'));
// console.log(bitcoin.payments.p2pkh({ pubkey: decodedXpub.slice(45, 78) }).address!);
console.log(bitcoin.payments.p2pkh({ pubkey: Buffer.from('02c47e6c0a0991b7078f7828d0bc73ed2ad3efa365e14a6d109a090b1126fd3b14', 'hex') }).address!);
The output is the following ; -
// private key
3cb16d9f8e6dc5458400ff225218c66500ceedf71a459b869839b4d9061ccaec
// xprv
xprv9xt5FvzdwnBmrVk12CxSnFwAdcvNkSmpQVK6X6YVd68AoZBDAt7ABmApaUpLXB5PL2QVJM7XLjAkH6Qb9bXxoKbiXwrCTnEpDqcHQpY64z7
// xpub
xpub6BsRfSXXn9k54ypU8EVT9PsuBeks9uVfmiEhKUx7BRf9gMWMiRRQjZVJRkyRJbuTK4FBKyjxCPUvxmCCDu9Ht4jxo2GCi526ZQ4RfQ6aSZC
// WIF compressed
KyFgzQeHsH8ThchMsiAG6adjEPcyP4vJXE4jeGLevf8Eo6soXzFr
// WIF to address
13ySVizcv1F7z6GKE4kJJLkZSqvCBJzPn3
// the correct address from onekey website
1eXYoK88bdHBm5YayZQ6Vi2CRpbjEsidS
As you can see above the private key didn't give the correct address in website.
How to get private and public keys for an address from xprv and xpub ?
i don't know how it's possible to create a address specific privkatekey and pubkey
the privatekey created to sign message i can't seem to be able to convert it to wif to import it in core wallet directly
am i missing something
not sure if this has been requested ( couldn't find ) or even if it can be requested here...
but, the title.
lightning network allow extremely low-fee transactions for Bitcoin and its very useful for small amount purchases and many website/stores already support Lightning.
There seems to be an issue with certain Cosmos tokens that are not using the right HD Path for generation. Currently the ones I have listed below are using 44'/118'/0'/0/{index}
.
The Crypto.org chain should be using 44'/394'/0'/0/{index}
The Secret Network should be using 44'/529'/0'/0/{index}
Maybe for future reference use the Registered coin types for BIP-0044 to make sure the BIP HD paths will be correct.
Will this be changed to make sure addresses generate correctly since addresses generated in OneKey differ from other wallets?
Thanks.
I was wondering about the timeline, priority, and plan for migration of the OneKey extension to the new Chrome V3 Manifest
i cant find the project id of walletconnect.
where to find it, to change it?
Describe the bug
When toggling Dark Mode in iOS/ iPadOS, the app should immediately change their appearances even though suspended in the background.
Additional context
Possible solution: Use DynamicColorIOS on iOS / iPadOS platforms
Warning: patch-package detected a patch file version mismatch
Don't worry! This is probably fine. The patch was still applied
successfully. Here's the deets:
Patch file created for
[email protected]
applied to
[email protected]
At path
node_modules/react-native-screens
This warning is just to give you a heads-up. There is a small chance of
breakage even though the patch was applied successfully. Make sure the package
still behaves like you expect (you wrote tests, right?) and then run
patch-package react-native-screens
to update the version in the patch file name and make this warning go away.
Warning: patch-package detected a patch file version mismatch
Don't worry! This is probably fine. The patch was still applied
successfully. Here's the deets:
Patch file created for
[email protected]
applied to
[email protected]
At path
node_modules/react-native-tab-view
This warning is just to give you a heads-up. There is a small chance of
breakage even though the patch was applied successfully. Make sure the package
still behaves like you expect (you wrote tests, right?) and then run
patch-package react-native-tab-view
to update the version in the patch file name and make this warning go away.
**ERROR** Failed to apply patch for package expo-camera at path
node_modules/expo-camera
This error was caused because expo-camera has changed since you
made the patch file for it. This introduced conflicts with your patch,
just like a merge conflict in Git when separate incompatible changes are
made to the same piece of code.
Maybe this means your patch file is no longer necessary, in which case
hooray! Just delete it!
Otherwise, you need to generate a new patch file.
To generate a new one, just repeat the steps you made to generate the first
one.
i.e. manually make the appropriate file changes, then run
patch-package expo-camera
Info:
Patch file: patches/expo-camera+12.2.0.patch
Patch was made for version: 12.2.0
Installed version: 12.5.0
**ERROR** Failed to apply patch for package expo-localization at path
node_modules/expo-localization
This error was caused because expo-localization has changed since you
made the patch file for it. This introduced conflicts with your patch,
just like a merge conflict in Git when separate incompatible changes are
made to the same piece of code.
Maybe this means your patch file is no longer necessary, in which case
hooray! Just delete it!
Otherwise, you need to generate a new patch file.
To generate a new one, just repeat the steps you made to generate the first
one.
i.e. manually make the appropriate file changes, then run
patch-package expo-localization
Info:
Patch file: patches/expo-localization+13.0.0.patch
Patch was made for version: 13.0.0
Installed version: 13.1.0
---
patch-package finished with 5 warning(s), 2 error(s).
yarn run v1.18.0
$ node development/build-networklist.js
✨ Done in 0.57s.
yarn run v1.18.0
$ bash development/copy-injected.sh
+ cp ./node_modules/@onekeyfe/cross-inpage-provider-injected/dist/injected/injectedDesktop.js ./packages/desktop/public/static/preload.js
+ cp ./node_modules/@onekeyfe/cross-inpage-provider-injected/dist/injected/injectedExtension.js ./packages/ext/src/entry/injected.js
+ cp ./packages/ext/src/entry/injected.js ./packages/ext/src/entry/injected.text-js
+ cp ./node_modules/@onekeyfe/cross-inpage-provider-injected/dist/injected/injectedNative.js ./packages/kit/src/components/WebView/injectedNative.text-js
+ cp ./packages/shared/src/web/index.html.ejs ./packages/shared/src/web/index.html
+ mkdir -p ./packages/desktop/public/static/js-sdk/
+ rsync ./node_modules/@onekeyfe/hd-web-sdk/build/ ./packages/desktop/public/static/js-sdk/ --checksum --recursive --verbose
building file list ... done
iframe.html
onekey-js-sdk.js
onekey-js-sdk.js.map
onekey-js-sdk.min.js
onekey-js-sdk.min.js.map
js/iframe.c4b673c0c6040a27dbc2.js
js/iframe.c4b673c0c6040a27dbc2.js.LICENSE.txt
js/iframe.c4b673c0c6040a27dbc2.js.map
sent 15518935 bytes received 196 bytes 31038262.00 bytes/sec
total size is 15736633 speedup is 1.01
+ '[' '' == true ']'
+ '[' '!' -d packages/web-embed/web-build ']'
+ yarn workspace @onekeyhq/web-embed build
warning Missing version in workspace at "/Users/jinyu/eth/app-monorepo/packages/blockchain-libs", ignoring.
$ rm -rf ./web-build && GENERATE_SOURCEMAP=false npx expo build:web && cp ./web-build/index.html ./web-build/404.html && sh ./postbuild.sh
┌─────────────────────────────────────────────────────────────────────────┐
│ │
│ There is a new version of expo-cli available (6.3.2). │
│ You are currently using expo-cli 6.0.8 │
│ Install expo-cli globally using the package manager of your choice; │
│ for example: `npm install -g expo-cli` to get the latest version │
│ │
└─────────────────────────────────────────────────────────────────────────┘
============ webpack.version 4.46.0 webEmbed
Failed to compile.
/Users/jinyu/eth/app-monorepo/packages/engine/src/proxy.ts
Cannot find module: '@onekeyhq/blockchain-libs/src/provider'. Make sure this package is installed.
You can install this package by running: yarn add @onekeyhq/blockchain-libs/src/provider.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
Exit code: 1
Command: /usr/local/bin/node
Arguments: /Users/jinyu/.yarn/releases/yarn-1.18.0.cjs build
Directory: /Users/jinyu/eth/app-monorepo/packages/web-embed
Output:
info Visit https://yarnpkg.com/en/docs/cli/workspace for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
an error occurred when I install dependencies
It seems to be related to this Issue: trezor/trezor-utxo-lib#14
Prerequisites
Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
Describe the bug
, the package appmonorepo/node_modules/@solana/web3.js/node_modules/superstruct/package.json
was successfully found. However, this package itself specifies a main
module field that could not be resolved (/Users/user/Downloads/working/app-monorepo/node_modules/@solana/web3.js/node_modules/superstruct/lib/index.cjs
. Indeed, none of these files exist:
monorepo/node_modules/@solana/web3.js/node_modules/superstruct/lib/index.cjs(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
monorepo/node_modules/@solana/web3.js/node_modules/superstruct/lib/index.cjs/index(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx).
Prerequisites
EXPO打包安卓时候,提示和秘钥相关的问题,无法执行
但是根据文档说,社区开发者需要前往android/script执行对应脚本获取秘钥进行配置。然而不管用:
这是Expo的报错信息:
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ':lib-keys-secret:buildCMakeRelWithDebInfo'.
[stderr] > Build command failed.
[stderr] Error while executing process /home/expo/Android/Sdk/cmake/3.10.2.4988404/bin/ninja with arguments {-C /home/expo/workingdir/build/packages/app/android/lib-keys-secret/.cxx/RelWithDebInfo/483b1t4v/armeabi-v7a keys}
[stderr] ninja: Entering directory `/home/expo/workingdir/build/packages/app/android/lib-keys-secret/.cxx/RelWithDebInfo/483b1t4v/armeabi-v7a'
[stderr] [1/3] Building C object CMakeFiles/keys.dir/keys.c.o
[stderr] FAILED: CMakeFiles/keys.dir/keys.c.o
[stderr] /home/expo/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=armv7-none-linux-androideabi23 --gcc-toolchain=/home/expo/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64 --sysroot=/home/expo/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot -Dkeys_EXPORTS -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -O2 -g -DNDEBUG -fPIC -fvisibility=hidden -MD -MT CMakeFiles/keys.dir/keys.c.o -MF CMakeFiles/keys.dir/keys.c.o.d -o CMakeFiles/keys.dir/keys.c.o -c /home/expo/workingdir/build/packages/app/android/lib-keys-secret/src/main/cpp/keys.c
[stderr] /home/expo/workingdir/build/packages/app/android/lib-keys-secret/src/main/cpp/keys.c:18:57: error: use of undeclared identifier 'authorizedAppSha1'
[stderr] if (checkSecurityPermission(env, context, (char **) authorizedAppSha1, 3)) {
[stderr] ^
[stderr] /home/expo/workingdir/build/packages/app/android/lib-keys-secret/src/main/cpp/keys.c:19:16: warning: implicit declaration of function 'getDecryptedKey' is invalid in C99 [-Wimplicit-function-declaration]
[stderr] return getDecryptedKey(env, liteInitGPCParams, sizeof(liteInitGPCParams));
[stderr] ^
[stderr] /home/expo/workingdir/build/packages/app/android/lib-keys-secret/src/main/cpp/keys.c:19:63: error: use of undeclared identifier 'liteInitGPCParams'
[stderr] return getDecryptedKey(env, liteInitGPCParams, sizeof(liteInitGPCParams));
[stderr] ^
[stderr] /home/expo/workingdir/build/packages/app/android/lib-keys-secret/src/main/cpp/keys.c:19:37: error: use of undeclared identifier 'liteInitGPCParams'
[stderr] return getDecryptedKey(env, liteInitGPCParams, sizeof(liteInitGPCParams));
[stderr] ^
[stderr] 1 warning and 3 errors generated.
[stderr] [2/3] Building C object CMakeFiles/keys.dir/validation.c.o
[stderr] ninja: build stopped: subcommand failed.
I try building android using this command after changing these 2 files
eas build --platform android
1- packages/app/app.json >> I remove (extra.eas.projectId) to generate new one
2- packages/app/scripts/eas-build-pre-install.sh >> I specify expo-cli version instead of lates (npm i -g [email protected])
I get this error in expo build, however building with react-native works.
C/C++: ninja: Entering directory `/home/expo/workingdir/build/packages/app/android/lib-keys-secret/.cxx/RelWithDebInfo/133g4p6s/arm64-v8a'
C/C++: /home/expo/workingdir/build/packages/app/android/lib-keys-secret/src/main/cpp/keys.c:18:57: error: use of undeclared identifier 'authorizedAppSha1'
C/C++: /home/expo/workingdir/build/packages/app/android/lib-keys-secret/src/main/cpp/keys.c:19:16: warning: implicit declaration of function 'getDecryptedKey' is invalid in C99 [-Wimplicit-function-declaration]
C/C++: /home/expo/workingdir/build/packages/app/android/lib-keys-secret/src/main/cpp/keys.c:19:63: error: use of undeclared identifier 'liteInitGPCParams'
C/C++: /home/expo/workingdir/build/packages/app/android/lib-keys-secret/src/main/cpp/keys.c:19:37: error: use of undeclared identifier 'liteInitGPCParams'
> Task :lib-keys-secret:buildCMakeRelWithDebInfo[arm64-v8a] FAILED
> Task :react-native-v8:copyReleaseJniLibsProjectOnly
> Task :app:bundleReleaseJsAndAssets
warning: the transform cache was reset.
> Task :react-native-v8:stripReleaseDebugSymbols
> Task :app:bundleReleaseJsAndAssets FAILED
Error: The resource `/home/expo/workingdir/build/packages/app/index.js` was not found.
at /home/expo/workingdir/build/node_modules/metro/src/IncrementalBundler.js:297:24
at gotStat (node:fs:2684:21)
at FSReqCallback.oncomplete (node:fs:202:21)
info Run CLI with --verbose flag for more details.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
1456 actionable tasks: 1456 executed
[stderr] error The resource `/home/expo/workingdir/build/packages/app/index.js` was not found.
[stderr] FAILURE: Build completed with 3 failures.
[stderr] 1: Task failed with an exception.
[stderr] -----------
[stderr] * What went wrong:
[stderr] Execution failed for task ':lib-keys-secret:buildCMakeRelWithDebInfo[arm64-v8a]'.
[stderr] > com.android.ide.common.process.ProcessException: ninja: Entering directory `/home/expo/workingdir/build/packages/app/android/lib-keys-secret/.cxx/RelWithDebInfo/133g4p6s/arm64-v8a'
[stderr] [1/3] Building C object CMakeFiles/keys.dir/keys.c.o
[stderr] FAILED: CMakeFiles/keys.dir/keys.c.o
[stderr] /home/expo/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=aarch64-none-linux-android23 --gcc-toolchain=/home/expo/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64 --sysroot=/home/expo/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot -Dkeys_EXPORTS -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -O2 -g -DNDEBUG -fPIC -fvisibility=hidden -MD -MT CMakeFiles/keys.dir/keys.c.o -MF CMakeFiles/keys.dir/keys.c.o.d -o CMakeFiles/keys.dir/keys.c.o -c /home/expo/workingdir/build/packages/app/android/lib-keys-secret/src/main/cpp/keys.c
[stderr] /home/expo/workingdir/build/packages/app/android/lib-keys-secret/src/main/cpp/keys.c:18:57: error: use of undeclared identifier 'authorizedAppSha1'
[stderr] if (checkSecurityPermission(env, context, (char **) authorizedAppSha1, 3)) {
[stderr] ^
[stderr] /home/expo/workingdir/build/packages/app/android/lib-keys-secret/src/main/cpp/keys.c:19:16: warning: implicit declaration of function 'getDecryptedKey' is invalid in C99 [-Wimplicit-function-declaration]
[stderr] return getDecryptedKey(env, liteInitGPCParams, sizeof(liteInitGPCParams));
[stderr] ^
[stderr] /home/expo/workingdir/build/packages/app/android/lib-keys-secret/src/main/cpp/keys.c:19:63: error: use of undeclared identifier 'liteInitGPCParams'
[stderr] return getDecryptedKey(env, liteInitGPCParams, sizeof(liteInitGPCParams));
[stderr] ^
[stderr] /home/expo/workingdir/build/packages/app/android/lib-keys-secret/src/main/cpp/keys.c:19:37: error: use of undeclared identifier 'liteInitGPCParams'
[stderr] return getDecryptedKey(env, liteInitGPCParams, sizeof(liteInitGPCParams));
[stderr] ^
[stderr] 1 warning and 3 errors generated.
[stderr] [2/3] Building C object CMakeFiles/keys.dir/validation.c.o
[stderr] ninja: build stopped: subcommand failed.
[stderr]
[stderr] C++ build system [build] failed while executing:
[stderr] /home/expo/Android/Sdk/cmake/3.18.1/bin/ninja \
[stderr] -C \
[stderr] /home/expo/workingdir/build/packages/app/android/lib-keys-secret/.cxx/RelWithDebInfo/133g4p6s/arm64-v8a \
[stderr] keys
[stderr] from /home/expo/workingdir/build/packages/app/android/lib-keys-secret
[stderr] * Try:
[stderr] > Run with --stacktrace option to get the stack trace.
[stderr] > Run with --info or --debug option to get more log output.
[stderr] > Run with --scan to get full insights.
[stderr] ==============================================================================
[stderr] 2: Task failed with an exception.
[stderr] -----------
[stderr] * What went wrong:
[stderr] java.lang.StackOverflowError (no error message)
[stderr] * Try:
[stderr] > Run with --stacktrace option to get the stack trace.
[stderr] > Run with --info or --debug option to get more log output.
[stderr] > Run with --scan to get full insights.
[stderr] ==============================================================================
[stderr] 3: Task failed with an exception.
[stderr] -----------
[stderr] * What went wrong:
[stderr] Execution failed for task ':app:bundleReleaseJsAndAssets'.
[stderr] > Process 'command 'node'' finished with non-zero exit value 1
[stderr] * Try:
[stderr] > Run with --stacktrace option to get the stack trace.
[stderr] > Run with --info or --debug option to get more log output.
[stderr] > Run with --scan to get full insights.
[stderr] ==============================================================================
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 5m 45s
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
Describe the bug
The apk downloaded from github releases such as in : https://github.com/OneKeyHQ/app-monorepo/releases
the file https://github.com/OneKeyHQ/app-monorepo/releases/download/v4.3.0/OneKey-Wallet-4.3.0-android.apk
will have only ./lib/arm64-v8a directory in it, therefore it wont be installed on devices of different arch (such as x86/x86_64/armeabi/armeabi-v7a/mips/mips64)
related is errors in https://twitter.com/BitcoinWalletz/status/1648259324228288513/photo/2
Fix:
publish universal apk in github release or website downloads so the apk will be installed on all supported devices.
for details about universal apk:
universal apk generation https://developer.android.com/build/configure-apk-splits#configure-abi-split
universal apk generation from app bundle: --mode=universal
https://developer.android.com/tools/bundletool#generate_apks
需求:在处理询价请求时,我得到了询价的返回数据,准备对他进行解析,来满足自己的计算需要和展示需要。同时想换成自己的询价服务以提高访问效率,我应该如何返回data中的数据?
代码出处:0x.ts中的 const data = res.data.data as QuoteResponse
我想了解一下QuoteResponse中的'data'中返回的数据代表什么含义。(0x415565b0000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000004518a36b00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000.........................)
APP版本:3.16.0
万分感谢~~~~~~Thanks~~~~~~
原因:
在小屏幕中,segmentedControl 的点击区域非常的小,用户难以触碰到另一个按钮
可参考的解决方案:
使用 pressable
包一层
<Pressable
// no delay acts like debounce
delayLongPress={0}
onPress={onToggleView}
>
<SegmentedControl
containerProps={{
width: 70,
height: 35,
}}
options={[
{
iconName: 'ViewListSolid',
value: CollectibleView.Flat,
},
{
iconName: 'ViewGridSolid',
value: CollectibleView.Grid,
},
]}
defaultValue={view}
/>
</Pressable>
Prerequisites
Press "yarn" to install dependencies
Describe the bug
➤ YN0007: │ core-js-pure@npm:3.26.1 must be built because it never has been before or the last one failed
➤ YN0007: │ realm@npm:11.0.0-rc.0 [861fd] must be built because it never has been before or the last one failed
➤ YN0007: │ electron@npm:21.1.1 must be built because it never has been before or the last one failed
➤ YN0007: │ electron@npm:19.1.3 must be built because it never has been before or the last one failed
➤ YN0007: │ esbuild@npm:0.15.11 must be built because it never has been before or the last one failed
➤ YN0007: │ keytar@npm:7.9.0 must be built because it never has been before or the last one failed
➤ YN0007: │ secp256k1@npm:4.0.3 must be built because it never has been before or the last one failed
➤ YN0007: │ web3-bzz@npm:1.7.3 must be built because it never has been before or the last one failed
➤ YN0007: │ web3-shh@npm:1.7.3 must be built because it never has been before or the last one failed
➤ YN0007: │ protobufjs@npm:6.11.3 must be built because it never has been before or the last one failed
➤ YN0007: │ keccak@npm:3.0.2 must be built because it never has been before or the last one failed
➤ YN0007: │ bigint-buffer@npm:1.1.5 must be built because it never has been before or the last one failed
➤ YN0007: │ tiny-secp256k1@npm:1.1.6 must be built because it never has been before or the last one failed
➤ YN0007: │ secp256k1@npm:3.8.0 must be built because it never has been before or the last one failed
➤ YN0007: │ core-js@npm:3.6.5 must be built because it never has been before or the last one failed
➤ YN0007: │ better-sqlite3@npm:7.6.2 must be built because it never has been before or the last one failed
➤ YN0007: │ bufferutil@npm:4.0.6 must be built because it never has been before or the last one failed
➤ YN0007: │ utf-8-validate@npm:5.0.8 must be built because it never has been before or the last one failed
➤ YN0007: │ core-js@npm:2.6.12 must be built because it never has been before or the last one failed
➤ YN0009: │ @onekeyhq/app-monorepo@workspace:. couldn't be built successfully (exit code 2, logs can be found here: C:\Users\HP\AppData\Local\Temp\xfs-816180f3\build.log)
➤ YN0007: │ @onekeyhq/app@workspace:packages/app must be built because it never has been before or the last one failed
➤ YN0007: │ @onekeyhq/desktop@workspace:packages/desktop must be built because it never has been before or the last one failed
➤ YN0007: │ web3@npm:1.7.3 must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 3m 26s
➤ YN0000: Failed with errors in 3m 35s
Is your feature request related to a problem? Please describe.
Flathub is a centralized repo like Google Play for desktop apps on Linux. Publishing it will expose OneKey Wallet to a wider community of Linux users.
Describe the solution you'd like
It would be nice if you agree that I submit it to Flathub: flathub/flathub#3692. It's simply files extracted from your AppImage + metadata files. All are open source and auditable. The packaging happens in Flathub.org's server.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.