diff --git a/README.md b/README.md index da953bdde1..c858d86d24 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,10 @@ You can find the latest versions of the official managed releases on these links - [Browser Extension](https://chrome.google.com/webstore/detail/fetch-wallet/ellkdbaphhldpeajbepobaecooaoafpg) - Fetch officially supports Chrome, Firefox. + - [iOS App](https://apps.apple.com/in/app/asi-alliance-wallet/id1641087356) + - [Android App](https://play.google.com/store/apps/details?id=com.fetchai.wallet) + +For help using ASI Alliance Wallet, Visit our [Doc](https://fetch.ai/docs/guides/fetch-network/fetch-wallet/web-wallet/get-started). ## Building browser extension locally diff --git a/packages/mobile/android/app/build.gradle b/packages/mobile/android/app/build.gradle index dad666b08e..cbf69a54c1 100644 --- a/packages/mobile/android/app/build.gradle +++ b/packages/mobile/android/app/build.gradle @@ -107,8 +107,8 @@ android { applicationId "com.fetchai.wallet" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 22 - versionName "1.0.3" + versionCode 24 + versionName "1.0.4" missingDimensionStrategy 'react-native-camera', 'general' } diff --git a/packages/mobile/android/sentry.properties b/packages/mobile/android/sentry.properties index f687072787..02c47ff3b3 100644 --- a/packages/mobile/android/sentry.properties +++ b/packages/mobile/android/sentry.properties @@ -1,6 +1,6 @@ -auth.token=$Add_TOKEN_HERE -defaults.org=fetchai-ft -defaults.project=fetch-mobile +auth.token=SENTRY_AUTH_TOKEN +defaults.org=SENTRY_ORG +defaults.project=SENTRY_PROJECT -defaults.url=https://sentry.io/ +defaults.url=SENTRY_URL \ No newline at end of file diff --git a/packages/mobile/babel.config.js b/packages/mobile/babel.config.js index d77cb9e3c4..12353180cb 100644 --- a/packages/mobile/babel.config.js +++ b/packages/mobile/babel.config.js @@ -5,5 +5,21 @@ module.exports = { ["@babel/plugin-proposal-decorators", { legacy: true }], ["@babel/plugin-proposal-class-properties", { loose: true }], "react-native-reanimated/plugin", + [ + "transform-inline-environment-variables", + { + include: [ + "SENTRY_AUTH_TOKEN", + "SENTRY_URL", + "SENTRY_ORG", + "SENTRY_PROJECT", + "SENTRY_DSN", + "PROD_AMPLITUDE_API_KEY", + "DEV_AMPLITUDE_API_KEY", + "PROD_AUTH_CLIENT_ID", + "DEV_AUTH_CLIENT_ID", + ], + }, + ], ], }; diff --git a/packages/mobile/ios/mobile.xcodeproj/project.pbxproj b/packages/mobile/ios/mobile.xcodeproj/project.pbxproj index cb017a9cbd..8db481d3b8 100644 --- a/packages/mobile/ios/mobile.xcodeproj/project.pbxproj +++ b/packages/mobile/ios/mobile.xcodeproj/project.pbxproj @@ -844,7 +844,7 @@ CODE_SIGN_ENTITLEMENTS = mobile/mobile.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 22; + CURRENT_PROJECT_VERSION = 24; DEVELOPMENT_TEAM = T62N9GYJ92; ENABLE_BITCODE = NO; INFOPLIST_FILE = mobile/Info.plist; @@ -855,7 +855,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.3; + MARKETING_VERSION = 1.0.4; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -880,7 +880,7 @@ CODE_SIGN_ENTITLEMENTS = mobile/mobile.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 22; + CURRENT_PROJECT_VERSION = 24; DEVELOPMENT_TEAM = T62N9GYJ92; INFOPLIST_FILE = mobile/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = "ASI Alliance Wallet"; @@ -890,7 +890,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.3; + MARKETING_VERSION = 1.0.4; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", diff --git a/packages/mobile/ios/sentry.properties b/packages/mobile/ios/sentry.properties index b0240d1b4c..02c47ff3b3 100644 --- a/packages/mobile/ios/sentry.properties +++ b/packages/mobile/ios/sentry.properties @@ -1,6 +1,6 @@ -auth.token=$Add_TOKEN_HERE -defaults.org=fetchai-ft -defaults.project=fetch-mobile +auth.token=SENTRY_AUTH_TOKEN +defaults.org=SENTRY_ORG +defaults.project=SENTRY_PROJECT -defaults.url=https://sentry.io/ \ No newline at end of file +defaults.url=SENTRY_URL \ No newline at end of file diff --git a/packages/mobile/package.json b/packages/mobile/package.json index 5c0d282edd..69de6e995a 100644 --- a/packages/mobile/package.json +++ b/packages/mobile/package.json @@ -76,6 +76,7 @@ "appcenter": "^4.4.5", "appcenter-analytics": "^4.4.5", "axios": "^0.27.2", + "babel-plugin-transform-inline-environment-variables": "^0.4.4", "bip39": "^3.0.2", "buffer": "^6.0.3", "color-alpha": "^1.1.3", diff --git a/packages/mobile/src/components/new/animations/animated-number/add-comma.tsx b/packages/mobile/src/components/new/animations/animated-number/add-comma.tsx index 91e4a14be4..ae475bc5ff 100644 --- a/packages/mobile/src/components/new/animations/animated-number/add-comma.tsx +++ b/packages/mobile/src/components/new/animations/animated-number/add-comma.tsx @@ -24,7 +24,7 @@ export function AddComma( } const dotAndElementAfterDot: any[] = GetDotAndElementAfterDot(array); - // console.log('dotAndElementAfterDot',dotAndElementAfterDot); + function AddCommaForInteger(numberInteger: number) { const integer = Math.floor(numberInteger); const integerPartString = integer.toString(); diff --git a/packages/mobile/src/components/new/animations/animated-number/index.tsx b/packages/mobile/src/components/new/animations/animated-number/index.tsx index 04dffc009b..b9d82efd49 100644 --- a/packages/mobile/src/components/new/animations/animated-number/index.tsx +++ b/packages/mobile/src/components/new/animations/animated-number/index.tsx @@ -1,18 +1,17 @@ import React from "react"; -import { Text, View, StyleSheet, ViewStyle } from "react-native"; +import { Text, View, ViewStyle } from "react-native"; import { RenderNumber } from "components/new/animations/animated-number/render-number"; import { AddComma } from "components/new/animations/animated-number/add-comma"; +import { useStyle } from "styles/index"; interface Props { numberForAnimated: number; decimalAmount?: number; includeComma?: boolean; - gap?: number; - colorValue?: string; - fontWeight?: string; fontSizeValue?: number; hookName: "withTiming" | "withSpring"; containerStyle?: ViewStyle; + comaStyle?: ViewStyle; withTimingProps?: { durationValue?: number; easingValue: string; @@ -31,14 +30,12 @@ export function AnimatedNumber({ numberForAnimated, decimalAmount = 1, includeComma = true, - gap = 5, hookName = "withSpring", withTimingProps, withSpringProps, - colorValue, - fontSizeValue, - fontWeight, + fontSizeValue = 50, containerStyle, + comaStyle, }: Props) { if (withTimingProps && withSpringProps) { throw new Error( @@ -51,7 +48,7 @@ export function AnimatedNumber({ if (numberForAnimated < 1 && numberForAnimated > 0) { if (decimalAmount + 2 > numberArray.length) { - // why + 2, because the zero and the comma. + // Add zeros if decimal precision is not met const numberLacks = decimalAmount + 2 - numberArray.length; for (let i = 0; i < numberLacks; i++) { numberArray.push("0"); @@ -62,59 +59,65 @@ export function AnimatedNumber({ const newArray = AddComma(numberForAnimated, numberArray, decimalAmount); numberArray = [...newArray]; } - // console.log(numberArray) } - const heightContainer = fontSizeValue! || 70; + + const style = useStyle(); + const lineHeight = fontSizeValue * 1.0; return ( {numberArray.map((numberSymbol, i) => { - const validNumber = isNaN(+numberSymbol); + const isNonNumeric = isNaN(+numberSymbol); return ( - {!validNumber ? ( - - - + {!isNonNumeric ? ( + ) : ( {numberSymbol} @@ -125,17 +128,3 @@ export function AnimatedNumber({ ); } - -const styles = StyleSheet.create({ - container: { - flexDirection: "row", - overflow: "hidden", - justifyContent: "center", - }, - animatedStyle: {}, - dot: { - right: 0, - margin: 0, - padding: 0, - }, -}); diff --git a/packages/mobile/src/components/new/animations/animated-number/render-number.tsx b/packages/mobile/src/components/new/animations/animated-number/render-number.tsx index b0f4b67dfa..15742387dc 100644 --- a/packages/mobile/src/components/new/animations/animated-number/render-number.tsx +++ b/packages/mobile/src/components/new/animations/animated-number/render-number.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { Text, View, StyleSheet, ViewStyle } from "react-native"; +import { Text, View, ViewStyle } from "react-native"; import Animated, { withSpring, withTiming, @@ -8,14 +8,13 @@ import Animated, { Easing, ReduceMotion, } from "react-native-reanimated"; +import { useStyle } from "styles/index"; interface RenderNumberProps { numberSymbol: number; - gap: number; - colorValue?: string; fontSizeValue?: number; hookName: string; - fontWeight?: string; + containerStyle?: ViewStyle; listProperties: { durationValue?: number; easingValue?: string; @@ -36,23 +35,22 @@ const easingLists = { circle: Easing.circle, bezier: Easing.bezier(0.25, 0.1, 0.25, 1), }; + const NUMBERS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + export function RenderNumber({ numberSymbol, - gap, hookName, listProperties, - colorValue, - fontSizeValue, - fontWeight, + fontSizeValue = 50, + containerStyle, }: RenderNumberProps) { - const heightChange = fontSizeValue || 50; + const heightChange = fontSizeValue; const initialY = useSharedValue(0); const negativeTranslateY = -(initialY.value + numberSymbol * heightChange); - const easingValue = - listProperties.easingValue !== undefined - ? listProperties.easingValue - : "linear"; + const easingValue = listProperties.easingValue || "linear"; + const style = useStyle(); + const animatedStylesTiming = useAnimatedStyle(() => { return { transform: [ @@ -65,6 +63,7 @@ export function RenderNumber({ ], }; }); + const animatedStylesSpring = useAnimatedStyle(() => ({ transform: [ { @@ -82,7 +81,15 @@ export function RenderNumber({ })); return ( - + {numberCharacter} @@ -114,7 +123,3 @@ export function RenderNumber({ ); } - -const styles = StyleSheet.create({ - container: {}, -}); diff --git a/packages/mobile/src/components/new/card-view/token-card-view.tsx b/packages/mobile/src/components/new/card-view/token-card-view.tsx index 5e44ffec03..6e4c187880 100644 --- a/packages/mobile/src/components/new/card-view/token-card-view.tsx +++ b/packages/mobile/src/components/new/card-view/token-card-view.tsx @@ -55,21 +55,25 @@ export const TokenCardView: FunctionComponent<{ style.flatten(["flex-row", "items-center", "flex-3"]) as ViewStyle } > - {leadingIcon ? ( + {leadingIcon && ( - ) : null} + )} - - {title} - - {subtitle ? ( + + {title} + + + {subtitle && ( {subtitle} - ) : null} + )} - - {trailingStart ? ( - - {trailingStart} - - ) : null} - {trailingEnd ? ( - - {trailingEnd} - - ) : null} - + {(trailingStart || trailingEnd) && ( + + {trailingStart && ( + + {trailingStart} + + )} + {trailingEnd && ( + + {trailingEnd} + + )} + + )} {bottomContent && ( ); - const Shadow = () => ( - - ); - const [positionX, setPositionX] = useState(-1); // The currently selected X coordinate position const panResponder = useRef( @@ -171,8 +161,7 @@ export const AndroidLineChart: FunctionComponent<{ style={{ height: dynamicHeight }} data={valueList} contentInset={{ top: 20, bottom: 20 }} - animate={true} - animationDuration={1200} + animate={false} curve={shape.curveNatural} svg={{ strokeWidth: 2, @@ -182,7 +171,6 @@ export const AndroidLineChart: FunctionComponent<{ - ); diff --git a/packages/mobile/src/components/new/line-graph/ios-chart.tsx b/packages/mobile/src/components/new/line-graph/ios-chart.tsx index c2caa5f21d..36a62f8a07 100644 --- a/packages/mobile/src/components/new/line-graph/ios-chart.tsx +++ b/packages/mobile/src/components/new/line-graph/ios-chart.tsx @@ -39,10 +39,12 @@ export const IOSLineChart: FunctionComponent<{ data={data} curved={true} // animation variable - isAnimated={true} - animationDuration={1200} - animateOnDataChange={true} - onDataChangeAnimationDuration={300} + + isAnimated={false} + // animationDuration={1200} + // animateOnDataChange={true} + // onDataChangeAnimationDuration={300} + // data points variable hideDataPoints={true} adjustToWidth={true} diff --git a/packages/mobile/src/components/new/stake-validetor-card/stake-validator.tsx b/packages/mobile/src/components/new/stake-validetor-card/stake-validator.tsx index 74f8c61706..2643180191 100644 --- a/packages/mobile/src/components/new/stake-validetor-card/stake-validator.tsx +++ b/packages/mobile/src/components/new/stake-validetor-card/stake-validator.tsx @@ -145,11 +145,7 @@ export const StakeValidatorCardView: FunctionComponent<{ scrollEnabled={false} horizontal={true} contentContainerStyle={ - style.flatten([ - "width-full", - "justify-between", - "flex-wrap", - ]) as ViewStyle + style.flatten(["width-full", "justify-between"]) as ViewStyle } renderItem={({ item, index }: { item: ItemData; index: number }) => { return ( diff --git a/packages/mobile/src/config.ts b/packages/mobile/src/config.ts index 5d40d3c868..9b5d2d7df4 100644 --- a/packages/mobile/src/config.ts +++ b/packages/mobile/src/config.ts @@ -2600,6 +2600,7 @@ export const AuthApiKey = process.env["NODE_ENV"] === "production" ? PROD_AUTH_CLIENT_ID : DEV_AUTH_CLIENT_ID; + export const CommunityChainInfoRepo = { organizationName: "chainapsis", repoName: "keplr-chain-registry", diff --git a/packages/mobile/src/navigation/navigation-tab-with-drawer.tsx b/packages/mobile/src/navigation/navigation-tab-with-drawer.tsx index 29e825c74d..6caa3a08f1 100644 --- a/packages/mobile/src/navigation/navigation-tab-with-drawer.tsx +++ b/packages/mobile/src/navigation/navigation-tab-with-drawer.tsx @@ -69,7 +69,10 @@ export const MainTabNavigation: FunctionComponent = () => { if ( isBg && keychainStore.isAutoLockOn && - !focusedScreen.name?.startsWith("Register") + !( + focusedScreen.name?.startsWith("Register") || + focusedScreen.name?.startsWith("Setting.SecurityAndPrivacy") + ) ) { try { await keyRingStore.lock(); diff --git a/packages/mobile/src/screens/activity/activity-transaction/index.tsx b/packages/mobile/src/screens/activity/activity-transaction/index.tsx index 95dcd8aa99..9be9d2eeab 100644 --- a/packages/mobile/src/screens/activity/activity-transaction/index.tsx +++ b/packages/mobile/src/screens/activity/activity-transaction/index.tsx @@ -58,6 +58,8 @@ export const ActivityNativeTab: FunctionComponent<{ intervalRef.current = setInterval(() => { if (activityStore.sortedNodes.length > 0) { setActivities(activityStore.sortedNodes); + } else { + setActivities([]); } }, 3000); // Clean up the interval on component unmount diff --git a/packages/mobile/src/screens/home/balance-card.tsx b/packages/mobile/src/screens/home/balance-card.tsx index 7c5e5a2d97..d517a78071 100644 --- a/packages/mobile/src/screens/home/balance-card.tsx +++ b/packages/mobile/src/screens/home/balance-card.tsx @@ -58,8 +58,6 @@ export const BalanceCard: FunctionComponent<{ numberForAnimated={parseFloat(totalNumber)} includeComma={true} decimalAmount={2} - gap={0} - colorValue={"white"} fontSizeValue={32} hookName={"withTiming"} withTimingProps={{ diff --git a/packages/mobile/src/screens/register/torus/index.tsx b/packages/mobile/src/screens/register/torus/index.tsx index 9e7fafd1f3..22387dbc9a 100644 --- a/packages/mobile/src/screens/register/torus/index.tsx +++ b/packages/mobile/src/screens/register/torus/index.tsx @@ -66,11 +66,10 @@ const useWeb3AuthSignIn = ( try { loadingScreen.setIsLoading(true); if (!web3auth) { - console.log("Web3auth not initialized"); + console.error("Web3auth not initialized"); return; } - console.log("Logging in"); await web3auth.login({ loginProvider: type, redirectUrl: resolvedRedirectUrl, @@ -78,7 +77,6 @@ const useWeb3AuthSignIn = ( curve: "secp256k1", }); - console.log(`Logged in ${web3auth.privKey}`); if (web3auth.privKey) { setEmail(web3auth.userInfo()?.email); setPrivateKey(Buffer.from(web3auth.privKey, "hex")); @@ -124,7 +122,6 @@ const logoutWeb3Auth = async () => { return; } - console.log("Logging out"); await web3auth.logout(); }; diff --git a/packages/mobile/src/screens/stake/dashboard/reward-card.tsx b/packages/mobile/src/screens/stake/dashboard/reward-card.tsx index ae3fe34419..49c70cd05c 100644 --- a/packages/mobile/src/screens/stake/dashboard/reward-card.tsx +++ b/packages/mobile/src/screens/stake/dashboard/reward-card.tsx @@ -248,8 +248,6 @@ export const MyRewardCard: FunctionComponent<{ } includeComma={true} decimalAmount={2} - gap={0} - colorValue={"white"} fontSizeValue={14} hookName={"withTiming"} withTimingProps={{ @@ -265,7 +263,7 @@ export const MyRewardCard: FunctionComponent<{ "padding-left-4", "color-gray-300", ]), - { lineHeight: 16 }, + { lineHeight: 14 }, ] as ViewStyle } > diff --git a/packages/mobile/src/screens/stake/dashboard/stake-card.tsx b/packages/mobile/src/screens/stake/dashboard/stake-card.tsx index 0450ab672f..d48434509b 100644 --- a/packages/mobile/src/screens/stake/dashboard/stake-card.tsx +++ b/packages/mobile/src/screens/stake/dashboard/stake-card.tsx @@ -232,18 +232,12 @@ export const StakeCard: FunctionComponent = () => { )} includeComma={true} decimalAmount={2} - gap={0} - colorValue={"white"} fontSizeValue={16} - fontWeight="500" hookName={"withTiming"} withTimingProps={{ durationValue: 1000, easingValue: "linear", }} - containerStyle={ - style.flatten(["margin-right-4"]) as ViewStyle - } /> { style.flatten([ "color-white", "subtitle2", - "margin-right-4", + "padding-left-4", ]), - { lineHeight: 18 }, + { lineHeight: 16 }, ] as ViewStyle } > @@ -326,18 +320,12 @@ export const StakeCard: FunctionComponent = () => { )} includeComma={true} decimalAmount={2} - gap={0} - colorValue={"white"} fontSizeValue={16} - fontWeight="500" hookName={"withTiming"} withTimingProps={{ durationValue: 1000, easingValue: "linear", }} - containerStyle={ - style.flatten(["margin-right-4"]) as ViewStyle - } /> { style.flatten([ "color-white", "subtitle2", - "margin-right-4", + "padding-left-4", ]), - { lineHeight: 18 }, + { lineHeight: 16 }, ] as ViewStyle } > @@ -421,18 +409,12 @@ export const StakeCard: FunctionComponent = () => { )} includeComma={true} decimalAmount={2} - gap={0} - colorValue={"white"} fontSizeValue={16} - fontWeight="500" hookName={"withTiming"} withTimingProps={{ durationValue: 1000, easingValue: "linear", }} - containerStyle={ - style.flatten(["margin-right-4"]) as ViewStyle - } /> { style.flatten([ "color-white", "subtitle2", - "margin-right-4", + "padding-left-4", ]), - { lineHeight: 18 }, + { lineHeight: 16 }, ] as ViewStyle } > @@ -516,10 +498,7 @@ export const StakeCard: FunctionComponent = () => { )} includeComma={true} decimalAmount={2} - gap={0} - colorValue={"white"} fontSizeValue={16} - fontWeight="500" hookName={"withTiming"} withTimingProps={{ durationValue: 1000, @@ -535,9 +514,9 @@ export const StakeCard: FunctionComponent = () => { style.flatten([ "color-white", "subtitle2", - "margin-right-4", + "padding-left-4", ]), - { lineHeight: 18 }, + { lineHeight: 16 }, ] as ViewStyle } > @@ -547,7 +526,7 @@ export const StakeCard: FunctionComponent = () => { style={ [ style.flatten(["color-white@60%", "subtitle2"]), - { lineHeight: 18 }, + { lineHeight: 16 }, ] as ViewStyle } > diff --git a/yarn.lock b/yarn.lock index f314229deb..54ca87ba20 100644 --- a/yarn.lock +++ b/yarn.lock @@ -22519,6 +22519,13 @@ __metadata: languageName: node linkType: hard +"babel-plugin-transform-inline-environment-variables@npm:^0.4.4": + version: 0.4.4 + resolution: "babel-plugin-transform-inline-environment-variables@npm:0.4.4" + checksum: fa361287411301237fd8ce332aff4f8e8ccb8db30e87a2ddc7224c8bf7cd792eda47aca24dc2e09e70bce4c027bc8cbe22f4999056be37a25d2472945df21ef5 + languageName: node + linkType: hard + "babel-plugin-transform-object-rest-spread@npm:^6.26.0": version: 6.26.0 resolution: "babel-plugin-transform-object-rest-spread@npm:6.26.0" @@ -40682,6 +40689,7 @@ __metadata: appcenter: ^4.4.5 appcenter-analytics: ^4.4.5 axios: ^0.27.2 + babel-plugin-transform-inline-environment-variables: ^0.4.4 bip39: ^3.0.2 browserify: ^17.0.0 buffer: ^6.0.3