Skip to content

Commit

Permalink
Merge pull request #3468 from bithyve/dev
Browse files Browse the repository at this point in the history
Build 275
  • Loading branch information
cakesoft-shashank authored Nov 28, 2023
2 parents d8ab002 + df41056 commit 6614fc7
Show file tree
Hide file tree
Showing 140 changed files with 3,590 additions and 2,309 deletions.
6 changes: 3 additions & 3 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Affordable and easy-to-use, security for all your sats, BIP-85, Multisig, Own No

## Prerequisites

Before getting started, make sure you have proper [React Native development environment](https://reactnative.dev/docs/environment-setup) on your machine
Before getting started, make sure you have a proper [React Native development environment](https://reactnative.dev/docs/environment-setup) on your machine


## Getting Started
Expand All @@ -27,7 +27,7 @@ Before getting started, make sure you have proper [React Native development envi
cd bitcoin-keeper
```
3. Install the project dependencies using Yarn:
The prepare scripts will automaticall install pods and nodify crypto related packages for react-netive
The prepare scripts will automatically install pods and nodify crypto-related packages for react-native
```shell
yarn install
```
Expand All @@ -52,7 +52,7 @@ ios/libwhirlpool.a
```
### Varients
The project has testnet and mainnet varients. The development varient is configured to use testnet and production varient to use mainnet.
The project has testnet and mainnet variants. The development variant is configured to use testnet and the production variant to use mainnet.
Start metro metro
```bash
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ android {
applicationId "io.hexawallet.keeper"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 258
versionName "1.1.7"
versionCode 276
versionName "1.1.8"
missingDimensionStrategy 'react-native-camera', 'general'
missingDimensionStrategy 'store', 'play'
multiDexEnabled true
Expand Down
5 changes: 4 additions & 1 deletion appcenter-pre-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ printf "Creating an .env file with the following whitelist:\n"
printf "%s\n" $ENV_WHITELIST
set | egrep -e $ENV_WHITELIST | sed 's/^RN_//g' > .env
printf "\n.env created with contents:\n\n"
cat .env
cat .env
printf "\nDownloading whirlpool binary:\n"
curl --location https://github.com/bithyve/bitcoin-keeper/releases/download/v1.0.8/libwhirlpool.a --output ios/libwhirlpool.a
ls ios/
34 changes: 17 additions & 17 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -98,41 +98,41 @@ PODS:
- FlipperKit/FlipperKitNetworkPlugin
- fmt (6.2.1)
- glog (0.3.5)
- GoogleDataTransport (9.2.1):
- GoogleDataTransport (9.2.3):
- GoogleUtilities/Environment (~> 7.7)
- nanopb (< 2.30910.0, >= 2.30908.0)
- PromisesObjC (< 3.0, >= 1.2)
- GoogleUtilities/AppDelegateSwizzler (7.11.0):
- GoogleUtilities/AppDelegateSwizzler (7.11.4):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Environment (7.11.0):
- GoogleUtilities/Environment (7.11.4):
- PromisesObjC (< 3.0, >= 1.2)
- GoogleUtilities/Logger (7.11.0):
- GoogleUtilities/Logger (7.11.4):
- GoogleUtilities/Environment
- GoogleUtilities/Network (7.11.0):
- GoogleUtilities/Network (7.11.4):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (7.11.0)"
- GoogleUtilities/Reachability (7.11.0):
- "GoogleUtilities/NSData+zlib (7.11.4)"
- GoogleUtilities/Reachability (7.11.4):
- GoogleUtilities/Logger
- GoogleUtilities/UserDefaults (7.11.0):
- GoogleUtilities/UserDefaults (7.11.4):
- GoogleUtilities/Logger
- hermes-engine (0.72.4):
- hermes-engine/Pre-built (= 0.72.4)
- hermes-engine/Pre-built (0.72.4)
- libevent (2.1.12)
- MMKV (1.2.15):
- MMKVCore (~> 1.2.15)
- MMKVCore (1.2.15)
- MMKV (1.3.0):
- MMKVCore (~> 1.3.0)
- MMKVCore (1.3.0)
- nanopb (2.30908.0):
- nanopb/decode (= 2.30908.0)
- nanopb/encode (= 2.30908.0)
- nanopb/decode (2.30908.0)
- nanopb/encode (2.30908.0)
- OpenSSL-Universal (1.1.1100)
- PromisesObjC (2.2.0)
- PromisesObjC (2.3.1)
- QrCode (1.0.0):
- React
- RCT-Folly (2021.07.22.00):
Expand Down Expand Up @@ -954,15 +954,15 @@ SPEC CHECKSUMS:
FlipperKit: 2efad7007d6745a3f95e4034d547be637f89d3f6
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
GoogleDataTransport: ea169759df570f4e37bdee1623ec32a7e64e67c4
GoogleUtilities: c2bdc4cf2ce786c4d2e6b3bcfd599a25ca78f06f
GoogleDataTransport: f0308f5905a745f94fb91fea9c6cbaf3831cb1bd
GoogleUtilities: c63691989bf362ba0505507da00eeb326192e83e
hermes-engine: 81191603c4eaa01f5e4ae5737a9efcf64756c7b2
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
MMKV: 7f34558bbb5a33b0eaefae2de4b6a20a2ffdad6f
MMKVCore: ddf41b9d9262f058419f9ba7598719af56c02cd3
MMKV: 9c6c3fa4ddd849f28c7b9a5c9d23aab84f14ee35
MMKVCore: 9bb7440b170181ac5b81f542ac258103542e693d
nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
PromisesObjC: 09985d6d70fbe7878040aa746d78236e6946d2ef
PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4
QrCode: 703276888a8e1e5a77606392f82ce758d895a450
RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1
RCTRequired: c0569ecc035894e4a68baecb30fe6a7ea6e399f9
Expand Down
16 changes: 8 additions & 8 deletions ios/hexa_keeper.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@
CODE_SIGN_ENTITLEMENTS = hexa_keeper/hexa_keeper.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 258;
CURRENT_PROJECT_VERSION = 276;
DEVELOPMENT_TEAM = Y5TCB759QL;
ENABLE_BITCODE = NO;
HEADER_SEARCH_PATHS = (
Expand Down Expand Up @@ -891,7 +891,7 @@
"$(inherited)",
"\"$(SRCROOT)\"",
);
MARKETING_VERSION = 1.1.7;
MARKETING_VERSION = 1.1.8;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand All @@ -915,7 +915,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = hexa_keeper/hexa_keeper.entitlements;
CODE_SIGN_IDENTITY = "Apple Distribution: Bithyve UK Ltd (Y5TCB759QL)";
CURRENT_PROJECT_VERSION = 258;
CURRENT_PROJECT_VERSION = 276;
DEVELOPMENT_TEAM = Y5TCB759QL;
HEADER_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -1022,7 +1022,7 @@
"$(inherited)",
"\"$(SRCROOT)\"",
);
MARKETING_VERSION = 1.1.7;
MARKETING_VERSION = 1.1.8;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -1176,7 +1176,7 @@
CODE_SIGN_ENTITLEMENTS = hexa_keeper_dev.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 258;
CURRENT_PROJECT_VERSION = 276;
DEVELOPMENT_TEAM = Y5TCB759QL;
ENABLE_BITCODE = NO;
HEADER_SEARCH_PATHS = (
Expand Down Expand Up @@ -1285,7 +1285,7 @@
"$(PROJECT_DIR)",
"\"$(SRCROOT)\"",
);
MARKETING_VERSION = 1.1.7;
MARKETING_VERSION = 1.1.8;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand All @@ -1310,7 +1310,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = hexa_keeper_dev.entitlements;
CODE_SIGN_IDENTITY = "Apple Distribution";
CURRENT_PROJECT_VERSION = 258;
CURRENT_PROJECT_VERSION = 276;
DEVELOPMENT_TEAM = Y5TCB759QL;
HEADER_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -1418,7 +1418,7 @@
"$(PROJECT_DIR)",
"\"$(SRCROOT)\"",
);
MARKETING_VERSION = 1.1.7;
MARKETING_VERSION = 1.1.8;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down
2 changes: 1 addition & 1 deletion ios/hexa_keeper/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>257</string>
<string>276</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NFCReaderUsageDescription</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/hexa_keeperTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>257</string>
<string>276</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion ios/hexa_keeper_dev-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>257</string>
<string>276</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NFCReaderUsageDescription</key>
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hexa_keeper",
"version": "1.1.7",
"version": "1.1.8",
"private": true,
"scripts": {
"ios": "react-native run-ios",
Expand Down Expand Up @@ -42,12 +42,12 @@
"bip21": "^2.0.3",
"bip32-path": "^0.4.2",
"bip39": "^3.0.4",
"bitcoinjs-lib": "5.2.0",
"bitcoinjs-lib": "6.1.5",
"bitcoinjs-message": "^2.2.0",
"buffer": "^6.0.3",
"buffer-reverse": "^1.0.1",
"cktap-protocol-react-native": "git+https://github.com/bithyve/cktap-protocol-react-native.git#main",
"coinselect": "3.1.11",
"coinselect": "3.1.13",
"constants": "^0.0.2",
"crypto-js": "4.1.1",
"deprecated-react-native-prop-types": "^4.2.1",
Expand All @@ -57,7 +57,7 @@
"idx": "2.5.6",
"lodash": "4.17.21",
"moment": "2.29.4",
"native-base": "3.3.7",
"native-base": "^3.4.28",
"node-rsa": "1.1.1",
"otplib": "12.0.1",
"patch-package": "6.4.7",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
diff --git a/node_modules/bitcoinjs-lib/src/psbt.d.ts b/node_modules/bitcoinjs-lib/src/psbt.d.ts
index de7bbb3..70b6ffe 100644
--- a/node_modules/bitcoinjs-lib/src/psbt.d.ts
+++ b/node_modules/bitcoinjs-lib/src/psbt.d.ts
@@ -118,6 +118,8 @@ export declare class Psbt {
addUnknownKeyValToInput(inputIndex: number, keyVal: KeyValue): this;
addUnknownKeyValToOutput(outputIndex: number, keyVal: KeyValue): this;
clearFinalizedInput(inputIndex: number): this;
+ getDigestToSign(inputIndex: number, publicKey: Buffer, sighashTypes?: number[]): { hash: Buffer; sighashType: any }
+ addSignedDigest(inputIndex: number, publicKey: Buffer, signature: Buffer, sighashType: any): this;
}
interface PsbtOptsOptional {
network?: Network;
diff --git a/node_modules/bitcoinjs-lib/src/psbt.js b/node_modules/bitcoinjs-lib/src/psbt.js
index 5193dd3..f731990 100644
index 71c3589..0aefd2a 100644
--- a/node_modules/bitcoinjs-lib/src/psbt.js
+++ b/node_modules/bitcoinjs-lib/src/psbt.js
@@ -604,6 +604,29 @@ class Psbt {
@@ -912,6 +912,25 @@ class Psbt {
this.data.clearFinalizedInput(inputIndex);
return this;
}
+ getDigestToSign(
+ inputIndex,
+ publicKey,
+ sighashTypes = [transaction_1.Transaction.SIGHASH_ALL],
+ ){
+ getDigestToSign(inputIndex, publicKey, sighashTypes = [transaction_1.Transaction.SIGHASH_ALL]) {
+ return getHashAndSighashType(
+ this.data.inputs,
+ inputIndex,
Expand All @@ -19,7 +28,7 @@ index 5193dd3..f731990 100644
+ sighashTypes,
+ );
+ }
+ addSignedDisgest(inputIndex, publicKey, signature, sighashType){
+ addSignedDigest(inputIndex, publicKey, signature, sighashType){
+ const partialSig = [
+ {
+ pubkey: publicKey,
Expand All @@ -32,16 +41,3 @@ index 5193dd3..f731990 100644
}
exports.Psbt = Psbt;
/**
diff --git a/node_modules/bitcoinjs-lib/types/psbt.d.ts b/node_modules/bitcoinjs-lib/types/psbt.d.ts
index 022a95d..4780aa2 100644
--- a/node_modules/bitcoinjs-lib/types/psbt.d.ts
+++ b/node_modules/bitcoinjs-lib/types/psbt.d.ts
@@ -94,6 +94,8 @@ export declare class Psbt {
addUnknownKeyValToInput(inputIndex: number, keyVal: KeyValue): this;
addUnknownKeyValToOutput(outputIndex: number, keyVal: KeyValue): this;
clearFinalizedInput(inputIndex: number): this;
+ getDigestToSign(inputIndex: number, publicKey: Buffer, sighashTypes?: number[]): { hash: Buffer; sighashType: any }
+ addSignedDisgest(inputIndex: number, publicKey: Buffer, signature: Buffer, sighashType: any): this;
}
interface PsbtOptsOptional {
network?: Network;
3 changes: 3 additions & 0 deletions src/assets/images/icon_inheritance_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/assets/images/icon_whirlpool_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions src/components/Animations/ScaleSpring.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import React from 'react';
import Animated, { useAnimatedStyle, useSharedValue, withSpring } from 'react-native-reanimated';
import { Gesture, GestureDetector } from 'react-native-gesture-handler';

const ScaleSpring = ({ children }) => {
const initialScale = 1;
const scale = useSharedValue(initialScale);
const animatedStyles = useAnimatedStyle(() => ({
transform: [{ scale: scale.value }],
flex: 1,
justifyContent: 'center',
}));

const tap = Gesture.Tap()
.onTouchesDown(() => {
scale.value = withSpring(0.6);
})
.onTouchesUp(() => {
scale.value = withSpring(1);
});

return (
<GestureDetector gesture={tap}>
<Animated.View style={animatedStyles}>{children}</Animated.View>
</GestureDetector>
);
};

export default ScaleSpring;
23 changes: 13 additions & 10 deletions src/components/AppNumPad/KeyPadButton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { StyleSheet, TouchableOpacity } from 'react-native';
import React from 'react';
import Text from 'src/components/KeeperText';
import ScaleSpring from '../Animations/ScaleSpring';

export interface Props {
title: string;
Expand All @@ -9,16 +10,18 @@ export interface Props {
}
const KeyPadButton: React.FC<Props> = ({ title, onPressNumber, keyColor }: Props) => {
return (
<TouchableOpacity
activeOpacity={1}
onPress={() => onPressNumber(title)}
style={styles.keyPadElementTouchable}
testID={`key_${title}`}
>
<Text style={styles.keyPadElementText} color={keyColor}>
{title}
</Text>
</TouchableOpacity>
<ScaleSpring>
<TouchableOpacity
activeOpacity={1}
onPress={() => onPressNumber(title)}
style={styles.keyPadElementTouchable}
testID={`key_${title}`}
>
<Text style={styles.keyPadElementText} color={keyColor}>
{title}
</Text>
</TouchableOpacity>
</ScaleSpring>
);
};
const styles = StyleSheet.create({
Expand Down
Loading

0 comments on commit 6614fc7

Please sign in to comment.