Skip to content

Commit

Permalink
Feature Multi Asset Tx (#2370)
Browse files Browse the repository at this point in the history
  • Loading branch information
stackchain committed Apr 4, 2023
1 parent 9cf95af commit 14b9d67
Show file tree
Hide file tree
Showing 101 changed files with 3,013 additions and 1,737 deletions.
14 changes: 9 additions & 5 deletions .storybook/storybook.requires.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const getStories = () => {
"./src/auth/PinLoginScreen/PinLoginScreen.stories.tsx": require("../src/auth/PinLoginScreen/PinLoginScreen.stories.tsx"),
"./src/Catalyst/VotingBanner.stories.tsx": require("../src/Catalyst/VotingBanner.stories.tsx"),
"./src/Catalyst/VotingRegistration.stories.tsx": require("../src/Catalyst/VotingRegistration.stories.tsx"),
"./src/components/AssetItem/AssetItem.stories.tsx": require("../src/components/AssetItem/AssetItem.stories.tsx"),
"./src/components/AmountItem/AmountItem.stories.tsx": require("../src/components/AmountItem/AmountItem.stories.tsx"),
"./src/components/Boundary/Boundary.stories.tsx": require("../src/components/Boundary/Boundary.stories.tsx"),
"./src/components/Button/Button.stories.tsx": require("../src/components/Button/Button.stories.tsx"),
"./src/components/Checkbox/Checkbox.stories.tsx": require("../src/components/Checkbox/Checkbox.stories.tsx"),
Expand Down Expand Up @@ -95,6 +95,14 @@ const getStories = () => {
"./src/Dashboard/WithdrawStakingRewards/ConfirmTx/ConfirmTxWithPassword.stories.tsx": require("../src/Dashboard/WithdrawStakingRewards/ConfirmTx/ConfirmTxWithPassword.stories.tsx"),
"./src/Dashboard/WithdrawStakingRewards/TransferSummary/TransferSummary.stories.tsx": require("../src/Dashboard/WithdrawStakingRewards/TransferSummary/TransferSummary.stories.tsx"),
"./src/Dashboard/WithdrawStakingRewards/WithdrawStakingRewards.stories.tsx": require("../src/Dashboard/WithdrawStakingRewards/WithdrawStakingRewards.stories.tsx"),
"./src/features/Send/useCases/ConfirmTx/ConfirmTxScreen.stories.tsx": require("../src/features/Send/useCases/ConfirmTx/ConfirmTxScreen.stories.tsx"),
"./src/features/Send/useCases/ListAmountsToSend/AddToken/AddToken.stories.tsx": require("../src/features/Send/useCases/ListAmountsToSend/AddToken/AddToken.stories.tsx"),
"./src/features/Send/useCases/ListAmountsToSend/AddToken/SelectTokenFromListScreen.stories.tsx": require("../src/features/Send/useCases/ListAmountsToSend/AddToken/SelectTokenFromListScreen.stories.tsx"),
"./src/features/Send/useCases/ListAmountsToSend/AddToken/ShowError/MaxTokensPerTx.stories.tsx": require("../src/features/Send/useCases/ListAmountsToSend/AddToken/ShowError/MaxTokensPerTx.stories.tsx"),
"./src/features/Send/useCases/ListAmountsToSend/EditAmount/EditAmountScreen.stories.tsx": require("../src/features/Send/useCases/ListAmountsToSend/EditAmount/EditAmountScreen.stories.tsx"),
"./src/features/Send/useCases/ListAmountsToSend/ListAmountsToSendScreen.stories.tsx": require("../src/features/Send/useCases/ListAmountsToSend/ListAmountsToSendScreen.stories.tsx"),
"./src/features/Send/useCases/StartMultiTokenTx/InputReceiver/ReadQRCodeScreen.stories.tsx": require("../src/features/Send/useCases/StartMultiTokenTx/InputReceiver/ReadQRCodeScreen.stories.tsx"),
"./src/features/Send/useCases/StartMultiTokenTx/StartMultiTokenTxScreen.stories.tsx": require("../src/features/Send/useCases/StartMultiTokenTx/StartMultiTokenTxScreen.stories.tsx"),
"./src/FirstRun/LanguagePickerScreen/LanguagePickerScreen.stories.tsx": require("../src/FirstRun/LanguagePickerScreen/LanguagePickerScreen.stories.tsx"),
"./src/FirstRun/TermsOfServiceScreen/TermsOfServiceScreen.stories.tsx": require("../src/FirstRun/TermsOfServiceScreen/TermsOfServiceScreen.stories.tsx"),
"./src/HW/Instructions/Instructions.stories.tsx": require("../src/HW/Instructions/Instructions.stories.tsx"),
Expand All @@ -112,10 +120,6 @@ const getStories = () => {
"./src/Receive/ReceiveScreen.stories.tsx": require("../src/Receive/ReceiveScreen.stories.tsx"),
"./src/Search/SearchBar.stories.tsx": require("../src/Search/SearchBar.stories.tsx"),
"./src/SelectedWallet/WalletSelection/WalletSelectionScreen.stories.tsx": require("../src/SelectedWallet/WalletSelection/WalletSelectionScreen.stories.tsx"),
"./src/Send/AddressReaderQR/AddressReaderQR.stories.tsx": require("../src/Send/AddressReaderQR/AddressReaderQR.stories.tsx"),
"./src/Send/AssetSelectorScreen/AssetSelectorScreen.stories.tsx": require("../src/Send/AssetSelectorScreen/AssetSelectorScreen.stories.tsx"),
"./src/Send/ConfirmScreen/ConfirmScreen.stories.tsx": require("../src/Send/ConfirmScreen/ConfirmScreen.stories.tsx"),
"./src/Send/SendScreen/SendScreen.stories.tsx": require("../src/Send/SendScreen/SendScreen.stories.tsx"),
"./src/Settings/ApplicationSettings/ApplicationSettingsScreen.stories.tsx": require("../src/Settings/ApplicationSettings/ApplicationSettingsScreen.stories.tsx"),
"./src/Settings/ChangeLanguage/ChangeLanguageScreen.stories.tsx": require("../src/Settings/ChangeLanguage/ChangeLanguageScreen.stories.tsx"),
"./src/Settings/ChangePassword/ChangePasswordScreen.stories.tsx": require("../src/Settings/ChangePassword/ChangePasswordScreen.stories.tsx"),
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ android {
applicationId "com.emurgo"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 371
versionName "4.9.4"
versionCode 375
versionName "4.10.0"
ndk {
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
}
Expand Down
2 changes: 1 addition & 1 deletion ios/Nightly-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<key>NSLocationAlwaysUsageDescription</key>
<string>One of the software dependencies of Yoroi mobile requires this permission, but Emurgo does not use neither store this information</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Enable location usage</string>
<string>Enable location usage, it is required by some HWs along with Bluetooth</string>
<key>NSMotionUsageDescription</key>
<string>Enable motion usage</string>
<key>NSPhotoLibraryUsageDescription</key>
Expand Down
48 changes: 24 additions & 24 deletions ios/emurgo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,7 @@
BUNDLE_ID_SUFFIX = "";
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CURRENT_PROJECT_VERSION = 424;
CURRENT_PROJECT_VERSION = 431;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = F8NVT2G2L4;
ENABLE_BITCODE = NO;
Expand All @@ -1261,7 +1261,7 @@
INFOPLIST_PREPROCESS = NO;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 4.9.4;
MARKETING_VERSION = 4.10.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand All @@ -1287,7 +1287,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 424;
CURRENT_PROJECT_VERSION = 431;
DEVELOPMENT_TEAM = F8NVT2G2L4;
ENABLE_BITCODE = NO;
HEADER_SEARCH_PATHS = (
Expand All @@ -1310,7 +1310,7 @@
INFOPLIST_PREPROCESS = NO;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 4.9.4;
MARKETING_VERSION = 4.10.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand All @@ -1333,7 +1333,7 @@
BUNDLE_DISPLAY_NAME = Yoroi;
BUNDLE_ID_SUFFIX = "";
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 424;
CURRENT_PROJECT_VERSION = 431;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = F8NVT2G2L4;
ENABLE_BITCODE = NO;
Expand Down Expand Up @@ -1361,7 +1361,7 @@
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
MARKETING_VERSION = 4.9.4;
MARKETING_VERSION = 4.10.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand All @@ -1384,7 +1384,7 @@
BUNDLE_DISPLAY_NAME = "Yoroi Staging";
BUNDLE_ID_SUFFIX = .staging;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 424;
CURRENT_PROJECT_VERSION = 431;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = F8NVT2G2L4;
ENABLE_BITCODE = NO;
Expand Down Expand Up @@ -1412,7 +1412,7 @@
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
MARKETING_VERSION = 4.9.4;
MARKETING_VERSION = 4.10.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand All @@ -1437,7 +1437,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 424;
CURRENT_PROJECT_VERSION = 431;
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
HEADER_SEARCH_PATHS = (
Expand All @@ -1464,7 +1464,7 @@
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
MARKETING_VERSION = 4.9.4;
MARKETING_VERSION = 4.10.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand All @@ -1487,7 +1487,7 @@
BUNDLE_DISPLAY_NAME = "Yoroi Staging";
BUNDLE_ID_SUFFIX = .staging;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 424;
CURRENT_PROJECT_VERSION = 431;
DEVELOPMENT_TEAM = F8NVT2G2L4;
ENABLE_BITCODE = NO;
HEADER_SEARCH_PATHS = (
Expand All @@ -1514,7 +1514,7 @@
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
MARKETING_VERSION = 4.9.4;
MARKETING_VERSION = 4.10.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -1723,7 +1723,7 @@
BUNDLE_ID_SUFFIX = .staging;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CURRENT_PROJECT_VERSION = 424;
CURRENT_PROJECT_VERSION = 431;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = F8NVT2G2L4;
ENABLE_BITCODE = NO;
Expand All @@ -1747,7 +1747,7 @@
INFOPLIST_PREPROCESS = NO;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 4.9.4;
MARKETING_VERSION = 4.10.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -1871,7 +1871,7 @@
BUNDLE_ID_SUFFIX = .staging;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CURRENT_PROJECT_VERSION = 424;
CURRENT_PROJECT_VERSION = 431;
DEVELOPMENT_TEAM = F8NVT2G2L4;
ENABLE_BITCODE = NO;
HEADER_SEARCH_PATHS = (
Expand All @@ -1894,7 +1894,7 @@
INFOPLIST_PREPROCESS = NO;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 4.9.4;
MARKETING_VERSION = 4.10.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -1956,7 +1956,7 @@
BUNDLE_ID_SUFFIX = "";
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CURRENT_PROJECT_VERSION = 424;
CURRENT_PROJECT_VERSION = 431;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = F8NVT2G2L4;
ENABLE_BITCODE = NO;
Expand All @@ -1980,7 +1980,7 @@
INFOPLIST_PREPROCESS = NO;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 4.9.4;
MARKETING_VERSION = 4.10.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand All @@ -2005,7 +2005,7 @@
BUNDLE_ID_SUFFIX = .staging;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CURRENT_PROJECT_VERSION = 424;
CURRENT_PROJECT_VERSION = 431;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = F8NVT2G2L4;
ENABLE_BITCODE = NO;
Expand All @@ -2029,7 +2029,7 @@
INFOPLIST_PREPROCESS = NO;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 4.9.4;
MARKETING_VERSION = 4.10.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand All @@ -2055,7 +2055,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 424;
CURRENT_PROJECT_VERSION = 431;
DEVELOPMENT_TEAM = F8NVT2G2L4;
ENABLE_BITCODE = NO;
HEADER_SEARCH_PATHS = (
Expand All @@ -2078,7 +2078,7 @@
INFOPLIST_PREPROCESS = NO;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 4.9.4;
MARKETING_VERSION = 4.10.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand All @@ -2102,7 +2102,7 @@
BUNDLE_ID_SUFFIX = .staging;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CURRENT_PROJECT_VERSION = 424;
CURRENT_PROJECT_VERSION = 431;
DEVELOPMENT_TEAM = F8NVT2G2L4;
ENABLE_BITCODE = NO;
HEADER_SEARCH_PATHS = (
Expand All @@ -2125,7 +2125,7 @@
INFOPLIST_PREPROCESS = NO;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 4.9.4;
MARKETING_VERSION = 4.10.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down
8 changes: 3 additions & 5 deletions ios/emurgo/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key></key>
<string></string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
Expand Down Expand Up @@ -46,7 +44,7 @@
<key>NSBluetoothAlwaysUsageDescription</key>
<string>Yoroi Mobile needs to access Bluetooth in order to be able to pair with hardware wallets that support this feature</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>Enable bluetooth usage</string>
<string>Enable bluetooth usage to connect with HWs.</string>
<key>NSCalendarsUsageDescription</key>
<string>Enable calendars usage</string>
<key>NSCameraUsageDescription</key>
Expand All @@ -56,11 +54,11 @@
<key>NSLocationAlwaysUsageDescription</key>
<string>One of the software dependencies of Yoroi mobile requires this permission, but Emurgo does not use neither store this information</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Enable location usage</string>
<string>Enable location usage, we use it along with Bluetooth, some HWs require it</string>
<key>NSMotionUsageDescription</key>
<string>Enable motion usage</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Enable photo library</string>
<string>Enable photo library, it will allow you to save your tokens in your phone</string>
<key>NSSpeechRecognitionUsageDescription</key>
<string>Enable speech recognition</string>
<key>RCTAsyncStorageExcludeFromBackup</key>
Expand Down
13 changes: 0 additions & 13 deletions jestSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,6 @@ jest.mock('react-native-reanimated', () => {
Reanimated.default.call = () => {}
return Reanimated
})
jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper')
jest.mock('react-native', () => {
const RN = jest.requireActual('react-native')

RN.NativeModules.SettingsManager = {
settings: {
AppLocale: true,
AppleLanguages: ['en-US'],
},
}

return RN
})

Logger.setLogLevel(LogLevel.Nothing)
YoroiLogging.Logger.setLogLevel(YoroiLogging.LogLevel.Nothing)
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,8 @@
"setupFiles": [
"<rootDir>/jestSetup.ts"
],
"transform": {
"^.+\\.(js)$": "babel-jest",
"\\.(ts|tsx)$": "ts-jest"
},
"transformIgnorePatterns": [
"node_modules/(?!(@react-native|react-native|react-native-iphone-x-helper|react-native-color-picker)/)"
"node_modules/(?!(jest-)?(@react-native|react-native|react-native-iphone-x-helper|react-native-color-picker)/)"
]
},
"resolutions": {
Expand Down Expand Up @@ -194,6 +190,7 @@
"@storybook/addon-ondevice-controls": "6.5.0-rc.0",
"@storybook/addon-ondevice-knobs": "^5.3.26",
"@storybook/react-native": "6.5.0-rc.0",
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/react-native": "^9.0.0",
"@types/bluebird": "^3.5.37",
"@types/chai": "^4.3.4",
Expand Down

0 comments on commit 14b9d67

Please sign in to comment.