From 1c95698868eb161d6784b4080149ef1a1c0dbf2a Mon Sep 17 00:00:00 2001 From: Dmitriy Kudasov Date: Tue, 5 Nov 2024 12:39:49 +0300 Subject: [PATCH 1/2] feat(HW-882): Tokens re-design --- ios/Podfile.lock | 4 +- ios/haqq.xcodeproj/project.pbxproj | 156 +++++++++--------- src/components/token/index.ts | 3 + src/components/token/token-icon.tsx | 58 +++++++ src/components/{ => token}/token-row.tsx | 65 ++------ src/components/token/token.types.ts | 11 ++ .../transaction-select-crypto.tsx | 2 +- src/components/ui/walletCard.tsx | 2 +- src/widgets/tokens-widget/tokens-widget.tsx | 2 +- 9 files changed, 172 insertions(+), 131 deletions(-) create mode 100644 src/components/token/index.ts create mode 100644 src/components/token/token-icon.tsx rename src/components/{ => token}/token-row.tsx (62%) create mode 100644 src/components/token/token.types.ts diff --git a/ios/Podfile.lock b/ios/Podfile.lock index bb0b1e47d..1b99cefb6 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -2206,6 +2206,6 @@ SPEC CHECKSUMS: TouchID: ba4c656d849cceabc2e4eef722dea5e55959ecf4 Yoga: 56f906bf6c11c931588191dde1229fd3e4e3d557 -PODFILE CHECKSUM: 52665c877139302d5687297f4fb78d5548aef897 +PODFILE CHECKSUM: a0b5412525441266d56cc6d538e451975fe5f8fd -COCOAPODS: 1.15.2 +COCOAPODS: 1.16.2 diff --git a/ios/haqq.xcodeproj/project.pbxproj b/ios/haqq.xcodeproj/project.pbxproj index c24aca2e3..d310c3e5e 100644 --- a/ios/haqq.xcodeproj/project.pbxproj +++ b/ios/haqq.xcodeproj/project.pbxproj @@ -113,7 +113,6 @@ 848BA91E31A7480AB27FF413 /* question-circle@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 189C4904319D4B4B92D30F92 /* question-circle@3x.png */; }; 85E721127B3A42C38D95045A /* keystone-connect-frame-dark@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 08B5271DE0374A4D92FA59D6 /* keystone-connect-frame-dark@2x.png */; }; 863D4EB3A14043B1A47D1306 /* keplr-mobile-provider.js in Resources */ = {isa = PBXBuildFile; fileRef = B471E62250F04D52853D7404 /* keplr-mobile-provider.js */; }; - 87971FCFD96B6711143164CE /* libPods-haqq.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CE8D6596185A98D7B35C299 /* libPods-haqq.a */; }; 8799854AD253405E84309D53 /* card-rhombus-0@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4184D848D8434D3AAA82ACBF /* card-rhombus-0@2x.png */; }; 87D7939DF43045B3AD6F0893 /* keystone-connect-frame-light@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 735E38B239494D5290D6D37B /* keystone-connect-frame-light@3x.png */; }; 8C2041B134A2414AB1A2C059 /* browser-error-light.png in Resources */ = {isa = PBXBuildFile; fileRef = 2FB0F0A6B52E40B0AD9B9AC7 /* browser-error-light.png */; }; @@ -124,7 +123,6 @@ 91087BE8FCD245CCA83E51D0 /* mnemonic-notify@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1F07DE85536A472686AD07FB /* mnemonic-notify@2x.png */; }; 941CE4BDD559403887607456 /* bluetooth-powered-off@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1FE6B84566F34C3DA53DEDC2 /* bluetooth-powered-off@3x.png */; }; 942EE8D6E62E4C45BB5CDEDB /* ledger-no-app@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = E796C0D2F7154FA79827B16B /* ledger-no-app@3x.png */; }; - 94B606042B0BE2C9DA12FB49 /* libPods-haqq-haqqTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C07560CAB5B111438A82FB8A /* libPods-haqq-haqqTests.a */; }; 961ED31473BF4F118F5C3058 /* cloud-share-not-found@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = FBB0C3BF5C2A4B78943EF9E8 /* cloud-share-not-found@2x.png */; }; 98778A6093D648358DC21931 /* empty-icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F505D25141474B55A9D927D4 /* empty-icon@2x.png */; }; 99163AAD98BB405A91DCC464 /* jailbreak@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = C11270485E834BB89DB0883E /* jailbreak@3x.png */; }; @@ -140,6 +138,7 @@ A9435B8B0B7844088B105769 /* keystone-connect-frame-light@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 8C089CE83A7848FEA5541D79 /* keystone-connect-frame-light@2x.png */; }; A945ED9A615A4B26BD37506A /* bluetooth-powered-off.png in Resources */ = {isa = PBXBuildFile; fileRef = 237ACC1D53D140F093CE4102 /* bluetooth-powered-off.png */; }; ADC1FE0F6E484E818CD3E8FF /* not-enough-gas@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4E5DD565E167498D902E04C1 /* not-enough-gas@2x.png */; }; + B053105202D72C6E61DC7998 /* libPods-haqq.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 285B26C3F4819E8F57A21CBB /* libPods-haqq.a */; }; B1C848DFEC054C57A6924022 /* islm-logo-circles.png in Resources */ = {isa = PBXBuildFile; fileRef = 7A298563846B40C29A7545AA /* islm-logo-circles.png */; }; B1D59AD9C87F48609E8EAA73 /* islm-logo-circles@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F67EF005450E4252B041D849 /* islm-logo-circles@2x.png */; }; B8BD5B16FE6B4016B8DEFDE8 /* empty-icon@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = F3B460985B544096BCA6FC11 /* empty-icon@3x.png */; }; @@ -179,6 +178,7 @@ E5221D7A336E4FAFB42E4C8B /* ElMessiri-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = FA5B2155656A4AB2B7EC267F /* ElMessiri-Bold.ttf */; }; ED7425B771ED45E9A51014FB /* banner_analytics.png in Resources */ = {isa = PBXBuildFile; fileRef = 164BC3E0578D429BB60C3882 /* banner_analytics.png */; }; F07D92E91EF24305A09BEFDF /* device-keystone.png in Resources */ = {isa = PBXBuildFile; fileRef = 66AB110367BD407BAE2DE26C /* device-keystone.png */; }; + F13FE11724B35AB8BD2CF29F /* libPods-haqq-haqqTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8D1FA4DE76EB464F6FBB2 /* libPods-haqq-haqqTests.a */; }; F41A63864BCF47DD814BEF2E /* browser-error-light@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = FC8CC85A55CE43F39713CA64 /* browser-error-light@3x.png */; }; F4B642A1C31E4DD89E09315D /* notification_bell.png in Resources */ = {isa = PBXBuildFile; fileRef = 4D2B28F21D2040AAB9338C37 /* notification_bell.png */; }; F57AEFB435FF4249932EF918 /* SF-ProText-Semibold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 83D5CEDEB17F4E46815F2308 /* SF-ProText-Semibold.ttf */; }; @@ -268,6 +268,7 @@ 22739AB14E6E413385C0ECE0 /* ElMessiri-SemiBold.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "ElMessiri-SemiBold.ttf"; path = "../assets/fonts/ElMessiri-SemiBold.ttf"; sourceTree = ""; }; 237ACC1D53D140F093CE4102 /* bluetooth-powered-off.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "bluetooth-powered-off.png"; path = "../assets/images/bluetooth-powered-off.png"; sourceTree = ""; }; 273D756B386048F4B413B149 /* earn-staking@3x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "earn-staking@3x.png"; path = "../assets/images/earn-staking@3x.png"; sourceTree = ""; }; + 285B26C3F4819E8F57A21CBB /* libPods-haqq.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-haqq.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 2AB210133DCA404DA5F3E8E2 /* question-square@3x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "question-square@3x.png"; path = "../assets/images/question-square@3x.png"; sourceTree = ""; }; 2B60B8662F784BFEBF43B5EA /* notification_bell@3x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "notification_bell@3x.png"; path = "../assets/images/notification_bell@3x.png"; sourceTree = ""; }; 2BE2B06FDD684F41AF889148 /* backup-sss-suggestion-light@2x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "backup-sss-suggestion-light@2x.png"; path = "../assets/images/backup-sss-suggestion-light@2x.png"; sourceTree = ""; }; @@ -290,7 +291,6 @@ 49EE537083EA4184BD2A0F81 /* jailbreak.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = jailbreak.png; path = ../assets/images/jailbreak.png; sourceTree = ""; }; 4AE4D86AC6E5411FA25294A4 /* signup-network-exists-warning.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "signup-network-exists-warning.png"; path = "../assets/images/signup-network-exists-warning.png"; sourceTree = ""; }; 4C4044E8C1BB4C39AA9FF56A /* ledger-locked@2x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "ledger-locked@2x.png"; path = "../assets/images/ledger-locked@2x.png"; sourceTree = ""; }; - 4CE8D6596185A98D7B35C299 /* libPods-haqq.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-haqq.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 4D2B28F21D2040AAB9338C37 /* notification_bell.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = notification_bell.png; path = ../assets/images/notification_bell.png; sourceTree = ""; }; 4E5DD565E167498D902E04C1 /* not-enough-gas@2x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "not-enough-gas@2x.png"; path = "../assets/images/not-enough-gas@2x.png"; sourceTree = ""; }; 4EC478ED7CF6446EB76CB24B /* question-circle@2x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "question-circle@2x.png"; path = "../assets/images/question-circle@2x.png"; sourceTree = ""; }; @@ -316,7 +316,6 @@ 73A58DCDF822452093CE5B04 /* sss-limit-reached@2x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "sss-limit-reached@2x.png"; path = "../assets/images/sss-limit-reached@2x.png"; sourceTree = ""; }; 79B587E186A44824BE2849C6 /* card-maks@3x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "card-maks@3x.png"; path = "../assets/images/card-maks@3x.png"; sourceTree = ""; }; 7A298563846B40C29A7545AA /* islm-logo-circles.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "islm-logo-circles.png"; path = "../assets/images/islm-logo-circles.png"; sourceTree = ""; }; - 7A536069F4D987850567872F /* Pods-haqq.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-haqq.debug.xcconfig"; path = "Target Support Files/Pods-haqq/Pods-haqq.debug.xcconfig"; sourceTree = ""; }; 7B77EA7E07E045F1BDA90E9A /* earn-staking.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "earn-staking.png"; path = "../assets/images/earn-staking.png"; sourceTree = ""; }; 7BEF18996B59450D86D7D658 /* backup-notification-dark@3x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "backup-notification-dark@3x.png"; path = "../assets/images/backup-notification-dark@3x.png"; sourceTree = ""; }; 7BF9048E79044981AE23D631 /* cloud-share-not-found.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "cloud-share-not-found.png"; path = "../assets/images/cloud-share-not-found.png"; sourceTree = ""; }; @@ -324,10 +323,10 @@ 7EE9E61AAF4045E78155DED7 /* backup-sss-suggestion-light@3x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "backup-sss-suggestion-light@3x.png"; path = "../assets/images/backup-sss-suggestion-light@3x.png"; sourceTree = ""; }; 7FB8A02FCF3F4824B4718B5B /* card-rhombus-0.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "card-rhombus-0.png"; path = "../assets/images/card-rhombus-0.png"; sourceTree = ""; }; 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = haqq/LaunchScreen.storyboard; sourceTree = ""; }; - 81ECBF5DF987D3421F0AD59E /* Pods-haqq-haqqTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-haqq-haqqTests.release.xcconfig"; path = "Target Support Files/Pods-haqq-haqqTests/Pods-haqq-haqqTests.release.xcconfig"; sourceTree = ""; }; 82C6D1926A6746FCBCFA7FAD /* none-nft@3x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "none-nft@3x.png"; path = "../assets/images/none-nft@3x.png"; sourceTree = ""; }; 83D5CEDEB17F4E46815F2308 /* SF-ProText-Semibold.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "SF-ProText-Semibold.ttf"; path = "../assets/fonts/SF-ProText-Semibold.ttf"; sourceTree = ""; }; 8437A65A0FC64FFB8169F071 /* exclamation-mark-error.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "exclamation-mark-error.png"; path = "../assets/images/exclamation-mark-error.png"; sourceTree = ""; }; + 88B99D627CE45D606D111BBC /* Pods-haqq-haqqTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-haqq-haqqTests.debug.xcconfig"; path = "Target Support Files/Pods-haqq-haqqTests/Pods-haqq-haqqTests.debug.xcconfig"; sourceTree = ""; }; 8AAA2041937743A185E4F569 /* backup-sss-suggestion-light.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "backup-sss-suggestion-light.png"; path = "../assets/images/backup-sss-suggestion-light.png"; sourceTree = ""; }; 8C089CE83A7848FEA5541D79 /* keystone-connect-frame-light@2x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "keystone-connect-frame-light@2x.png"; path = "../assets/images/keystone-connect-frame-light@2x.png"; sourceTree = ""; }; 8D52915C768145E4B5007D44 /* qr-logo@2x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "qr-logo@2x.png"; path = "../assets/images/qr-logo@2x.png"; sourceTree = ""; }; @@ -335,11 +334,11 @@ 8DB1E295007D40FE9D29C59B /* backup-sss-suggestion-dark@3x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "backup-sss-suggestion-dark@3x.png"; path = "../assets/images/backup-sss-suggestion-dark@3x.png"; sourceTree = ""; }; 8EB050BA08FE4CD4B4A767AD /* SF-Pro-Display-Regular.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "SF-Pro-Display-Regular.ttf"; path = "../assets/fonts/SF-Pro-Display-Regular.ttf"; sourceTree = ""; }; 916B6A1590F44B18A14B8CD8 /* keystone-connect-frame-light.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "keystone-connect-frame-light.png"; path = "../assets/images/keystone-connect-frame-light.png"; sourceTree = ""; }; - 93BFE01AA240AB33EF2F915C /* Pods-haqq-haqqTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-haqq-haqqTests.debug.xcconfig"; path = "Target Support Files/Pods-haqq-haqqTests/Pods-haqq-haqqTests.debug.xcconfig"; sourceTree = ""; }; 987D8832384445AF9BE931EA /* backup-notification-dark@2x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "backup-notification-dark@2x.png"; path = "../assets/images/backup-notification-dark@2x.png"; sourceTree = ""; }; 9E0A5095C2B34207A41D2E1A /* islm_icon@3x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "islm_icon@3x.png"; path = "../assets/images/islm_icon@3x.png"; sourceTree = ""; }; A007B4F4798B4E7483EFD10E /* banner_news.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = banner_news.png; path = ../assets/images/banner_news.png; sourceTree = ""; }; A0CE9DE44441445FB7391296 /* SF-ProText-Medium.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "SF-ProText-Medium.ttf"; path = "../assets/fonts/SF-ProText-Medium.ttf"; sourceTree = ""; }; + A13B0F486F2ABFB5BC4F0AAC /* Pods-haqq.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-haqq.release.xcconfig"; path = "Target Support Files/Pods-haqq/Pods-haqq.release.xcconfig"; sourceTree = ""; }; A43FD58137A7479AA8C921C8 /* bluetooth-failed@3x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "bluetooth-failed@3x.png"; path = "../assets/images/bluetooth-failed@3x.png"; sourceTree = ""; }; A5BB33BEC08B4160A80FB766 /* cloud-problems.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "cloud-problems.png"; path = "../assets/images/cloud-problems.png"; sourceTree = ""; }; A890E91D7B2A4DFC8F710543 /* keystone-connect-frame-dark.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "keystone-connect-frame-dark.png"; path = "../assets/images/keystone-connect-frame-dark.png"; sourceTree = ""; }; @@ -358,7 +357,6 @@ B9AB78E07FF446AE8E5724C1 /* islm_icon@2x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "islm_icon@2x.png"; path = "../assets/images/islm_icon@2x.png"; sourceTree = ""; }; BC1BF4D5F5414DB89C675767 /* card-circles-0@2x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "card-circles-0@2x.png"; path = "../assets/images/card-circles-0@2x.png"; sourceTree = ""; }; BE329D77ACC3497D9444B38D /* device-ledger@3x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "device-ledger@3x.png"; path = "../assets/images/device-ledger@3x.png"; sourceTree = ""; }; - C07560CAB5B111438A82FB8A /* libPods-haqq-haqqTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-haqq-haqqTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; C11270485E834BB89DB0883E /* jailbreak@3x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "jailbreak@3x.png"; path = "../assets/images/jailbreak@3x.png"; sourceTree = ""; }; C1CE33A4DDAE4C2E896D1116 /* device-ledger@2x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "device-ledger@2x.png"; path = "../assets/images/device-ledger@2x.png"; sourceTree = ""; }; C4ACC9802BA84429A4A812D3 /* domain-blocked-dark@2x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "domain-blocked-dark@2x.png"; path = "../assets/images/domain-blocked-dark@2x.png"; sourceTree = ""; }; @@ -375,6 +373,7 @@ DA46459589564DE9A99C6714 /* device-keystone@2x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "device-keystone@2x.png"; path = "../assets/images/device-keystone@2x.png"; sourceTree = ""; }; DBDD5FFECAD54C12A02056F3 /* browser-error-dark@3x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "browser-error-dark@3x.png"; path = "../assets/images/browser-error-dark@3x.png"; sourceTree = ""; }; DD4BF65C3D8F4812A58B909F /* SF-Pro-Display-Medium.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "SF-Pro-Display-Medium.ttf"; path = "../assets/fonts/SF-Pro-Display-Medium.ttf"; sourceTree = ""; }; + DF400650EFF97320B890E41E /* Pods-haqq.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-haqq.debug.xcconfig"; path = "Target Support Files/Pods-haqq/Pods-haqq.debug.xcconfig"; sourceTree = ""; }; E3503E8A5F9A48C48880B541 /* InpageBridgeWeb3.js */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = InpageBridgeWeb3.js; path = "../assets/custom/metamask-mobile-provider.js"; sourceTree = ""; }; E4889AA51BE54118AE456FE2 /* SF-Pro-Display-Thin.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "SF-Pro-Display-Thin.ttf"; path = "../assets/fonts/SF-Pro-Display-Thin.ttf"; sourceTree = ""; }; E796C0D2F7154FA79827B16B /* ledger-no-app@3x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "ledger-no-app@3x.png"; path = "../assets/images/ledger-no-app@3x.png"; sourceTree = ""; }; @@ -382,7 +381,6 @@ EA8F3914E00C46A4AE2D250E /* notification_bell@2x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "notification_bell@2x.png"; path = "../assets/images/notification_bell@2x.png"; sourceTree = ""; }; EC80240A1797434B88BCD560 /* sss-limit-reached.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "sss-limit-reached.png"; path = "../assets/images/sss-limit-reached.png"; sourceTree = ""; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; - ED97EE01E91BAA70245C5625 /* Pods-haqq.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-haqq.release.xcconfig"; path = "Target Support Files/Pods-haqq/Pods-haqq.release.xcconfig"; sourceTree = ""; }; EF5B6244A6FD49CB98807F7A /* bluetooth-unauthorized.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "bluetooth-unauthorized.png"; path = "../assets/images/bluetooth-unauthorized.png"; sourceTree = ""; }; F37033694B1E479BBD2FAFFD /* islm-logo-circles@3x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "islm-logo-circles@3x.png"; path = "../assets/images/islm-logo-circles@3x.png"; sourceTree = ""; }; F3B460985B544096BCA6FC11 /* empty-icon@3x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "empty-icon@3x.png"; path = "../assets/images/empty-icon@3x.png"; sourceTree = ""; }; @@ -393,6 +391,8 @@ FA5B2155656A4AB2B7EC267F /* ElMessiri-Bold.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "ElMessiri-Bold.ttf"; path = "../assets/fonts/ElMessiri-Bold.ttf"; sourceTree = ""; }; FBB0C3BF5C2A4B78943EF9E8 /* cloud-share-not-found@2x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "cloud-share-not-found@2x.png"; path = "../assets/images/cloud-share-not-found@2x.png"; sourceTree = ""; }; FC8CC85A55CE43F39713CA64 /* browser-error-light@3x.png */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "browser-error-light@3x.png"; path = "../assets/images/browser-error-light@3x.png"; sourceTree = ""; }; + FDA8D1FA4DE76EB464F6FBB2 /* libPods-haqq-haqqTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-haqq-haqqTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + FF721C358A74A71B32B822C8 /* Pods-haqq-haqqTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-haqq-haqqTests.release.xcconfig"; path = "Target Support Files/Pods-haqq-haqqTests/Pods-haqq-haqqTests.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -400,7 +400,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 94B606042B0BE2C9DA12FB49 /* libPods-haqq-haqqTests.a in Frameworks */, + F13FE11724B35AB8BD2CF29F /* libPods-haqq-haqqTests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -412,7 +412,7 @@ 213327BF2A08EEAD00E28E6F /* StoreKit.framework in Frameworks */, 213327BD2A08EE9E00E28E6F /* AdServices.framework in Frameworks */, 213327BB2A08EE9800E28E6F /* AdSupport.framework in Frameworks */, - 87971FCFD96B6711143164CE /* libPods-haqq.a in Frameworks */, + B053105202D72C6E61DC7998 /* libPods-haqq.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -563,8 +563,8 @@ 213327BC2A08EE9E00E28E6F /* AdServices.framework */, 213327BA2A08EE9800E28E6F /* AdSupport.framework */, ED297162215061F000B7C4FE /* JavaScriptCore.framework */, - 4CE8D6596185A98D7B35C299 /* libPods-haqq.a */, - C07560CAB5B111438A82FB8A /* libPods-haqq-haqqTests.a */, + 285B26C3F4819E8F57A21CBB /* libPods-haqq.a */, + FDA8D1FA4DE76EB464F6FBB2 /* libPods-haqq-haqqTests.a */, ); name = Frameworks; sourceTree = ""; @@ -607,10 +607,10 @@ BBD78D7AC51CEA395F1C20DB /* Pods */ = { isa = PBXGroup; children = ( - 7A536069F4D987850567872F /* Pods-haqq.debug.xcconfig */, - ED97EE01E91BAA70245C5625 /* Pods-haqq.release.xcconfig */, - 93BFE01AA240AB33EF2F915C /* Pods-haqq-haqqTests.debug.xcconfig */, - 81ECBF5DF987D3421F0AD59E /* Pods-haqq-haqqTests.release.xcconfig */, + DF400650EFF97320B890E41E /* Pods-haqq.debug.xcconfig */, + A13B0F486F2ABFB5BC4F0AAC /* Pods-haqq.release.xcconfig */, + 88B99D627CE45D606D111BBC /* Pods-haqq-haqqTests.debug.xcconfig */, + FF721C358A74A71B32B822C8 /* Pods-haqq-haqqTests.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -764,12 +764,12 @@ isa = PBXNativeTarget; buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "haqqTests" */; buildPhases = ( - 682B4B841ACD86F3B14E5513 /* [CP] Check Pods Manifest.lock */, + 1CB601D9BDC4A2564BC742CD /* [CP] Check Pods Manifest.lock */, 00E356EA1AD99517003FC87E /* Sources */, 00E356EB1AD99517003FC87E /* Frameworks */, 00E356EC1AD99517003FC87E /* Resources */, - 75F98815F2F60583B3E0491B /* [CP] Embed Pods Frameworks */, - 0C9E02E0788AF7F1EE5464CD /* [CP] Copy Pods Resources */, + 4BD9899B63DA073342E90D91 /* [CP] Embed Pods Frameworks */, + F5DBD85D4B08A6A7C8BF1D9E /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -785,15 +785,15 @@ isa = PBXNativeTarget; buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "haqq" */; buildPhases = ( - A1386508D0091B35C59790C0 /* [CP] Check Pods Manifest.lock */, + 14E094A0136CAD8F4445DEBA /* [CP] Check Pods Manifest.lock */, 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 68C2D203CE084DF1A99D35EB /* Upload Debug Symbols to Sentry */, - 403B14FEDCB03339417A8383 /* [CP] Embed Pods Frameworks */, - 1F9756E8B727E370DC26FC0F /* [CP] Copy Pods Resources */, - DD80F77A066DCEC3B1B590A3 /* [CP-User] [RNFB] Core Configuration */, + 6B2D6FA973CC0CBB9A7A6ADC /* [CP] Embed Pods Frameworks */, + 8925BA21988112439BD7ADBC /* [CP] Copy Pods Resources */, + E48CC27231FC5E8CC1E43E13 /* [CP-User] [RNFB] Core Configuration */, ); buildRules = ( ); @@ -1025,77 +1025,65 @@ shellPath = /bin/sh; shellScript = "export SENTRY_PROPERTIES=sentry.properties\nexport EXTRA_PACKAGER_ARGS=\"--sourcemap-output $DERIVED_FILE_DIR/main.jsbundle.map\"\nset -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\nif [[ \"$SDKROOT\" == *\"iPhoneSimulator\"* ]]; then\n echo \"[Bundle React Native code and images] Skipping sentry\"\n /bin/sh -c \"$REACT_NATIVE_XCODE\"\nelse\n export SENTRY_PROPERTIES=sentry.properties\n export NODE_BINARY=node\n /bin/sh -c \"$WITH_ENVIRONMENT \\\"../node_modules/@sentry/cli/bin/sentry-cli react-native xcode $REACT_NATIVE_XCODE\\\"\"\nfi\n"; }; - 0C9E02E0788AF7F1EE5464CD /* [CP] Copy Pods Resources */ = { + 14E094A0136CAD8F4445DEBA /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-haqq-haqqTests/Pods-haqq-haqqTests-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-haqq-haqqTests/Pods-haqq-haqqTests-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-haqq-haqqTests/Pods-haqq-haqqTests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 1F9756E8B727E370DC26FC0F /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-haqq/Pods-haqq-resources-${CONFIGURATION}-input-files.xcfilelist", + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); - name = "[CP] Copy Pods Resources"; + name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-haqq/Pods-haqq-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-haqq-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-haqq/Pods-haqq-resources.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 403B14FEDCB03339417A8383 /* [CP] Embed Pods Frameworks */ = { + 1CB601D9BDC4A2564BC742CD /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-haqq/Pods-haqq-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Embed Pods Frameworks"; + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-haqq/Pods-haqq-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-haqq-haqqTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-haqq/Pods-haqq-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 682B4B841ACD86F3B14E5513 /* [CP] Check Pods Manifest.lock */ = { + 4BD9899B63DA073342E90D91 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-haqq-haqqTests/Pods-haqq-haqqTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; + name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-haqq-haqqTests-checkManifestLockResult.txt", + "${PODS_ROOT}/Target Support Files/Pods-haqq-haqqTests/Pods-haqq-haqqTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-haqq-haqqTests/Pods-haqq-haqqTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; 68C2D203CE084DF1A99D35EB /* Upload Debug Symbols to Sentry */ = { @@ -1112,46 +1100,41 @@ shellPath = /bin/sh; shellScript = "WITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"\nif [ -f \"$WITH_ENVIRONMENT\" ]; then\n . \"$WITH_ENVIRONMENT\"\nfi\n\nif [[ \"$SDKROOT\" == *\"iPhoneSimulator\"* ]]; then\n echo \"Skipping sentry...\"\nelse\n export SENTRY_PROPERTIES=sentry.properties\n [ \"$SENTRY_INCLUDE_NATIVE_SOURCES\" = \"true\" ] && INCLUDE_SOURCES_FLAG=\"--include-sources\" || INCLUDE_SOURCES_FLAG=\"\"\n ../node_modules/@sentry/cli/bin/sentry-cli debug-files upload \"$INCLUDE_SOURCES_FLAG\" \"$DWARF_DSYM_FOLDER_PATH\"\nfi\n"; }; - 75F98815F2F60583B3E0491B /* [CP] Embed Pods Frameworks */ = { + 6B2D6FA973CC0CBB9A7A6ADC /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-haqq-haqqTests/Pods-haqq-haqqTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-haqq/Pods-haqq-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-haqq-haqqTests/Pods-haqq-haqqTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-haqq/Pods-haqq-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-haqq-haqqTests/Pods-haqq-haqqTests-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-haqq/Pods-haqq-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - A1386508D0091B35C59790C0 /* [CP] Check Pods Manifest.lock */ = { + 8925BA21988112439BD7ADBC /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-haqq/Pods-haqq-resources-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; + name = "[CP] Copy Pods Resources"; outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-haqq-checkManifestLockResult.txt", + "${PODS_ROOT}/Target Support Files/Pods-haqq/Pods-haqq-resources-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-haqq/Pods-haqq-resources.sh\"\n"; showEnvVarsInLog = 0; }; - DD80F77A066DCEC3B1B590A3 /* [CP-User] [RNFB] Core Configuration */ = { + E48CC27231FC5E8CC1E43E13 /* [CP-User] [RNFB] Core Configuration */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -1164,6 +1147,23 @@ shellPath = /bin/sh; shellScript = "#!/usr/bin/env bash\n#\n# Copyright (c) 2016-present Invertase Limited & Contributors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this library except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n##########################################################################\n##########################################################################\n#\n# NOTE THAT IF YOU CHANGE THIS FILE YOU MUST RUN pod install AFTERWARDS\n#\n# This file is installed as an Xcode build script in the project file\n# by cocoapods, and you will not see your changes until you pod install\n#\n##########################################################################\n##########################################################################\n\nset -e\n\n_MAX_LOOKUPS=2;\n_SEARCH_RESULT=''\n_RN_ROOT_EXISTS=''\n_CURRENT_LOOKUPS=1\n_JSON_ROOT=\"'react-native'\"\n_JSON_FILE_NAME='firebase.json'\n_JSON_OUTPUT_BASE64='e30=' # { }\n_CURRENT_SEARCH_DIR=${PROJECT_DIR}\n_PLIST_BUDDY=/usr/libexec/PlistBuddy\n_TARGET_PLIST=\"${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}\"\n_DSYM_PLIST=\"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist\"\n\n# plist arrays\n_PLIST_ENTRY_KEYS=()\n_PLIST_ENTRY_TYPES=()\n_PLIST_ENTRY_VALUES=()\n\nfunction setPlistValue {\n echo \"info: setting plist entry '$1' of type '$2' in file '$4'\"\n ${_PLIST_BUDDY} -c \"Add :$1 $2 '$3'\" $4 || echo \"info: '$1' already exists\"\n}\n\nfunction getFirebaseJsonKeyValue () {\n if [[ ${_RN_ROOT_EXISTS} ]]; then\n ruby -Ku -e \"require 'rubygems';require 'json'; output=JSON.parse('$1'); puts output[$_JSON_ROOT]['$2']\"\n else\n echo \"\"\n fi;\n}\n\nfunction jsonBoolToYesNo () {\n if [[ $1 == \"false\" ]]; then\n echo \"NO\"\n elif [[ $1 == \"true\" ]]; then\n echo \"YES\"\n else echo \"NO\"\n fi\n}\n\necho \"info: -> RNFB build script started\"\necho \"info: 1) Locating ${_JSON_FILE_NAME} file:\"\n\nif [[ -z ${_CURRENT_SEARCH_DIR} ]]; then\n _CURRENT_SEARCH_DIR=$(pwd)\nfi;\n\nwhile true; do\n _CURRENT_SEARCH_DIR=$(dirname \"$_CURRENT_SEARCH_DIR\")\n if [[ \"$_CURRENT_SEARCH_DIR\" == \"/\" ]] || [[ ${_CURRENT_LOOKUPS} -gt ${_MAX_LOOKUPS} ]]; then break; fi;\n echo \"info: ($_CURRENT_LOOKUPS of $_MAX_LOOKUPS) Searching in '$_CURRENT_SEARCH_DIR' for a ${_JSON_FILE_NAME} file.\"\n _SEARCH_RESULT=$(find \"$_CURRENT_SEARCH_DIR\" -maxdepth 2 -name ${_JSON_FILE_NAME} -print | /usr/bin/head -n 1)\n if [[ ${_SEARCH_RESULT} ]]; then\n echo \"info: ${_JSON_FILE_NAME} found at $_SEARCH_RESULT\"\n break;\n fi;\n _CURRENT_LOOKUPS=$((_CURRENT_LOOKUPS+1))\ndone\n\nif [[ ${_SEARCH_RESULT} ]]; then\n _JSON_OUTPUT_RAW=$(cat \"${_SEARCH_RESULT}\")\n _RN_ROOT_EXISTS=$(ruby -Ku -e \"require 'rubygems';require 'json'; output=JSON.parse('$_JSON_OUTPUT_RAW'); puts output[$_JSON_ROOT]\" || echo '')\n\n if [[ ${_RN_ROOT_EXISTS} ]]; then\n if ! python3 --version >/dev/null 2>&1; then echo \"python3 not found, firebase.json file processing error.\" && exit 1; fi\n _JSON_OUTPUT_BASE64=$(python3 -c 'import json,sys,base64;print(base64.b64encode(bytes(json.dumps(json.loads(open('\"'${_SEARCH_RESULT}'\"', '\"'rb'\"').read())['${_JSON_ROOT}']), '\"'utf-8'\"')).decode())' || echo \"e30=\")\n fi\n\n _PLIST_ENTRY_KEYS+=(\"firebase_json_raw\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_JSON_OUTPUT_BASE64\")\n\n # config.app_data_collection_default_enabled\n _APP_DATA_COLLECTION_ENABLED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"app_data_collection_default_enabled\")\n if [[ $_APP_DATA_COLLECTION_ENABLED ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseDataCollectionDefaultEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_APP_DATA_COLLECTION_ENABLED\")\")\n fi\n\n # config.analytics_auto_collection_enabled\n _ANALYTICS_AUTO_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_auto_collection_enabled\")\n if [[ $_ANALYTICS_AUTO_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"FIREBASE_ANALYTICS_COLLECTION_ENABLED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AUTO_COLLECTION\")\")\n fi\n\n # config.analytics_collection_deactivated\n _ANALYTICS_DEACTIVATED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_collection_deactivated\")\n if [[ $_ANALYTICS_DEACTIVATED ]]; then\n _PLIST_ENTRY_KEYS+=(\"FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_DEACTIVATED\")\")\n fi\n\n # config.analytics_idfv_collection_enabled\n _ANALYTICS_IDFV_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_idfv_collection_enabled\")\n if [[ $_ANALYTICS_IDFV_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_IDFV_COLLECTION_ENABLED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_IDFV_COLLECTION\")\")\n fi\n\n # config.analytics_default_allow_analytics_storage\n _ANALYTICS_STORAGE=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_default_allow_analytics_storage\")\n if [[ $_ANALYTICS_STORAGE ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_DEFAULT_ALLOW_ANALYTICS_STORAGE\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_STORAGE\")\")\n fi\n\n # config.analytics_default_allow_ad_storage\n _ANALYTICS_AD_STORAGE=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_default_allow_ad_storage\")\n if [[ $_ANALYTICS_AD_STORAGE ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_STORAGE\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AD_STORAGE\")\")\n fi\n\n # config.analytics_default_allow_ad_user_data\n _ANALYTICS_AD_USER_DATA=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_default_allow_ad_user_data\")\n if [[ $_ANALYTICS_AD_USER_DATA ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_USER_DATA\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AD_USER_DATA\")\")\n fi\n\n # config.analytics_default_allow_ad_personalization_signals\n _ANALYTICS_PERSONALIZATION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_default_allow_ad_personalization_signals\")\n if [[ $_ANALYTICS_PERSONALIZATION ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_PERSONALIZATION_SIGNALS\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_PERSONALIZATION\")\")\n fi\n\n # config.analytics_registration_with_ad_network_enabled\n _ANALYTICS_REGISTRATION_WITH_AD_NETWORK=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"google_analytics_registration_with_ad_network_enabled\")\n if [[ $_ANALYTICS_REGISTRATION_WITH_AD_NETWORK ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_REGISTRATION_WITH_AD_NETWORK_ENABLED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_REGISTRATION_WITH_AD_NETWORK\")\")\n fi\n\n # config.google_analytics_automatic_screen_reporting_enabled\n _ANALYTICS_AUTO_SCREEN_REPORTING=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"google_analytics_automatic_screen_reporting_enabled\")\n if [[ $_ANALYTICS_AUTO_SCREEN_REPORTING ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseAutomaticScreenReportingEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AUTO_SCREEN_REPORTING\")\")\n fi\n\n # config.perf_auto_collection_enabled\n _PERF_AUTO_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"perf_auto_collection_enabled\")\n if [[ $_PERF_AUTO_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"firebase_performance_collection_enabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_PERF_AUTO_COLLECTION\")\")\n fi\n\n # config.perf_collection_deactivated\n _PERF_DEACTIVATED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"perf_collection_deactivated\")\n if [[ $_PERF_DEACTIVATED ]]; then\n _PLIST_ENTRY_KEYS+=(\"firebase_performance_collection_deactivated\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_PERF_DEACTIVATED\")\")\n fi\n\n # config.messaging_auto_init_enabled\n _MESSAGING_AUTO_INIT=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"messaging_auto_init_enabled\")\n if [[ $_MESSAGING_AUTO_INIT ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseMessagingAutoInitEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_MESSAGING_AUTO_INIT\")\")\n fi\n\n # config.in_app_messaging_auto_colllection_enabled\n _FIAM_AUTO_INIT=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"in_app_messaging_auto_collection_enabled\")\n if [[ $_FIAM_AUTO_INIT ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseInAppMessagingAutomaticDataCollectionEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_FIAM_AUTO_INIT\")\")\n fi\n\n # config.app_check_token_auto_refresh\n _APP_CHECK_TOKEN_AUTO_REFRESH=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"app_check_token_auto_refresh\")\n if [[ $_APP_CHECK_TOKEN_AUTO_REFRESH ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseAppCheckTokenAutoRefreshEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_APP_CHECK_TOKEN_AUTO_REFRESH\")\")\n fi\n\n # config.crashlytics_disable_auto_disabler - undocumented for now - mainly for debugging, document if becomes useful\n _CRASHLYTICS_AUTO_DISABLE_ENABLED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"crashlytics_disable_auto_disabler\")\n if [[ $_CRASHLYTICS_AUTO_DISABLE_ENABLED == \"true\" ]]; then\n echo \"Disabled Crashlytics auto disabler.\" # do nothing\n else\n _PLIST_ENTRY_KEYS+=(\"FirebaseCrashlyticsCollectionEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"NO\")\n fi\nelse\n _PLIST_ENTRY_KEYS+=(\"firebase_json_raw\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_JSON_OUTPUT_BASE64\")\n echo \"warning: A firebase.json file was not found, whilst this file is optional it is recommended to include it to configure firebase services in React Native Firebase.\"\nfi;\n\necho \"info: 2) Injecting Info.plist entries: \"\n\n# Log out the keys we're adding\nfor i in \"${!_PLIST_ENTRY_KEYS[@]}\"; do\n echo \" -> $i) ${_PLIST_ENTRY_KEYS[$i]}\" \"${_PLIST_ENTRY_TYPES[$i]}\" \"${_PLIST_ENTRY_VALUES[$i]}\"\ndone\n\nfor plist in \"${_TARGET_PLIST}\" \"${_DSYM_PLIST}\" ; do\n if [[ -f \"${plist}\" ]]; then\n\n # paths with spaces break the call to setPlistValue. temporarily modify\n # the shell internal field separator variable (IFS), which normally\n # includes spaces, to consist only of line breaks\n oldifs=$IFS\n IFS=\"\n\"\n\n for i in \"${!_PLIST_ENTRY_KEYS[@]}\"; do\n setPlistValue \"${_PLIST_ENTRY_KEYS[$i]}\" \"${_PLIST_ENTRY_TYPES[$i]}\" \"${_PLIST_ENTRY_VALUES[$i]}\" \"${plist}\"\n done\n\n # restore the original internal field separator value\n IFS=$oldifs\n else\n echo \"warning: A Info.plist build output file was not found (${plist})\"\n fi\ndone\n\necho \"info: <- RNFB build script finished\"\n"; }; + F5DBD85D4B08A6A7C8BF1D9E /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-haqq-haqqTests/Pods-haqq-haqqTests-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-haqq-haqqTests/Pods-haqq-haqqTests-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-haqq-haqqTests/Pods-haqq-haqqTests-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -1220,7 +1220,7 @@ /* Begin XCBuildConfiguration section */ 00E356F61AD99517003FC87E /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 93BFE01AA240AB33EF2F915C /* Pods-haqq-haqqTests.debug.xcconfig */; + baseConfigurationReference = 88B99D627CE45D606D111BBC /* Pods-haqq-haqqTests.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; BUNDLE_LOADER = "$(TEST_HOST)"; @@ -1256,7 +1256,7 @@ }; 00E356F71AD99517003FC87E /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 81ECBF5DF987D3421F0AD59E /* Pods-haqq-haqqTests.release.xcconfig */; + baseConfigurationReference = FF721C358A74A71B32B822C8 /* Pods-haqq-haqqTests.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; BUNDLE_LOADER = "$(TEST_HOST)"; @@ -1288,7 +1288,7 @@ }; 13B07F941A680F5B00A75B9A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7A536069F4D987850567872F /* Pods-haqq.debug.xcconfig */; + baseConfigurationReference = DF400650EFF97320B890E41E /* Pods-haqq.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; @@ -1326,7 +1326,7 @@ }; 13B07F951A680F5B00A75B9A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = ED97EE01E91BAA70245C5625 /* Pods-haqq.release.xcconfig */; + baseConfigurationReference = A13B0F486F2ABFB5BC4F0AAC /* Pods-haqq.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; diff --git a/src/components/token/index.ts b/src/components/token/index.ts new file mode 100644 index 000000000..8fbada0f1 --- /dev/null +++ b/src/components/token/index.ts @@ -0,0 +1,3 @@ +export * from './token-icon'; +export * from './token-row'; +export * from './token.types'; diff --git a/src/components/token/token-icon.tsx b/src/components/token/token-icon.tsx new file mode 100644 index 000000000..fca48c258 --- /dev/null +++ b/src/components/token/token-icon.tsx @@ -0,0 +1,58 @@ +import {useMemo} from 'react'; + +import {View} from 'react-native'; + +import {Color} from '@app/colors'; +import {createTheme} from '@app/helpers'; +import {Provider} from '@app/models/provider'; + +import {TokenIconProps} from './token.types'; + +import {ImageWrapper} from '../image-wrapper'; + +export const TokenIcon = ({item}: TokenIconProps) => { + const providerImage = useMemo(() => { + const p = Provider.getByEthChainId(item.chain_id); + + if (!Provider.isAllNetworks || !p) { + return undefined; + } + + return p.icon; + }, [item.chain_id]); + + return ( + + + {providerImage && ( + + )} + + ); +}; + +const styles = createTheme({ + icon: { + width: 42, + height: 42, + borderRadius: 12, + }, + providerIcon: { + position: 'absolute', + top: 0, + right: -10, + width: 20, + height: 20, + borderRadius: 10, + borderWidth: 2, + borderColor: Color.bg1, + }, +}); diff --git a/src/components/token-row.tsx b/src/components/token/token-row.tsx similarity index 62% rename from src/components/token-row.tsx rename to src/components/token/token-row.tsx index 02fda2eb4..307bf3e2e 100644 --- a/src/components/token-row.tsx +++ b/src/components/token/token-row.tsx @@ -6,29 +6,18 @@ import {Color} from '@app/colors'; import {Spacer, Text, TextVariant} from '@app/components/ui'; import {createTheme} from '@app/helpers'; import {Provider} from '@app/models/provider'; -import {IToken} from '@app/types'; -import {ImageWrapper} from './image-wrapper'; - -export interface TokenRowProps { - item: IToken; - checked?: boolean | undefined; - onPress?: () => void; -} +import {TokenIcon} from './token-icon'; +import {TokenRowProps} from './token.types'; export const TokenRow = ({item, checked = false, onPress}: TokenRowProps) => { const priceInUSD = useMemo(() => { return item?.value?.toFiat?.({fixed: 4, chainId: item.chain_id}); }, [item]); - const providerImage = useMemo(() => { + const providerNetworkName = useMemo(() => { const p = Provider.getByEthChainId(item.chain_id); - - if (!Provider.isAllNetworks || !p) { - return undefined; - } - - return p.icon; + return p?.name; }, []); return ( @@ -41,21 +30,8 @@ export const TokenRow = ({item, checked = false, onPress}: TokenRowProps) => { checked && styles.checked, !item.is_in_white_list && styles.notWhiteListed, ]}> - - - {providerImage && ( - - )} - - + + { - - {item?.name} - + + + {providerNetworkName} + + {priceInUSD} @@ -98,21 +76,6 @@ const styles = createTheme({ row: { flexDirection: 'row', }, - icon: { - width: 42, - height: 42, - borderRadius: 12, - }, - providerIcon: { - position: 'absolute', - top: 0, - right: -10, - width: 20, - height: 20, - borderRadius: 10, - borderWidth: 2, - borderColor: Color.bg1, - }, textContainer: { flex: 1, alignItems: 'center', @@ -120,4 +83,10 @@ const styles = createTheme({ checked: { opacity: 0.5, }, + providerNetworkNameContainer: { + backgroundColor: Color.bg8, + paddingVertical: 2, + paddingHorizontal: 4, + borderRadius: 8, + }, }); diff --git a/src/components/token/token.types.ts b/src/components/token/token.types.ts new file mode 100644 index 000000000..aa772c8f2 --- /dev/null +++ b/src/components/token/token.types.ts @@ -0,0 +1,11 @@ +import {IToken} from '@app/types'; + +export type TokenRowProps = { + item: IToken; + checked?: boolean; + onPress?: () => void; +}; + +export type TokenIconProps = { + item: IToken; +}; diff --git a/src/components/transaction-select-crypto/transaction-select-crypto.tsx b/src/components/transaction-select-crypto/transaction-select-crypto.tsx index f2cb1a228..009ac1adc 100644 --- a/src/components/transaction-select-crypto/transaction-select-crypto.tsx +++ b/src/components/transaction-select-crypto/transaction-select-crypto.tsx @@ -3,7 +3,7 @@ import React, {useCallback} from 'react'; import {toJS} from 'mobx'; import {FlatList, StyleSheet} from 'react-native'; -import {TokenRow} from '@app/components/token-row'; +import {TokenRow} from '@app/components/token'; import {IToken} from '@app/types'; export type Props = { diff --git a/src/components/ui/walletCard.tsx b/src/components/ui/walletCard.tsx index 42afa858a..92fb4bfc2 100644 --- a/src/components/ui/walletCard.tsx +++ b/src/components/ui/walletCard.tsx @@ -6,7 +6,7 @@ import {TouchableOpacity, View, useWindowDimensions} from 'react-native'; import {Color} from '@app/colors'; import {DashedLine} from '@app/components/dashed-line'; import {SolidLine} from '@app/components/solid-line'; -import {TokenRow} from '@app/components/token-row'; +import {TokenRow} from '@app/components/token'; import { CardSmall, DataContent, diff --git a/src/widgets/tokens-widget/tokens-widget.tsx b/src/widgets/tokens-widget/tokens-widget.tsx index aa0052bfa..fff3bfcc3 100644 --- a/src/widgets/tokens-widget/tokens-widget.tsx +++ b/src/widgets/tokens-widget/tokens-widget.tsx @@ -4,7 +4,7 @@ import {observer} from 'mobx-react'; import {StyleSheet} from 'react-native'; import {Color} from '@app/colors'; -import {TokenRow} from '@app/components/token-row'; +import {TokenRow} from '@app/components/token'; import {Spacer, Text, TextVariant} from '@app/components/ui'; import {ShadowCard} from '@app/components/ui/shadow-card'; import {WidgetHeader} from '@app/components/ui/widget-header'; From 8a8678b011a977fbe4c04760848b2a1906248400 Mon Sep 17 00:00:00 2001 From: Dmitriy Kudasov Date: Tue, 5 Nov 2024 16:22:31 +0300 Subject: [PATCH 2/2] feat(HW-889): Add contact button for transaction address screen --- .../TransactionStack/transaction-address.tsx | 162 ----------- .../transaction-address/index.ts | 6 + .../transaction-address-add-contact.tsx | 68 +++++ .../transaction-address-contact-list.tsx | 27 ++ .../transaction-address-input.tsx | 146 ++++++++++ .../transaction-address-wallet-list.tsx | 48 ++++ .../transaction-address.tsx | 254 ++++++++++++++++++ .../transaction-address.types.ts | 28 ++ 8 files changed, 577 insertions(+), 162 deletions(-) delete mode 100644 src/screens/HomeStack/TransactionStack/transaction-address.tsx create mode 100644 src/screens/HomeStack/TransactionStack/transaction-address/index.ts create mode 100644 src/screens/HomeStack/TransactionStack/transaction-address/transaction-address-add-contact.tsx create mode 100644 src/screens/HomeStack/TransactionStack/transaction-address/transaction-address-contact-list.tsx create mode 100644 src/screens/HomeStack/TransactionStack/transaction-address/transaction-address-input.tsx create mode 100644 src/screens/HomeStack/TransactionStack/transaction-address/transaction-address-wallet-list.tsx create mode 100644 src/screens/HomeStack/TransactionStack/transaction-address/transaction-address.tsx create mode 100644 src/screens/HomeStack/TransactionStack/transaction-address/transaction-address.types.ts diff --git a/src/screens/HomeStack/TransactionStack/transaction-address.tsx b/src/screens/HomeStack/TransactionStack/transaction-address.tsx deleted file mode 100644 index d5e124986..000000000 --- a/src/screens/HomeStack/TransactionStack/transaction-address.tsx +++ /dev/null @@ -1,162 +0,0 @@ -import React, {useCallback, useMemo, useRef, useState} from 'react'; - -import {observer} from 'mobx-react'; - -import {TransactionAddress} from '@app/components/transaction-address'; -import {showModal} from '@app/helpers'; -import {AddressUtils} from '@app/helpers/address-utils'; -import {useTypedNavigation, useTypedRoute} from '@app/hooks'; -import {useAndroidBackHandler} from '@app/hooks/use-android-back-handler'; -import {Contact} from '@app/models/contact'; -import {Provider} from '@app/models/provider'; -import {Token} from '@app/models/tokens'; -import {Wallet} from '@app/models/wallet'; -import { - TransactionStackParamList, - TransactionStackRoutes, -} from '@app/route-types'; -import {NetworkProviderTypes} from '@app/services/backend'; -import {ModalType} from '@app/types'; - -const logger = Logger.create('TransactionAddressScreen'); - -export const TransactionAddressScreen = observer(() => { - const navigation = useTypedNavigation(); - useAndroidBackHandler(() => { - navigation.goBack(); - return true; - }, [navigation]); - const route = useTypedRoute< - TransactionStackParamList, - TransactionStackRoutes.TransactionAddress - >(); - - const [loading, setLoading] = React.useState(false); - const wallets = Wallet.getAllVisible(); - const contacts = useRef(Contact.getAll()).current; - const fromWallet = useMemo( - () => Wallet.getById(route.params.from)!, - [route.params.from], - ); - - const [address, setAddress] = useState(route.params?.to || ''); - const filteredWallets = useMemo(() => { - if (!wallets || !wallets.length) { - return []; - } - const isTron = Provider.selectedProvider.isTron; - - if (!address) { - return wallets.filter(w => { - if (isTron && !w.isSupportTron) { - return false; - } - return !AddressUtils.equals(w.address, route.params.from); - }); - } - - const lowerCaseAddress = address.toLowerCase(); - - return wallets.filter(w => { - if (isTron && !w.isSupportTron) { - return false; - } - return ( - (w.address.toLowerCase().includes(lowerCaseAddress) || - w.tronAddress?.toLowerCase?.()?.includes?.(lowerCaseAddress) || - w.cosmosAddress.toLowerCase().includes(lowerCaseAddress) || - w.name.toLowerCase().includes(lowerCaseAddress)) && - !AddressUtils.equals(w.address, route.params.from) - ); - }); - }, [address, wallets]); - - const filteredContacts = useMemo(() => { - if (!contacts || !contacts.length) { - return []; - } - - if (!address) { - return contacts.filter( - c => !AddressUtils.equals(c.account, route.params.from), - ); - } - - const lowerCaseAddress = address.toLowerCase(); - - return contacts.filter(c => { - const hexAddress = AddressUtils.toEth(c.account); - const haqqAddress = AddressUtils.toHaqq(hexAddress); - - return ( - (hexAddress.includes(lowerCaseAddress) || - haqqAddress.includes(lowerCaseAddress) || - c.name?.toLowerCase().includes(lowerCaseAddress)) && - !AddressUtils.equals(hexAddress, route.params.from) - ); - }); - }, [address, contacts]); - - const onDone = useCallback( - async (result: string) => { - try { - const networkType = Provider.selectedProvider.isTron - ? NetworkProviderTypes.TRON - : NetworkProviderTypes.EVM; - const converter = AddressUtils.getConverterByNetwork(networkType); - setLoading(true); - const {nft, token} = route.params || {}; - if (nft) { - return navigation.navigate( - TransactionStackRoutes.TransactionNftConfirmation, - { - from: converter(route.params.from), - to: converter(result), - nft, - }, - ); - } else if (token) { - return navigation.navigate(TransactionStackRoutes.TransactionSum, { - from: converter(route.params.from), - to: converter(result), - token, - }); - } else { - if (!Token.tokens?.[AddressUtils.toEth(route.params.from)]) { - const hide = showModal(ModalType.loading, { - text: 'Loading token balances', - }); - try { - await Token.fetchTokens(true, true); - } catch { - } finally { - hide(); - } - } - navigation.navigate(TransactionStackRoutes.TransactionSelectCrypto, { - from: converter(route.params.from), - to: converter(result), - }); - } - } catch (e) { - logger.error('onDone', e); - } finally { - setLoading(false); - } - }, - [navigation, route], - ); - - return ( - - ); -}); diff --git a/src/screens/HomeStack/TransactionStack/transaction-address/index.ts b/src/screens/HomeStack/TransactionStack/transaction-address/index.ts new file mode 100644 index 000000000..7c0f38093 --- /dev/null +++ b/src/screens/HomeStack/TransactionStack/transaction-address/index.ts @@ -0,0 +1,6 @@ +export * from './transaction-address'; +export * from './transaction-address-add-contact'; +export * from './transaction-address-contact-list'; +export * from './transaction-address-input'; +export * from './transaction-address-wallet-list'; +export * from './transaction-address.types'; diff --git a/src/screens/HomeStack/TransactionStack/transaction-address/transaction-address-add-contact.tsx b/src/screens/HomeStack/TransactionStack/transaction-address/transaction-address-add-contact.tsx new file mode 100644 index 000000000..12f6eb6cd --- /dev/null +++ b/src/screens/HomeStack/TransactionStack/transaction-address/transaction-address-add-contact.tsx @@ -0,0 +1,68 @@ +import {useCallback} from 'react'; + +import {View} from 'react-native'; +import prompt from 'react-native-prompt-android'; + +import {Color} from '@app/colors'; +import { + Icon, + IconButton, + IconsName, + Spacer, + Text, + TextVariant, +} from '@app/components/ui'; +import {createTheme} from '@app/helpers'; +import {I18N, getText} from '@app/i18n'; +import {Contact, ContactType} from '@app/models/contact'; +import {sendNotification} from '@app/services'; + +import {TransactionAddressAddContactProps} from './transaction-address.types'; + +export const TransactionAddressAddContact = ({ + address, +}: TransactionAddressAddContactProps) => { + const onPress = useCallback(() => { + prompt( + getText(I18N.transactionFinishAddContact), + getText(I18N.transactionFinishContactMessage, { + address, + }), + value => { + Contact.create(address, { + name: value, + type: ContactType.address, + visible: true, + }); + sendNotification(I18N.transactionFinishContactAdded); + }, + { + defaultValue: '', + placeholder: getText(I18N.transactionFinishContactMessagePlaceholder), + }, + ); + }, [address]); + return ( + + + + + + + + ); +}; + +const styles = createTheme({ + container: { + marginTop: 16, + flexDirection: 'row', + alignItems: 'center', + }, + iconButton: { + width: 42, + height: 42, + borderRadius: 12, + backgroundColor: Color.bg8, + }, +}); diff --git a/src/screens/HomeStack/TransactionStack/transaction-address/transaction-address-contact-list.tsx b/src/screens/HomeStack/TransactionStack/transaction-address/transaction-address-contact-list.tsx new file mode 100644 index 000000000..b770fd10f --- /dev/null +++ b/src/screens/HomeStack/TransactionStack/transaction-address/transaction-address-contact-list.tsx @@ -0,0 +1,27 @@ +import {ListContact} from '@app/components/list-contact'; +import {Spacer, Text, TextVariant} from '@app/components/ui'; +import {withActionsContactItem} from '@app/hocs'; +import {I18N} from '@app/i18n'; + +import {TransactionAddressContactListProps} from './transaction-address.types'; + +const ListOfContacts = withActionsContactItem(ListContact, { + nextScreen: 'transactionContactEdit', +}); + +export const TransactionAddressContactList = ({ + contacts, + onPress, +}: TransactionAddressContactListProps) => { + return ( + <> + + + + + ); +}; diff --git a/src/screens/HomeStack/TransactionStack/transaction-address/transaction-address-input.tsx b/src/screens/HomeStack/TransactionStack/transaction-address/transaction-address-input.tsx new file mode 100644 index 000000000..d26366327 --- /dev/null +++ b/src/screens/HomeStack/TransactionStack/transaction-address/transaction-address-input.tsx @@ -0,0 +1,146 @@ +import {useCallback} from 'react'; + +import Clipboard from '@react-native-clipboard/clipboard'; +import { + NativeSyntheticEvent, + TextInputKeyPressEventData, + View, +} from 'react-native'; + +import {Color} from '@app/colors'; +import { + First, + Icon, + IconButton, + IconsName, + Spacer, + TextField, +} from '@app/components/ui'; +import {createTheme} from '@app/helpers'; +import {AddressUtils} from '@app/helpers/address-utils'; +import {awaitForScanQr} from '@app/helpers/await-for-scan-qr'; +import {LinkType, parseDeepLink} from '@app/helpers/parse-deep-link'; +import {I18N, getText} from '@app/i18n'; +import {HapticEffects, vibrate} from '@app/services/haptic'; +import {showUnrecognizedDataAttention} from '@app/utils'; + +import {TransactionAddressInputProps} from './transaction-address.types'; + +export const TransactionAddressInput = ({ + testID, + address, + setAddress, + isError, + setIsError, + onDone, +}: TransactionAddressInputProps) => { + const handleChangeAddress = useCallback( + async (value: string) => { + const nextValue = value.trim(); + if (nextValue) { + setAddress(nextValue); + setIsError(!AddressUtils.isValidAddress(nextValue)); + } else { + setAddress(''); + setIsError(false); + } + }, + [setAddress, setIsError], + ); + + const onPressClear = useCallback(() => { + setAddress(''); + }, [setAddress]); + + const onPressPaste = useCallback(async () => { + vibrate(HapticEffects.impactLight); + const pasteString = await Clipboard.getString(); + handleChangeAddress(pasteString); + }, [handleChangeAddress]); + + const onPressQR = useCallback(async () => { + const data = await awaitForScanQr(); + const {type, params} = parseDeepLink(data); + + switch (type) { + case LinkType.Haqq: + case LinkType.Address: + case LinkType.Etherium: + setAddress(params.address ?? ''); + break; + default: + setIsError(true); + showUnrecognizedDataAttention(); + break; + } + }, [setAddress, setIsError]); + + const onSubmitEditing = useCallback(() => { + if (!address) { + return; + } + + return onDone(address.trim()); + }, [onDone, address]); + + const onKeyPress = useCallback( + ({nativeEvent}: NativeSyntheticEvent) => { + if (nativeEvent.key === 'Enter') { + onSubmitEditing(); + } + }, + [onSubmitEditing], + ); + + return ( + + {address === '' && ( + + + + + + + + + + )} + + + + + } + /> + ); +}; + +const styles = createTheme({ + input: { + marginBottom: 20, + }, + inputButtonContainer: { + flexDirection: 'row', + }, +}); diff --git a/src/screens/HomeStack/TransactionStack/transaction-address/transaction-address-wallet-list.tsx b/src/screens/HomeStack/TransactionStack/transaction-address/transaction-address-wallet-list.tsx new file mode 100644 index 000000000..6e4bccc43 --- /dev/null +++ b/src/screens/HomeStack/TransactionStack/transaction-address/transaction-address-wallet-list.tsx @@ -0,0 +1,48 @@ +import {useCallback} from 'react'; + +import {FlatList, ListRenderItem, View} from 'react-native'; + +import {Spacer, Text, TextVariant} from '@app/components/ui'; +import {WalletRow, WalletRowTypes} from '@app/components/wallet-row'; +import {WALLET_ROW_4_WIDTH} from '@app/components/wallet-row-variant-4'; +import {I18N} from '@app/i18n'; +import {WalletModel} from '@app/models/wallet'; + +import {TransactionAddressWalletListProps} from './transaction-address.types'; + +export const TransactionAddressWalletList = ({ + wallets, + onPress, +}: TransactionAddressWalletListProps) => { + const keyExtractor = useCallback((item: WalletModel) => item.address, []); + + const renderItem: ListRenderItem = useCallback( + ({item}) => ( + <> + onPress(item.address)} + type={WalletRowTypes.variant4} + /> + + + ), + [onPress], + ); + + return ( + + + + + + + ); +}; diff --git a/src/screens/HomeStack/TransactionStack/transaction-address/transaction-address.tsx b/src/screens/HomeStack/TransactionStack/transaction-address/transaction-address.tsx new file mode 100644 index 000000000..c21d79bab --- /dev/null +++ b/src/screens/HomeStack/TransactionStack/transaction-address/transaction-address.tsx @@ -0,0 +1,254 @@ +import React, {useCallback, useMemo, useState} from 'react'; + +import {observer} from 'mobx-react'; +import {useSafeAreaInsets} from 'react-native-safe-area-context'; + +import { + Button, + ButtonVariant, + KeyboardSafeArea, + Spacer, +} from '@app/components/ui'; +import {createTheme, showModal} from '@app/helpers'; +import {AddressUtils} from '@app/helpers/address-utils'; +import {useTypedNavigation, useTypedRoute} from '@app/hooks'; +import {useAndroidBackHandler} from '@app/hooks/use-android-back-handler'; +import {I18N} from '@app/i18n'; +import {Contact} from '@app/models/contact'; +import {Provider} from '@app/models/provider'; +import {Token} from '@app/models/tokens'; +import {Wallet} from '@app/models/wallet'; +import { + TransactionStackParamList, + TransactionStackRoutes, +} from '@app/route-types'; +import {NetworkProviderTypes} from '@app/services/backend'; +import {HapticEffects, vibrate} from '@app/services/haptic'; +import {ModalType} from '@app/types'; + +import {TransactionAddressAddContact} from './transaction-address-add-contact'; +import {TransactionAddressContactList} from './transaction-address-contact-list'; +import {TransactionAddressInput} from './transaction-address-input'; +import {TransactionAddressWalletList} from './transaction-address-wallet-list'; + +const logger = Logger.create('TransactionAddressScreen'); +const testID = 'transaction_address'; + +export const TransactionAddressScreen = observer(() => { + const navigation = useTypedNavigation(); + useAndroidBackHandler(() => { + navigation.goBack(); + return true; + }, [navigation]); + const {from, to, nft, token} = useTypedRoute< + TransactionStackParamList, + TransactionStackRoutes.TransactionAddress + >().params; + const {bottom: safeAreaBottomInset} = useSafeAreaInsets(); + + const [address, setAddress] = useState(to ?? ''); + const [isError, setIsError] = useState(false); + + const fromWallet = useMemo(() => Wallet.getById(from)!, [from]); + + const [loading, setLoading] = React.useState(false); + + const filteredWallets = useMemo(() => { + const wallets = Wallet.getAllVisible(); + + if (!wallets?.length) { + return []; + } + const isTron = Provider.selectedProvider.isTron; + + if (!address) { + return wallets.filter(w => { + if (isTron && !w.isSupportTron) { + return false; + } + return !AddressUtils.equals(w.address, from); + }); + } + + const lowerCaseAddress = address.toLowerCase(); + + return wallets.filter(w => { + if (isTron && !w.isSupportTron) { + return false; + } + return ( + (w.address.toLowerCase().includes(lowerCaseAddress) || + w.tronAddress?.toLowerCase?.()?.includes?.(lowerCaseAddress) || + w.cosmosAddress.toLowerCase().includes(lowerCaseAddress) || + w.name.toLowerCase().includes(lowerCaseAddress)) && + !AddressUtils.equals(w.address, from) + ); + }); + }, [address, from]); + + const filteredContacts = useMemo(() => { + const contacts = Contact.getAll(); + + if (!contacts?.length) { + return []; + } + + if (!address) { + return contacts.filter(c => !AddressUtils.equals(c.account, from)); + } + + const lowerCaseAddress = address.toLowerCase(); + + return contacts.filter(c => { + const hexAddress = AddressUtils.toEth(c.account); + const haqqAddress = AddressUtils.toHaqq(hexAddress); + + return ( + (hexAddress.includes(lowerCaseAddress) || + haqqAddress.includes(lowerCaseAddress) || + c.name?.toLowerCase().includes(lowerCaseAddress)) && + !AddressUtils.equals(hexAddress, from) + ); + }); + }, [address, from]); + + const onDone = useCallback( + async (result: string) => { + // const isTron = Provider.selectedProvider.isTron; + // if (contacts?.length === 0 && filteredWallets?.length === 1) { + // return onDone( + // isTron ? filteredWallets[0].tronAddress : filteredWallets[0].address, + // ); + // } + + // if (contacts?.length === 1 && filteredWallets?.length === 0) { + // return onDone(contacts[0].account); + // } + + // if (AddressUtils.isValidAddress(address.trim())) { + // return onDone(address.trim()); + // } + + try { + const networkType = Provider.selectedProvider.isTron + ? NetworkProviderTypes.TRON + : NetworkProviderTypes.EVM; + const converter = AddressUtils.getConverterByNetwork(networkType); + setLoading(true); + if (nft) { + return navigation.navigate( + TransactionStackRoutes.TransactionNftConfirmation, + { + from: converter(from), + to: converter(result), + nft, + }, + ); + } else if (token) { + return navigation.navigate(TransactionStackRoutes.TransactionSum, { + from: converter(from), + to: converter(result), + token, + }); + } else { + if (!Token.tokens?.[AddressUtils.toEth(from)]) { + const hide = showModal(ModalType.loading, { + text: 'Loading token balances', + }); + try { + await Token.fetchTokens(true, true); + } catch { + } finally { + hide(); + } + } + navigation.navigate(TransactionStackRoutes.TransactionSelectCrypto, { + from: converter(from), + to: converter(result), + }); + } + } catch (e) { + logger.error('onDone', e); + } finally { + setLoading(false); + } + }, + [navigation, nft, token, from], + ); + + const doneDisabled = useMemo(() => { + if (!address?.trim() || isError) { + return true; + } + + if (Provider.selectedProvider.isTron) { + return ( + // can't send to the same wallet + fromWallet.tronAddress?.toLowerCase() === address?.toLowerCase() || + !AddressUtils.isTronAddress(address) + ); + } + return ( + fromWallet.address?.toLowerCase() === address?.toLowerCase() || + fromWallet.cosmosAddress?.toLowerCase() === address?.toLowerCase() || + !AddressUtils.isValidAddress(address) + ); + }, [isError, address, fromWallet]); + + const onPressAddress = useCallback( + (item: string) => { + vibrate(HapticEffects.impactLight); + onDone(item); + }, + [onDone], + ); + + const onPressButton = useCallback(() => { + onDone(address.trim()); + }, [address, onDone]); + + return ( + + + {Boolean(filteredWallets.length) && ( + + )} + {Boolean(filteredContacts.length) && ( + + )} + {AddressUtils.isValidAddress(address) && !filteredContacts.length && ( + + )} + +