Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use published bifold #1647

Merged
merged 20 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/actions/update-ledgers/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ runs:
ls -lah ledgers.json
# note md5
shasum ledgers.json
shasum bifold/packages/legacy/core/configs/ledgers/indy/ledgers.json
shasum bifold/packages/legacy/core/App/configs/ledgers/indy/ledgers.json

mv ledgers.json bifold/packages/legacy/core/configs/ledgers/indy/ledgers.json
shasum bifold/packages/legacy/core/configs/ledgers/indy/ledgers.json
mv ledgers.json bifold/packages/legacy/core/App/configs/ledgers/indy/ledgers.json
shasum bifold/packages/legacy/core/App/configs/ledgers/indy/ledgers.json
3 changes: 2 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "bifold"]
path = bifold
url = https://github.com/hyperledger/aries-mobile-agent-react-native.git
branch = publish_core
url = https://github.com/cvarjao/aries-mobile-agent-react-native.git
4 changes: 2 additions & 2 deletions app/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { useNavigation } from '@react-navigation/native'
import {
Stacks,
Screens,
Expand All @@ -16,7 +15,8 @@ import {
ConfigurationProvider,
initLanguages,
testIdWithKey,
} from 'aries-bifold'
} from '@hyperledger/aries-bifold-core'
import { useNavigation } from '@react-navigation/native'
import React, { useEffect, useState, useMemo } from 'react'
import { useTranslation } from 'react-i18next'
import { Linking, StatusBar } from 'react-native'
Expand Down
2 changes: 1 addition & 1 deletion app/AppStorybook.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { initLanguages } from 'aries-bifold'
import { initLanguages } from '@hyperledger/aries-bifold-core'
import React from 'react'
import { LogBox } from 'react-native'

Expand Down
10 changes: 8 additions & 2 deletions app/ios/AriesBifold.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,10 @@
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
OTHER_LDFLAGS = "$(inherited) ";
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
};
Expand Down Expand Up @@ -729,7 +732,10 @@
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
OTHER_LDFLAGS = "$(inherited) ";
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
Expand Down
46 changes: 11 additions & 35 deletions app/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ PODS:
- React-jsinspector (0.72.5)
- React-logger (0.72.5):
- glog
- "react-native-attestation (1.0.0-alpha.130+374b6166)":
- "react-native-attestation (1.0.0-alpha.150+a6ed6916)":
- RCT-Folly (= 2021.07.22.00)
- React-Core
- react-native-camera (3.44.3):
Expand All @@ -464,7 +464,7 @@ PODS:
- React-Core
- react-native-get-random-values (1.8.0):
- React-Core
- react-native-netinfo (9.4.1):
- react-native-netinfo (9.5.0):
- React-Core
- react-native-safe-area-context (3.4.1):
- React-Core
Expand Down Expand Up @@ -613,41 +613,17 @@ PODS:
- React-Core
- RNPermissions (3.9.0):
- React-Core
- RNReanimated (3.5.4):
- DoubleConversion
- FBLazyVector
- glog
- hermes-engine
- RCT-Folly
- RCTRequired
- RCTTypeSafety
- React-callinvoker
- RNReanimated (3.6.1):
- RCT-Folly (= 2021.07.22.00)
- React-Core
- React-Core/DevSupport
- React-Core/RCTWebSocket
- React-CoreModules
- React-cxxreact
- React-hermes
- React-jsi
- React-jsiexecutor
- React-jsinspector
- React-RCTActionSheet
- React-RCTAnimation
- React-RCTAppDelegate
- React-RCTBlob
- React-RCTImage
- React-RCTLinking
- React-RCTNetwork
- React-RCTSettings
- React-RCTText
- ReactCommon/turbomodule/core
- Yoga
- RNScreens (3.25.0):
- React-Core
- React-RCTImage
- RNSVG (12.5.1):
- React-Core
- RNVectorIcons (10.0.0):
- RNVectorIcons (10.0.2):
- RCT-Folly (= 2021.07.22.00)
- React-Core
- SocketRocket (0.6.1)
- Yoga (1.14.0)
Expand Down Expand Up @@ -928,12 +904,12 @@ SPEC CHECKSUMS:
React-jsiexecutor: ff70a72027dea5cc7d71cfcc6fad7f599f63987a
React-jsinspector: aef73cbd43b70675f572214d10fa438c89bf11ba
React-logger: 2e4aee3e11b3ec4fa6cfd8004610bbb3b8d6cca4
react-native-attestation: 1934de33bee417356a58859742139c149580f286
react-native-attestation: 57700aa836afdbbc2fac97612db6d934095fdf5c
react-native-camera: b8cc03e2feec0c04403d0998e37cf519d8fd4c6f
react-native-config: 5330c8258265c1e5fdb8c009d2cabd6badd96727
react-native-encrypted-storage: db300a3f2f0aba1e818417c1c0a6be549038deb7
react-native-get-random-values: a6ea6a8a65dc93e96e24a11105b1a9c8cfe1d72a
react-native-netinfo: fefd4e98d75cbdd6e85fc530f7111a8afdf2b0c5
react-native-netinfo: 48c5f79a84fbc3ba1d28a8b0d04adeda72885fa8
react-native-safe-area-context: 9e40fb181dac02619414ba1294d6c2a807056ab9
react-native-splash-screen: 4312f786b13a81b5169ef346d76d33bc0c6dc457
react-native-tcp-socket: e724380c910c2e704816ec817ed28f1342246ff7
Expand Down Expand Up @@ -967,13 +943,13 @@ SPEC CHECKSUMS:
RNKeychain: a65256b6ca6ba6976132cc4124b238a5b13b3d9c
RNLocalize: d4b8af4e442d4bcca54e68fc687a2129b4d71a81
RNPermissions: f5763a7aa5b1aae3b0c0546791b002e3048042bd
RNReanimated: ab2e96c6d5591c3dfbb38a464f54c8d17fb34a87
RNReanimated: fdbaa9c964bbab7fac50c90862b6cc5f041679b9
RNScreens: 85d3880b52d34db7b8eeebe2f1a0e807c05e69fa
RNSVG: d7d7bc8229af3842c9cfc3a723c815a52cdd1105
RNVectorIcons: 8b5bb0fa61d54cd2020af4f24a51841ce365c7e9
RNVectorIcons: 23b6e11af4aaf104d169b1b0afa7e5cf96c676ce
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
Yoga: 86fed2e4d425ee4c6eab3813ba1791101ee153c6

PODFILE CHECKSUM: 557ce83fddb4b3974ada332a9ba0251f0ffcc639

COCOAPODS: 1.13.0
COCOAPODS: 1.14.2
7 changes: 6 additions & 1 deletion app/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@ const escape = require('escape-string-regexp')
const exclusionList = require('metro-config/src/defaults/exclusionList')
require('dotenv').config()

const packageDirs = [fs.realpathSync(path.join(__dirname, 'node_modules', 'aries-bifold'))]
const packageDirs = [
fs.realpathSync(path.join(__dirname, 'node_modules', '@hyperledger/aries-oca')),
fs.realpathSync(path.join(__dirname, 'node_modules', '@hyperledger/aries-bifold-core')),
fs.realpathSync(path.join(__dirname, 'node_modules', '@hyperledger/aries-bifold-verifier')),
]

const watchFolders = [...packageDirs]

const extraExclusionlist = []
const extraNodeModules = {}

for (const packageDir of packageDirs) {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const pak = require(path.join(packageDir, 'package.json'))
const modules = Object.keys({
...pak.peerDependencies,
Expand Down
54 changes: 28 additions & 26 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@
"@formatjs/intl-relativetimeformat": "9.3.1",
"@hyperledger/anoncreds-react-native": "^0.1.0",
"@hyperledger/aries-askar-react-native": "^0.1.1",
"@hyperledger/aries-oca": "1.0.0-alpha.72",
"@hyperledger/aries-react-native-attestation": "1.0.0-alpha.130",
"@hyperledger/aries-bifold-core": "1.0.0-alpha.150",
"@hyperledger/aries-bifold-verifier": "1.0.0-alpha.150",
"@hyperledger/aries-oca": "1.0.0-alpha.150",
"@hyperledger/aries-react-native-attestation": "1.0.0-alpha.150",
"@hyperledger/indy-vdr-react-native": "^0.1.0",
"@react-native-async-storage/async-storage": "1.15.11",
"@react-native-community/masked-view": "0.1.11",
Expand All @@ -72,33 +74,32 @@
"@react-navigation/devtools": "6.0.18",
"@react-navigation/native": "6.0.6",
"@react-navigation/stack": "6.0.11",
"aries-bifold": "workspace:^",
"axios": "^0.21.0",
"axios": "^1.4.0",
"i18next": "^21.10.0",
"lodash.flatten": "^4.4.0",
"lodash.merge": "^4.6.2",
"lodash.startcase": "^4.4.0",
"moment": "^2.29.4",
"query-string": "^7.0.1",
"react": "^18.2.0",
"react-i18next": "11.13.0",
"react-native": "^0.72.4",
"react": "*",
"react-i18next": "11.18.6",
"react-native": "*",
"react-native-animated-pagination-dots": "^0.1.72",
"react-native-argon2": "^2.0.1",
"react-native-bouncy-checkbox": "^3.0.5",
"react-native-camera": "^3.31.1",
"react-native-collapsible": "^1.6.0",
"react-native-collapsible": "^1.6.1",
"react-native-config": "1.5.0",
"react-native-confirmation-code-field": "^7.3.0",
"react-native-device-info": "^8.4.9",
"react-native-encrypted-storage": "^4.0.2",
"react-native-fs": "^2.16.6",
"react-native-gesture-handler": "^1.10.3",
"react-native-get-random-values": "1.8.0",
"react-native-gifted-chat": "^2.4.0",
"react-native-gifted-chat": "*",
"react-native-inappbrowser-reborn": "^3.7.0",
"react-native-keychain": "^8.1.1",
"react-native-localize": "^2.1.5",
"react-native-localize": "^2.2.4",
"react-native-permissions": "3.9.0",
"react-native-qrcode-svg": "^6.2.0",
"react-native-reanimated": "^3.4.2",
Expand All @@ -112,7 +113,8 @@
"react-native-uuid": "^2.0.1",
"react-native-vector-icons": "^10.0.0",
"react-native-webview": "^11.22.3",
"uuid": "9.0.0"
"reflect-metadata": "^0.1.13",
"uuid": "^9.0.0"
},
"devDependencies": {
"@babel/core": "7.22.1",
Expand All @@ -128,37 +130,37 @@
"@storybook/addon-ondevice-knobs": "^5.3.26",
"@storybook/react-native": "^5.3.25",
"@storybook/react-native-server": "^5.3.23",
"@testing-library/jest-native": "5.4.3",
"@testing-library/react-native": "12.3.0",
"@testing-library/jest-native": "^5.4.3",
"@testing-library/react-native": "^12.3.0",
"@tsconfig/react-native": "^3.0.0",
"@types/jest": "^27.4.0",
"@types/jest": "^29.5.5",
"@types/lodash.flatten": "^4.4.6",
"@types/lodash.merge": "^4.6.6",
"@types/lodash.startcase": "^4.4.6",
"@types/lodash.startcase": "^4.4.7",
"@types/react": "18.2.21",
"@types/react-native": "0.63.53",
"@types/react-native": "0.72.3",
"@types/react-native-vector-icons": "^6.4.12",
"@types/react-test-renderer": "18.0.1",
"@typescript-eslint/eslint-plugin": "6.6.0",
"@typescript-eslint/parser": "6.6.0",
"@types/react-test-renderer": "^18.0.1",
"@typescript-eslint/eslint-plugin": "^6.6.0",
"@typescript-eslint/parser": "^6.6.0",
"babel-jest": "^27.5.1",
"babel-plugin-module-resolver": "^5.0.0",
"commitlint": "17.7.1",
"commitlint": "^17.7.1",
"copyfiles": "^2.4.1",
"eslint": "8.48.0",
"eslint": "^8.48.0",
"eslint-import-resolver-typescript": "^2.5.0",
"eslint-plugin-import": "2.28.1",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-prettier": "^4.0.0",
"husky": "^7.0.0",
"jest": "29.6.4",
"jest": "^29.6.4",
"lint-staged": "^11.2.6",
"metro-react-native-babel-preset": "^0.77.0",
"mockdate": "^3.0.5",
"pod-install": "0.1.38",
"prettier": "2.8.7",
"react-dom": "^18.2.0",
"react-native-svg-transformer": "^0.14.3",
"react-test-renderer": "18.2.0",
"typescript": "4.9.5"
"react-test-renderer": "^18.2.0",
"typescript": "^5.0.4"
}
}
4 changes: 2 additions & 2 deletions app/src/components/AddCredentialButton.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { testIdWithKey, HeaderButton, ButtonLocation } from 'aries-bifold'
import { testIdWithKey, HeaderButton, ButtonLocation } from '@hyperledger/aries-bifold-core'
import React, { useCallback } from 'react'
import { useTranslation } from 'react-i18next'
import { DeviceEventEmitter } from 'react-native'

import { BCWalletEventTypes } from '../events/eventTypes'

const AddCredentialButton: React.FC = () => {
const AddCredentialButton = () => {
const { t } = useTranslation()

const activateSlider = useCallback(() => {
Expand Down
6 changes: 2 additions & 4 deletions app/src/components/AddCredentialSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { AnonCredsCredentialMetadataKey } from '@aries-framework/anoncreds/build
import { CredentialState } from '@aries-framework/core'
import { useCredentialByState } from '@aries-framework/react-hooks'
import { useNavigation } from '@react-navigation/native'
import { useTheme, Screens, Stacks, testIdWithKey, testIdForAccessabilityLabel } from 'aries-bifold'
import { useTheme, Screens, Stacks, testIdWithKey } from '@hyperledger/aries-bifold-core'
import React, { useEffect, useState, useCallback } from 'react'
import { useTranslation } from 'react-i18next'
import { DeviceEventEmitter, Modal, StyleSheet, Text, TouchableOpacity, View } from 'react-native'
Expand All @@ -12,7 +12,7 @@ import { hitSlop } from '../constants'
import { BCWalletEventTypes } from '../events/eventTypes'
import { showBCIDSelector } from '../helpers/BCIDHelper'

const AddCredentialSlider: React.FC = () => {
export default function AddCredentialSlider() {
const { ColorPallet, TextTheme } = useTheme()
const navigation = useNavigation()
const { t } = useTranslation()
Expand Down Expand Up @@ -146,5 +146,3 @@ const AddCredentialSlider: React.FC = () => {
</Modal>
)
}

export default AddCredentialSlider
4 changes: 2 additions & 2 deletions app/src/components/EmptyList.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useTheme, testIdWithKey, Button, ButtonType } from 'aries-bifold'
import { useTheme, testIdWithKey, Button, ButtonType } from '@hyperledger/aries-bifold-core'
import React, { useCallback, useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { Text, View, DeviceEventEmitter } from 'react-native'
Expand All @@ -9,7 +9,7 @@ export interface EmptyListProps {
message?: string
}

const EmptyList: React.FC<EmptyListProps> = ({ message }) => {
const EmptyList = ({ message }: EmptyListProps) => {
const { t } = useTranslation()
const { ListItems } = useTheme()
const [addCredentialPressed, setAddCredentialPressed] = useState<boolean>(false)
Expand Down
4 changes: 2 additions & 2 deletions app/src/components/HomeFooterView.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, ButtonType, testIdWithKey, useTheme } from 'aries-bifold'
import { Button, ButtonType, testIdWithKey, useTheme } from '@hyperledger/aries-bifold-core'
import React, { PropsWithChildren, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { StyleSheet, View } from 'react-native'
Expand All @@ -9,7 +9,7 @@ import WebDisplay from '../screens/WebDisplay'

interface HomeFooterViewProps extends PropsWithChildren {}

const HomeFooterView: React.FC<HomeFooterViewProps> = ({ children }) => {
const HomeFooterView = ({ children }: HomeFooterViewProps) => {
const { ColorPallet } = useTheme()
const { t } = useTranslation()
const [surveyVisible, setSurveyVisible] = useState(false)
Expand Down
16 changes: 8 additions & 8 deletions app/src/components/LoadingIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useRef } from 'react'
import React, { ReactNode, useEffect, useRef } from 'react'
import { Animated } from 'react-native'
import Icon from 'react-native-vector-icons/MaterialIcons'

Expand All @@ -8,7 +8,7 @@ interface LoadingIconProps {
active: boolean
}

const LoadingIcon: React.FC<LoadingIconProps> = ({ size, color, active }) => {
export default function LoadingIcon({ size, color, active }: LoadingIconProps) {
const rotationAnim = useRef(new Animated.Value(0)).current
const timing: Animated.TimingAnimationConfig = {
toValue: 1,
Expand All @@ -32,10 +32,10 @@ const LoadingIcon: React.FC<LoadingIconProps> = ({ size, color, active }) => {
}, [rotationAnim, active])

return (
<Animated.View style={[{ transform: [{ rotate: rotation }] }]}>
<Icon style={{ color }} size={size} name="refresh" />
</Animated.View>
)
<>
<Animated.View style={[{ transform: [{ rotate: rotation }] }]}>
<Icon style={{ color }} size={size} name="refresh" />
</Animated.View>
</>
) as ReactNode
}

export default LoadingIcon
Loading
Loading