diff --git a/.github/workflows/jsCodePush-PROD.yaml b/.github/workflows/jsCodePush-PROD.yaml index 0af3d84c..14e97cb0 100644 --- a/.github/workflows/jsCodePush-PROD.yaml +++ b/.github/workflows/jsCodePush-PROD.yaml @@ -89,7 +89,8 @@ jobs: echo MINIBITS_SERVER_API_KEY='${{ secrets.MINIBITS_SERVER_API_KEY }}' >> .env echo MINIBITS_SERVER_API_HOST='https://api.minibits.cash' >> .env echo MINIBITS_NIP05_DOMAIN='@minibits.cash' >> .env - echo MINIBITS_RELAY_URL='wss://relay.minibits.cash' >> .env + echo MINIBITS_RELAY_URL='wss://relay.minibits.cash' >> .env + echo MINIBITS_MINT_URL='wss://mint.minibits.cash/Bitcoin' >> .env echo COMMIT='${{ env.COMMIT_HASH }}' >> .env # Install dependecies from package.json diff --git a/.github/workflows/jsCodePush-TEST.yaml b/.github/workflows/jsCodePush-TEST.yaml index f30e8a4c..48a0bd04 100644 --- a/.github/workflows/jsCodePush-TEST.yaml +++ b/.github/workflows/jsCodePush-TEST.yaml @@ -89,7 +89,8 @@ jobs: echo MINIBITS_SERVER_API_KEY='${{ secrets.MINIBITS_SERVER_API_KEY }}' >> .env echo MINIBITS_SERVER_API_HOST='https://api.minibits.cash' >> .env echo MINIBITS_NIP05_DOMAIN='@minibits.cash' >> .env - echo MINIBITS_RELAY_URL='wss://relay.minibits.cash/test' >> .env + echo MINIBITS_RELAY_URL='wss://relay.minibits.cash/test' >> .env + echo MINIBITS_MINT_URL='wss://mint.minibits.cash/Bitcoin' >> .env echo COMMIT='${{ env.COMMIT_HASH }}' >> .env # Install dependecies from package.json diff --git a/android/app/build.gradle b/android/app/build.gradle index 42b7b8cb..aa317ac8 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -102,8 +102,8 @@ android { applicationId "com.minibits_wallet" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 23 - versionName "0.1.4" + versionCode 24 + versionName "0.1.5" ndk { abiFilters 'arm64-v8a', 'x86_64', 'x86', 'armeabi-v7a' } // react-native-tor build diff --git a/src/components/Icon.tsx b/src/components/Icon.tsx index 7b04f559..1b6772cd 100644 --- a/src/components/Icon.tsx +++ b/src/components/Icon.tsx @@ -67,6 +67,7 @@ import { faKey } from '@fortawesome/free-solid-svg-icons/faKey' import { faCircleNodes } from '@fortawesome/free-solid-svg-icons/faCircleNodes' import { faBullseye } from '@fortawesome/free-solid-svg-icons/faBullseye' import { faEyeSlash } from '@fortawesome/free-solid-svg-icons/faEyeSlash' +import { faUpRightFromSquare } from '@fortawesome/free-solid-svg-icons/faUpRightFromSquare' export type IconTypes = keyof typeof iconRegistry @@ -123,7 +124,8 @@ export const iconRegistry = { faKey: faKey, faCircleNodes: faCircleNodes, faBullseye: faBullseye, - faEyeSlash: faEyeSlash, + faEyeSlash: faEyeSlash, + faUpRightFromSquare: faUpRightFromSquare, } diff --git a/src/i18n/en.ts b/src/i18n/en.ts index 5fa54744..5595781e 100644 --- a/src/i18n/en.ts +++ b/src/i18n/en.ts @@ -156,7 +156,7 @@ const en = { backupScreen: { localBackup: "Local backup", localBackupDescription: "Local backup stores a copy of all your ecash in the local database. Ecash is never deleted unless you switch off the backup. Please note that this backup is not encrypted.", - remoteBackup: "Remote backup", + remoteBackup: "Off-device backup", remoteBackupDescription: "Seed phrase allows you to recover your ecash balance in case of device loss.", recoveryTool: "Recovery tool", recoveryToolDescription: "Show ecash backed up in the local database and attempt to recover unspent ones into the wallet in case the wallet storage gets corrupted or a transaction fails due to an unexpected error.", diff --git a/src/screens/BackupScreen.tsx b/src/screens/BackupScreen.tsx index e1b6f3a0..ff3b38f1 100644 --- a/src/screens/BackupScreen.tsx +++ b/src/screens/BackupScreen.tsx @@ -117,7 +117,7 @@ export const BackupScreen: FC> = observer(fun > = observer(fun leftIconInverse={true} style={$item} onPress={gotoLocalRecovery} + topSeparator={true} /> )} diff --git a/src/screens/MintsScreen.tsx b/src/screens/MintsScreen.tsx index 36466b12..d53d14e8 100644 --- a/src/screens/MintsScreen.tsx +++ b/src/screens/MintsScreen.tsx @@ -2,6 +2,9 @@ import {observer} from 'mobx-react-lite' import React, {FC, useCallback, useRef, useState} from 'react' import {Alert, TextInput, TextStyle, View, ViewStyle} from 'react-native' import Clipboard from '@react-native-clipboard/clipboard' +import { + MINIBITS_MINT_URL +} from '@env' import {spacing, typography, useThemeColor, colors} from '../theme' import {AppStackScreenProps, SettingsStackScreenProps} from '../navigation' import { @@ -19,13 +22,12 @@ import { import {Mint} from '../models/Mint' import {useStores} from '../models' import {useHeader} from '../utils/useHeader' -import {MintKeys, MintKeySets, MintClient} from '../services' +import {MintKeys, MintClient} from '../services' import {log} from '../services/logService' import AppError from '../utils/AppError' import {translate} from '../i18n' import {MintListItem} from './Mints/MintListItem' -import { infoMessage } from '../utils/utils' -import { spyReportEnd } from 'mobx/dist/internal' + export const MintsScreen: FC> = observer(function MintsScreen({route, navigation}) { @@ -38,7 +40,7 @@ export const MintsScreen: FC> = observer(funct const mintInputRef = useRef(null) const [mintUrl, setMintUrl] = useState('') - const [defaultMintUrl, setDefaultMintUrl] = useState('https://mint.minibits.cash/Bitcoin') + const [defaultMintUrl, setDefaultMintUrl] = useState(MINIBITS_MINT_URL) const [selectedMint, setSelectedMint] = useState() const [info, setInfo] = useState('') const [error, setError] = useState() @@ -439,8 +441,8 @@ const $actionItem: ViewStyle = { } const $card: ViewStyle = { - marginBottom: spacing.small, - paddingTop: 0, + marginBottom: spacing.small, + // paddingTop: 0, } const $cardHeading: TextStyle = { diff --git a/src/screens/RemoteBackupScreen.tsx b/src/screens/RemoteBackupScreen.tsx index ce7f357b..b2f829c5 100644 --- a/src/screens/RemoteBackupScreen.tsx +++ b/src/screens/RemoteBackupScreen.tsx @@ -99,7 +99,7 @@ export const RemoteBackupScreen: FC> = return ( - + > = leftIcon='faInfoCircle' leftIconColor={colors.palette.iconYellow300} leftIconInverse={true} - style={$item} + style={$item} /> } /> diff --git a/src/screens/RemoteRecoveryScreen.tsx b/src/screens/RemoteRecoveryScreen.tsx index 2c2f2add..b2d6c18a 100644 --- a/src/screens/RemoteRecoveryScreen.tsx +++ b/src/screens/RemoteRecoveryScreen.tsx @@ -193,7 +193,7 @@ export const RemoteRecoveryScreen: FC> = o } // need to move counter by whole interval to avoid duplicate _B!!! - mintsStore.increaseProofsCounter(mint.mintUrl, endIndex) + mintsStore.increaseProofsCounter(mint.mintUrl, Math.abs(endIndex - startIndex)) if(newKeys) {updateMintKeys(mint.mintUrl as string, newKeys)} diff --git a/src/screens/WalletScreen.tsx b/src/screens/WalletScreen.tsx index ac6fdace..ba33a6d5 100644 --- a/src/screens/WalletScreen.tsx +++ b/src/screens/WalletScreen.tsx @@ -49,7 +49,8 @@ import AppError, { Err } from '../utils/AppError' import { APP_ENV, CODEPUSH_STAGING_DEPLOYMENT_KEY, - CODEPUSH_PRODUCTION_DEPLOYMENT_KEY, + CODEPUSH_PRODUCTION_DEPLOYMENT_KEY, + MINIBITS_MINT_URL } from '@env' import { round } from '../utils/number' import { NotificationService } from '../services/notificationService' @@ -89,7 +90,7 @@ export const WalletScreen: FC = observer( const isInternetReachable = useIsInternetReachable() const [info, setInfo] = useState('') - const [defaultMintUrl, setDefaultMintUrl] = useState('https://mint.minibits.cash/Bitcoin') + const [defaultMintUrl, setDefaultMintUrl] = useState(MINIBITS_MINT_URL) const [error, setError] = useState() const [isLoading, setIsLoading] = useState(false) diff --git a/src/utils/envtypes/env.d.tsx b/src/utils/envtypes/env.d.tsx index bf3f1d80..f43f44d4 100644 --- a/src/utils/envtypes/env.d.tsx +++ b/src/utils/envtypes/env.d.tsx @@ -8,6 +8,7 @@ declare module '@env' { export const MINIBITS_SERVER_API_HOST: string export const MINIBITS_NIP05_DOMAIN: string export const MINIBITS_RELAY_URL: string + export const MINIBITS_MINT_URL: string export const JS_BUNDLE_VERSION: string export const COMMIT: string }