Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat(components): move getAssetLogoUrl to asset-utils #15130

Merged
merged 2 commits into from
Nov 1, 2024

Conversation

vytick
Copy link
Contributor

@vytick vytick commented Oct 30, 2024

  • move getAssetLogoUrl to package/asset-utils
  • use getAssetLogoUrl to fetch contract icons from data.trezor.io

Related Issue

Resolve ##15122

Screenshots:

Untitled.mp4

Copy link

github-actions bot commented Oct 30, 2024

Fingerprint is changed, new EAS Build(s) are now in pipeline.

Build with commit d02862e

Name Build Details
🤖 Android build View build page
DetailsDistribution: INTERNAL
Build profile: preview
SDK version: 51.0.0
App version: 24.10.2
🍎 iOS build View build page
DetailsDistribution: INTERNAL
Build profile: preview
SDK version: 51.0.0
App version: 24.10.2
Fingerprint diff
[
  {
    "op": "changed",
    "source": {
      "type": "contents",
      "id": "expoConfig",
      "contents": "{\"android\":{\"adaptiveIcon\":{\"backgroundColor\":\"#E59D17\",\"foregroundImage\":\"./assets/appIcon_android.png\",\"monochromeImage\":\"./assets/appIcon_android.png\"},\"intentFilters\":[{\"action\":\"VIEW\",\"autoVerify\":true,\"category\":[\"BROWSABLE\",\"DEFAULT\"],\"data\":[{\"host\":\"dev.suite.sldev.cz\",\"pathPattern\":\"/connect/.*/.*/deeplink/.*\",\"scheme\":\"https\"},{\"host\":\"dev.suite.sldev.cz\",\"pathPattern\":\"/connect/.*/deeplink/.*\",\"scheme\":\"https\"}]}],\"package\":\"io.trezor.suite.preview\",\"permissions\":[\"android.permission.CAMERA\"]},\"extra\":{\"commitHash\":\"deaf7a52a703a5d7c0498246107c40645156c278\",\"eas\":{\"projectId\":\"15998f8a-e75c-4b60-959d-6f68e5ff4936\"}},\"ios\":{\"associatedDomains\":[\"applinks:dev.suite.sldev.cz\"],\"bundleIdentifier\":\"io.trezor.suite.preview\",\"icon\":\"./assets/preview/appIcon.png\",\"infoPlist\":{\"ITSAppUsesNonExemptEncryption\":false,\"NSAppTransportSecurity\":{\"NSAllowsArbitraryLoads\":true,\"NSExceptionDomains\":{\"data.trezor.io\":{\"NSExceptionAllowsInsecureHTTPLoads\":true,\"NSIncludesSubdomains\":true},\"localhost\":{\"NSExceptionAllowsInsecureHTTPLoads\":true}}},\"NSCameraUsageDescription\":\"$(PRODUCT_NAME) needs access to your Camera to scan your XPUB.\",\"NSFaceIDUsageDescription\":\"$(PRODUCT_NAME) needs Face ID and Touch ID to keep sensitive data about your portfolio private.\",\"NSMicrophoneUsageDescription\":\"This app does not require access to the microphone.\",\"UIRequiredDeviceCapabilities\":[\"armv7\"]},\"supportsTablet\":true},\"name\":\"Trezor Suite Lite Preview\",\"orientation\":\"portrait\",\"owner\":\"trezorcompany-develop\",\"platforms\":[\"android\",\"ios\"],\"plugins\":[\"./plugins/withGradleProperties.js\",\"./plugins/withRemoveXcodeLocalEnv.js\",\"./plugins/withRemoveiOSNotificationEntitlement.js\",\"@trezor/react-native-usb/plugins/withUSBDevice.js\",[\"./plugins/withAndroidMainActivityAttributes.js\",{\"android:allowBackup\":false}],[\"@config-plugins/detox\",{\"subdomains\":\"*\"}],[\"@sentry/react-native/expo\",{\"organization\":\"satoshilabs\",\"project\":\"suite-native\",\"url\":\"https://sentry.io/\"}],[\"expo-build-properties\",{\"android\":{\"minSdkVersion\":28},\"ios\":{\"deploymentTarget\":\"14.0\"}}],[\"expo-camera\",{\"cameraPermission\":\"Allow $(PRODUCT_NAME) to access camera for QR code scanning.\",\"microphonePermission\":false,\"recordAudioAndroid\":false}],[\"expo-font\",{\"fonts\":[\"../../packages/theme/fonts/TTSatoshi-DemiBold.otf\",\"../../packages/theme/fonts/TTSatoshi-Medium.otf\",\"../../suite-common/icons/iconFontsMobile/TrezorSuiteIcons.ttf\"]}],[\"expo-image-picker\",{\"microphonePermission\":false,\"photosPermission\":\"Allow $(PRODUCT_NAME) to access your photos to let you import QR code images.\"}]],\"runtimeVersion\":\"9\",\"scheme\":\"trezorsuitelite\",\"sdkVersion\":\"51.0.0\",\"slug\":\"trezor-suite-preview\",\"splash\":{\"backgroundColor\":\"#25292E\",\"image\":\"./assets/splash_icon.png\",\"resizeMode\":\"contain\"},\"updates\":{\"requestHeaders\":{\"expo-channel-name\":\"preview\"},\"url\":\"https://u.expo.dev/15998f8a-e75c-4b60-959d-6f68e5ff4936\"},\"userInterfaceStyle\":\"automatic\",\"version\":\"24.10.2\"}",
      "reasons": [
        "expoConfig"
      ],
      "hash": "ffb44be52597b6a1287b82260a76b207e0c9b60a"
    }
  }
]

Learn more about 𝝠 Expo Github Action

@vytick vytick added components Related to global components mobile Suite Lite issues and PRs labels Oct 30, 2024
Copy link

github-actions bot commented Oct 30, 2024

🚀 Expo preview is ready!

  • Project → trezor-suite-preview
  • Platforms → android, ios
  • Scheme → trezorsuitelite
  • Runtime Version → 9
  • More info

Learn more about 𝝠 Expo Github Action

@trezor-ci trezor-ci force-pushed the feat/native/token-icons-from-data branch from 06ce79f to c599732 Compare October 31, 2024 13:37
@trezor trezor deleted a comment from github-actions bot Oct 31, 2024
@trezor-ci trezor-ci force-pushed the feat/native/token-icons-from-data branch from a099900 to bdf8159 Compare October 31, 2024 14:37
@trezor trezor deleted a comment from github-actions bot Oct 31, 2024
@vytick vytick marked this pull request as ready for review October 31, 2024 14:39
@vytick vytick requested review from a team, jvaclavik and adamhavel as code owners October 31, 2024 14:39
@vytick vytick marked this pull request as draft October 31, 2024 16:09
Copy link
Contributor

@Nodonisko Nodonisko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to modify also generate icons script it expects token folder to be present.

const sizeNumber = typeof size === 'number' ? size : cryptoIconSizes[size];
let sourceUrl = cryptoIcons[symbol.toLowerCase() as CryptoIconName];
if (coingeckoId && contractAddress) {
const formattedAddress = getContractAddressForNetwork(symbol, contractAddress);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UseMemo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vytick
Copy link
Contributor Author

vytick commented Oct 31, 2024

You need to modify also generate icons script it expects token folder to be present.

@Nodonisko I don't see any reference to tokenIcons other than in MD file

@vytick vytick marked this pull request as ready for review October 31, 2024 21:33
Copy link
Contributor

@Nodonisko Nodonisko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, sorry I forget that token icons was generated manually

@vytick
Copy link
Contributor Author

vytick commented Nov 1, 2024

/rebase

Copy link

github-actions bot commented Nov 1, 2024

@trezor-ci trezor-ci force-pushed the feat/native/token-icons-from-data branch from 4e4d10d to 955d9c7 Compare November 1, 2024 09:40
@vytick vytick force-pushed the feat/native/token-icons-from-data branch from 955d9c7 to 4b7d9ff Compare November 1, 2024 10:00
@vytick vytick force-pushed the feat/native/token-icons-from-data branch from 4b7d9ff to d02862e Compare November 1, 2024 10:33
@vytick vytick merged commit b8395a8 into develop Nov 1, 2024
67 of 69 checks passed
@vytick vytick deleted the feat/native/token-icons-from-data branch November 1, 2024 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
components Related to global components mobile Suite Lite issues and PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants