mirror of
https://github.com/minibits-cash/minibits_wallet.git
synced 2026-10-05 19:28:26 +00:00
Update translations (#159)
This commit is contained in:
+10
@@ -81,3 +81,13 @@ yarn-error.log
|
||||
!.yarn/releases
|
||||
!.yarn/sdks
|
||||
!.yarn/versions
|
||||
|
||||
# other dev tooling
|
||||
repomix-output.*
|
||||
repomix*
|
||||
mise.toml
|
||||
mise.yaml
|
||||
|
||||
# temp dev scripts 2025-07-14 and beyond. will remove afterwards
|
||||
key-mappings.json
|
||||
replace-translation-keys.js
|
||||
|
||||
@@ -1,16 +1,97 @@
|
||||
const { exec } = require('child_process');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
exec('tsc --noEmit', (error, stdout, stderr) => {
|
||||
console.log('TRANSLATION ANALYSIS');
|
||||
console.log('=' + '='.repeat(50));
|
||||
|
||||
// First, run the translation analysis
|
||||
try {
|
||||
// Read settings.json to get language configuration
|
||||
const settingsPath = path.join(__dirname, '..', 'minibits.inlang', 'settings.json');
|
||||
const settings = JSON.parse(fs.readFileSync(settingsPath, 'utf8'));
|
||||
|
||||
const defaultLanguage = settings.sourceLanguageTag;
|
||||
const allLanguages = settings.languageTags;
|
||||
|
||||
console.log(`Default language: ${defaultLanguage}`);
|
||||
console.log(`All languages: ${allLanguages.join(', ')}`);
|
||||
console.log('=' + '='.repeat(50));
|
||||
|
||||
// Load all translation files
|
||||
const translations = {};
|
||||
const i18nMessagesPath = path.join(__dirname, '..', 'src', 'i18n_messages');
|
||||
|
||||
allLanguages.forEach(lang => {
|
||||
const filePath = path.join(i18nMessagesPath, `${lang}.json`);
|
||||
if (fs.existsSync(filePath)) {
|
||||
try {
|
||||
translations[lang] = JSON.parse(fs.readFileSync(filePath, 'utf8'));
|
||||
} catch (error) {
|
||||
console.error(`Error reading ${lang}.json:`, error.message);
|
||||
translations[lang] = {};
|
||||
}
|
||||
} else {
|
||||
console.warn(`Translation file not found: ${lang}.json`);
|
||||
translations[lang] = {};
|
||||
}
|
||||
});
|
||||
|
||||
// Get keys from default language
|
||||
const defaultKeys = Object.keys(translations[defaultLanguage] || {});
|
||||
const totalKeys = defaultKeys.length;
|
||||
|
||||
console.log(`Total keys in default language (${defaultLanguage}): ${totalKeys}`);
|
||||
console.log('=' + '='.repeat(50));
|
||||
|
||||
// Check each language
|
||||
allLanguages.forEach(lang => {
|
||||
if (lang === defaultLanguage) {
|
||||
console.log(`\n${lang.toUpperCase()} (default language)`);
|
||||
console.log(`✅ 100% translated (${totalKeys}/${totalKeys} keys)`);
|
||||
return;
|
||||
}
|
||||
|
||||
const currentKeys = Object.keys(translations[lang] || {});
|
||||
const currentTotal = currentKeys.length;
|
||||
const missingKeys = defaultKeys.filter(key => !translations[lang].hasOwnProperty(key));
|
||||
const percentageTranslated = totalKeys > 0 ? Math.round((currentTotal / totalKeys) * 100) : 0;
|
||||
|
||||
console.log(`\n${lang.toUpperCase()}`);
|
||||
console.log(`📊 ${percentageTranslated}% translated (${currentTotal}/${totalKeys} keys)`);
|
||||
|
||||
if (missingKeys.length > 0) {
|
||||
console.log(`❌ Missing ${missingKeys.length} keys:`);
|
||||
missingKeys.forEach(key => {
|
||||
console.log(` - ${key}`);
|
||||
});
|
||||
} else {
|
||||
console.log(`✅ No missing keys!`);
|
||||
}
|
||||
});
|
||||
|
||||
console.log('\n' + '=' + '='.repeat(50));
|
||||
console.log('✅ Translation analysis complete!');
|
||||
} catch (translationError) {
|
||||
console.error('❌ Error during translation analysis:', translationError.message);
|
||||
}
|
||||
|
||||
console.log('\n' + '=' + '='.repeat(50));
|
||||
console.log('TYPESCRIPT ERROR CHECK');
|
||||
console.log('=' + '='.repeat(50));
|
||||
|
||||
// Now run the TypeScript error checking
|
||||
exec('tsc --noEmit', (error, stdout) => {
|
||||
if (error) {
|
||||
const output = stdout;
|
||||
const filteredErrors = output.split('\n').filter(line => line.includes('TxKeyPath'));
|
||||
if (filteredErrors.length > 0) {
|
||||
console.log('❌ TypeScript errors containing TxKeyPath found:');
|
||||
console.log(filteredErrors.join('\n'));
|
||||
} else {
|
||||
console.log('No errors containing TxKeyPath found.');
|
||||
console.log('✅ No TypeScript errors containing TxKeyPath found.');
|
||||
}
|
||||
// process.exit(1); // Ensure the script returns an error code if there were any errors
|
||||
} else {
|
||||
console.log('No TypeScript errors found.');
|
||||
console.log('✅ No TypeScript errors found.');
|
||||
}
|
||||
});
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"modules": [
|
||||
"https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-empty-pattern@latest/dist/index.js",
|
||||
"https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-without-source@latest/dist/index.js",
|
||||
"https://cdn.jsdelivr.net/gh/KraXen72/inlang-t-function-jsx-hybrid-matcher/dist/index.js",
|
||||
"https://cdn.jsdelivr.net/gh/KraXen72/inlang-t-function-jsx-hybrid-matcher@main/dist/index.js",
|
||||
"https://cdn.jsdelivr.net/npm/@inlang/plugin-json@latest/dist/index.js"
|
||||
],
|
||||
"plugin.inlang.json": {
|
||||
@@ -26,7 +26,11 @@
|
||||
"recognizedJSXAttributes": [
|
||||
"tx",
|
||||
"subTx",
|
||||
"contentTx"
|
||||
"labelTx",
|
||||
"titleTx",
|
||||
"headingTx",
|
||||
"contentTx",
|
||||
"footerTx"
|
||||
]
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -17,7 +17,8 @@
|
||||
"adb:unreverse": "adb devices && adb reverse --remove-all",
|
||||
"adb:inspect": "adb shell input keyevent 82",
|
||||
"postinstall": "patch-package --exclude 'nothing'",
|
||||
"clean": "npx react-native-clean-project"
|
||||
"clean": "npx react-native-clean-project",
|
||||
"machine-translate": "npx @inlang/cli machine translate --project minibits.inlang"
|
||||
},
|
||||
"dependencies": {
|
||||
"@cashu/cashu-ts": "minibits-cash/cashu-ts#b3ba36757d84ec03f1064029db02308eb3a09cc4",
|
||||
|
||||
@@ -46,7 +46,7 @@ export const CollapsibleText = (props: CollapsibleProps) => {
|
||||
{...props.textProps}
|
||||
/>
|
||||
<View style={{ flexDirection: "row" }}>
|
||||
<Text tx={collapsed ? 'common.showMore' : 'common.hideMore'} style={{ color: textDim }} size="xs" />
|
||||
<Text tx={collapsed ? 'commonShowMore' : 'commonHideMore'} style={{ color: textDim }} size="xs" />
|
||||
<Icon icon={collapsed ? 'faChevronDown' : 'faChevronUp'} color={textDim} size={12} />
|
||||
</View>
|
||||
</Pressable>
|
||||
|
||||
@@ -42,7 +42,7 @@ export const MemoInputCard = forwardRef<TextInput, MemoInputProps>((props, memoI
|
||||
maxLength={maxLength}
|
||||
keyboardType="default"
|
||||
selectTextOnFocus={true}
|
||||
placeholder={translate('sendScreen.memo')}
|
||||
placeholder={translate('sendScreen_memo')}
|
||||
placeholderTextColor={placeholderTextColor}
|
||||
editable={!disabled}
|
||||
/>
|
||||
|
||||
@@ -16,7 +16,7 @@ export const ProfileHeader = observer(function (props: ProfileHeaderProps) {
|
||||
const { picture, nip05 } = walletProfileStore
|
||||
|
||||
return ( <AvatarHeader
|
||||
text={nip05 || translate("common.notCreated")}
|
||||
text={nip05 || translate("commonNotCreated")}
|
||||
textStyle={props.headerTextStyle}
|
||||
picture={picture}
|
||||
fallbackIcon="faCircleUser"
|
||||
|
||||
@@ -78,7 +78,7 @@ export const QRShareModal = (props: QRShareModalProps) => {
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
onPress={props.onClose}
|
||||
tx='common.close'
|
||||
tx='commonClose'
|
||||
preset='tertiary'
|
||||
/>
|
||||
</View>
|
||||
|
||||
+608
-555
File diff suppressed because it is too large
Load Diff
+618
-468
File diff suppressed because it is too large
Load Diff
@@ -174,28 +174,28 @@ export const TabsNavigator = createBottomTabNavigator({
|
||||
WalletNavigator: {
|
||||
screen: WalletStack,
|
||||
options: {
|
||||
tabBarLabel: translate("tabNavigator.walletLabel"),
|
||||
tabBarLabel: translate("tabNavigator_walletLabel"),
|
||||
tabBarIcon: ({ focused, color }) => <Icon icon="faWallet" color={color} size={spacing.large} />,
|
||||
}
|
||||
},
|
||||
TransactionsNavigator: {
|
||||
screen: TransactionsStack,
|
||||
options: {
|
||||
tabBarLabel: translate("tabNavigator.transactionsLabel"),
|
||||
tabBarLabel: translate("tabNavigator_transactionsLabel"),
|
||||
tabBarIcon: ({ focused, color }) => <Icon icon="faListUl" color={color} size={spacing.large} />,
|
||||
}
|
||||
},
|
||||
ContactsNavigator: {
|
||||
screen: ContactsStack,
|
||||
options: {
|
||||
tabBarLabel: translate("tabNavigator.contactsLabel"),
|
||||
tabBarLabel: translate("tabNavigator_contactsLabel"),
|
||||
tabBarIcon: ({ focused, color }) => <Icon icon="faAddressBook" color={color} size={spacing.large} />,
|
||||
}
|
||||
},
|
||||
SettingsNavigator: {
|
||||
screen: SettingsStack,
|
||||
options: {
|
||||
tabBarLabel: translate("tabNavigator.settingsLabel"),
|
||||
tabBarLabel: translate("tabNavigator_settingsLabel"),
|
||||
tabBarIcon: ({ focused, color }) => <Icon icon="faGears" color={color} size={spacing.large} />,
|
||||
}
|
||||
},
|
||||
|
||||
@@ -49,7 +49,7 @@ export const BackupOptionsScreen = observer(function () {
|
||||
onLeftPress={() => navigation.goBack()}
|
||||
/>
|
||||
<View style={[$headerContainer, {backgroundColor: headerBg}]}>
|
||||
<Text preset="heading" text="Backup" style={{color: headerTitle}} />
|
||||
<Text preset="heading" tx="backupOptionsTitle" style={{color: headerTitle}} />
|
||||
</View>
|
||||
<ScrollView style={$contentContainer}>
|
||||
<Card
|
||||
@@ -57,8 +57,8 @@ export const BackupOptionsScreen = observer(function () {
|
||||
HeadingComponent={
|
||||
<>
|
||||
<ListItem
|
||||
tx="backupScreen.mnemonicTitle"
|
||||
subTx="backupScreen.mnemonicDescription"
|
||||
tx="backupMnemonicTitle"
|
||||
subTx="backupMnemonicDescription"
|
||||
leftIcon='faSeedling'
|
||||
leftIconColor={colors.palette.orange400}
|
||||
leftIconInverse={true}
|
||||
@@ -73,8 +73,8 @@ export const BackupOptionsScreen = observer(function () {
|
||||
HeadingComponent={
|
||||
<>
|
||||
<ListItem
|
||||
text='Wallet backup'
|
||||
subText='Export wallet backup so that you can import it into a new device.'
|
||||
tx="backupWalletBackupTitle"
|
||||
subTx="backupWalletBackupDescription"
|
||||
leftIcon='faUpload'
|
||||
leftIconColor={colors.palette.focus300}
|
||||
leftIconInverse={true}
|
||||
|
||||
@@ -217,15 +217,15 @@ const onAmountEndEditing = () => {
|
||||
const amountNum = round(toNumber(amountToRequest) * precision, 0)
|
||||
|
||||
if (!amountNum || amountNum <= 0) {
|
||||
infoMessage(translate("payCommon.amountZeroOrNegative"))
|
||||
infoMessage(translate("payCommon_amountZeroOrNegative"))
|
||||
return
|
||||
}
|
||||
|
||||
const balances = proofsStore.getMintBalancesWithUnit(unit)
|
||||
if (balances.length === 0) {
|
||||
infoMessage(
|
||||
translate("topup.missingMintAddFirst"),
|
||||
translate("topup.missingMintAddFirstDesc"),
|
||||
translate("topup_missingMintAddFirst"),
|
||||
translate("topup_missingMintAddFirstDesc"),
|
||||
)
|
||||
return
|
||||
}
|
||||
@@ -390,7 +390,7 @@ return (
|
||||
)}
|
||||
<Text
|
||||
size="xs"
|
||||
text={translate("amount.requested")}
|
||||
text={translate("amountRequested")}
|
||||
style={{
|
||||
color: amountInputColor,
|
||||
textAlign: "center",
|
||||
@@ -422,7 +422,7 @@ return (
|
||||
<Button
|
||||
preset="secondary"
|
||||
style={$memoButton}
|
||||
text="Done"
|
||||
tx="commonCompleted"
|
||||
onPress={onMemoDone}
|
||||
/>
|
||||
</View>
|
||||
@@ -434,8 +434,8 @@ return (
|
||||
mintBalances={availableMintBalances}
|
||||
selectedMintBalance={mintBalanceToReceiveTo}
|
||||
unit={unit}
|
||||
title={'Mint to receive'}
|
||||
confirmTitle={translate("cashuPaymentRequest.create")}
|
||||
title={translate('cashuPaymentRequestTitle')}
|
||||
confirmTitle={translate("cashuPaymentRequest_create")}
|
||||
onMintBalanceSelect={onMintBalanceSelect}
|
||||
onCancel={onMintBalanceCancel}
|
||||
onMintBalanceConfirm={onMintBalanceConfirm}
|
||||
@@ -446,7 +446,7 @@ return (
|
||||
<>
|
||||
<QRCodeBlock
|
||||
qrCodeData={encodedPaymentRequest}
|
||||
title='Cashu Payment request'
|
||||
titleTx='cashuPaymentRequestQRTitle'
|
||||
type='PaymentRequest'
|
||||
size={270}
|
||||
/>
|
||||
@@ -459,7 +459,7 @@ return (
|
||||
ContentComponent={
|
||||
<>
|
||||
<TranItem
|
||||
label="cashuPaymentRequest.to"
|
||||
label="cashuPaymentRequest_to"
|
||||
isFirst={true}
|
||||
value={
|
||||
mintsStore.findByUrl(transaction.mint)
|
||||
@@ -473,13 +473,13 @@ return (
|
||||
/>
|
||||
)}
|
||||
<TranItem
|
||||
label="transactionCommon.feePaid"
|
||||
label="transactionCommon_feePaid"
|
||||
value={transaction.fee || 0}
|
||||
unit={unit}
|
||||
isCurrency={true}
|
||||
/>
|
||||
<TranItem
|
||||
label="tranDetailScreen.status"
|
||||
label="tranDetailScreen_status"
|
||||
value={transaction.status as string}
|
||||
/>
|
||||
</>
|
||||
@@ -489,7 +489,7 @@ return (
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx='common.close'
|
||||
tx='commonClose'
|
||||
onPress={gotoWallet}
|
||||
/>
|
||||
</View>
|
||||
@@ -507,13 +507,13 @@ return (
|
||||
<ResultModalInfo
|
||||
icon="faCheckCircle"
|
||||
iconColor={colors.palette.success200}
|
||||
title={translate('common.success')}
|
||||
title={translate('commonSuccess')}
|
||||
message={resultModalInfo?.message}
|
||||
/>
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx='common.close'
|
||||
tx='commonClose'
|
||||
onPress={gotoWallet}
|
||||
/>
|
||||
</View>
|
||||
@@ -525,13 +525,13 @@ return (
|
||||
<ResultModalInfo
|
||||
icon="faTriangleExclamation"
|
||||
iconColor={colors.palette.angry500}
|
||||
title={resultModalInfo?.title || translate('topup.failed')}
|
||||
title={resultModalInfo?.title || translate('topup_failed')}
|
||||
message={resultModalInfo?.message}
|
||||
/>
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx='common.close'
|
||||
tx='commonClose'
|
||||
onPress={toggleResultModal}
|
||||
/>
|
||||
</View>
|
||||
|
||||
@@ -100,7 +100,7 @@ export const ContactDetailScreen = observer(function ({ route }: Props) {
|
||||
contactsStore.saveNote(contact.pubkey, note || '')
|
||||
setIsNoteEditing(false)
|
||||
} catch (e: any) {
|
||||
setInfo(translate('common.saveFailParam', { param: e.message }))
|
||||
setInfo(translate('commonSaveFailParam', { param: e.message }))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ export const ContactDetailScreen = observer(function ({ route }: Props) {
|
||||
try {
|
||||
Clipboard.setString(contact.npub)
|
||||
} catch (e: any) {
|
||||
setInfo(translate('common.copyFailParam', { param: e.message }))
|
||||
setInfo(translate('commonCopyFailParam', { param: e.message }))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ export const ContactDetailScreen = observer(function ({ route }: Props) {
|
||||
<Button
|
||||
preset="secondary"
|
||||
style={$noteButton}
|
||||
text="Save"
|
||||
tx="commonSave"
|
||||
onPress={onNoteSave}
|
||||
|
||||
/>
|
||||
@@ -253,7 +253,7 @@ export const ContactDetailScreen = observer(function ({ route }: Props) {
|
||||
<Button
|
||||
preset="secondary"
|
||||
style={$noteButton}
|
||||
text="Edit"
|
||||
tx="commonEdit"
|
||||
onPress={onNoteEdit}
|
||||
|
||||
/>
|
||||
@@ -278,7 +278,7 @@ export const ContactDetailScreen = observer(function ({ route }: Props) {
|
||||
<ListItem
|
||||
LeftComponent={
|
||||
<Button
|
||||
tx="payCommon.requestPayment"
|
||||
tx="payCommon_requestPayment"
|
||||
style={{marginLeft: spacing.small, alignSelf: 'center', minHeight: verticalScale(20)}}
|
||||
textStyle={{fontSize: verticalScale(14), lineHeight: verticalScale(16)}}
|
||||
onPress={gotoTopup}
|
||||
@@ -287,7 +287,7 @@ export const ContactDetailScreen = observer(function ({ route }: Props) {
|
||||
}
|
||||
RightComponent={
|
||||
<Button
|
||||
tx="payCommon.payToAddress"
|
||||
tx="payCommon_payToAddress"
|
||||
style={{marginLeft: spacing.small, alignSelf: 'center', minHeight: verticalScale(20)}}
|
||||
textStyle={{fontSize: verticalScale(14), lineHeight: verticalScale(16)}}
|
||||
onPress={gotoTransfer}
|
||||
@@ -342,7 +342,7 @@ export const ContactDetailScreen = observer(function ({ route }: Props) {
|
||||
ContentComponent={
|
||||
<>
|
||||
<ListItem
|
||||
tx="share.contactAddress"
|
||||
tx="share_contactAddress"
|
||||
subText={nip05}
|
||||
leftIcon='faShareNodes'
|
||||
onPress={onShareContact}
|
||||
|
||||
@@ -108,7 +108,7 @@ export const OwnName = observer(function (props: {pubkey: string}) {
|
||||
stopPolling(`checkDonationPaidPoller-${donationInvoice.payment_hash}`)
|
||||
setResultModalInfo({
|
||||
status: TransactionStatus.COMPLETED,
|
||||
message: translate("contactsScreen.ownName.donationSuccess", { receiver: ownName + MINIBITS_NIP05_DOMAIN })
|
||||
message: translate("contactsScreen_ownName_donationSuccess", { receiver: ownName + MINIBITS_NIP05_DOMAIN })
|
||||
})
|
||||
toggleResultModal()
|
||||
//resetState()
|
||||
@@ -150,12 +150,12 @@ export const OwnName = observer(function (props: {pubkey: string}) {
|
||||
|
||||
const onOwnNameCheck = async function () {
|
||||
if(!ownName || ownName.length < 2) {
|
||||
setInfo(translate('contactsScreen.ownName.tooShort'))
|
||||
setInfo(translate('contactsScreen_ownName_tooShort'))
|
||||
return
|
||||
}
|
||||
|
||||
if(!isValidName(ownName)) {
|
||||
setInfo(translate('contactsScreen.ownName.illegalChar'))
|
||||
setInfo(translate('contactsScreen_ownName_illegalChar'))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ export const OwnName = observer(function (props: {pubkey: string}) {
|
||||
const profileExists = await MinibitsClient.getWalletProfileByNip05(ownName + MINIBITS_NIP05_DOMAIN)
|
||||
|
||||
if(profileExists) {
|
||||
setInfo(translate("contactsScreen.ownName.profileExists"))
|
||||
setInfo(translate("contactsScreen_ownName_profileExists"))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -286,7 +286,7 @@ export const OwnName = observer(function (props: {pubkey: string}) {
|
||||
{!isChecked ? (
|
||||
<Card
|
||||
style={[$card, {marginTop: spacing.small}]}
|
||||
headingTx='contactsScreen.ownName.chooseOwnName'
|
||||
headingTx='contactsScreen_ownName_chooseOwnName'
|
||||
headingStyle={{textAlign: 'center'}}
|
||||
ContentComponent={
|
||||
<View style={$ownNameContainer}>
|
||||
@@ -307,13 +307,13 @@ export const OwnName = observer(function (props: {pubkey: string}) {
|
||||
<Button
|
||||
preset="default"
|
||||
style={$ownNameButton}
|
||||
text="Check"
|
||||
tx="buttonCheck"
|
||||
onPress={onOwnNameCheck}
|
||||
// disabled={!isNameInputEnabled}
|
||||
/>
|
||||
</View>
|
||||
}
|
||||
footerTx='contactsScreen.ownName.chooseOwnNameFooter'
|
||||
footerTx='contactsScreen_ownName_chooseOwnNameFooter'
|
||||
footerStyle={{color: hint, textAlign: 'center'}}
|
||||
/>
|
||||
) : (
|
||||
@@ -323,7 +323,7 @@ export const OwnName = observer(function (props: {pubkey: string}) {
|
||||
<View style={$iconContainer}>
|
||||
<Icon icon='faCheckCircle' size={50} color={colors.palette.success200} />
|
||||
<Text
|
||||
text={translate('contactsScreen.ownName.available',{ name: ownName })}
|
||||
text={translate('contactsScreen_ownName_available',{ name: ownName })}
|
||||
style={{fontSize: 18}}
|
||||
/>
|
||||
</View>
|
||||
@@ -333,13 +333,13 @@ export const OwnName = observer(function (props: {pubkey: string}) {
|
||||
{donationInvoice ? (
|
||||
<>
|
||||
<Text
|
||||
text={translate("contactsScreen.ownName.payToGetOwnName", { name: ownName+MINIBITS_NIP05_DOMAIN })}
|
||||
text={translate("contactsScreen_ownName_payToGetOwnName", { name: ownName+MINIBITS_NIP05_DOMAIN })}
|
||||
style={[$supportText, {color: hint}]}
|
||||
/>
|
||||
|
||||
<QRCodeBlock
|
||||
qrCodeData={donationInvoice.payment_request}
|
||||
title='Lightning invoice to pay'
|
||||
titleTx="contactsScreen_ownName_lightningInvoiceToPayQR"
|
||||
type='Bolt11Invoice'
|
||||
size={270}
|
||||
/>
|
||||
@@ -351,7 +351,7 @@ export const OwnName = observer(function (props: {pubkey: string}) {
|
||||
text='Minibits'
|
||||
style={{fontFamily: 'Gluten-Regular', fontSize: 18}}
|
||||
/>{' '}
|
||||
<Text text='kindly asks you for a small donation for your new wallet address.' />
|
||||
<Text tx="contactsScreen_ownName_donationSubtext" />
|
||||
</RNText>
|
||||
<CurrencyAmount
|
||||
amount={donationAmount}
|
||||
@@ -359,7 +359,7 @@ export const OwnName = observer(function (props: {pubkey: string}) {
|
||||
size='extraLarge'
|
||||
containerStyle={{alignSelf: 'center', marginTop: spacing.medium}}
|
||||
/>
|
||||
<Text style={$supportText} text='Ready to donate more?' />
|
||||
<Text style={$supportText} tx='readyToDonateMore' />
|
||||
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
@@ -395,19 +395,19 @@ export const OwnName = observer(function (props: {pubkey: string}) {
|
||||
<Button
|
||||
preset="default"
|
||||
style={{marginRight: spacing.small}}
|
||||
tx='contactsScreen.getInvoice'
|
||||
tx='contactsScreen_getInvoice'
|
||||
onPress={onCreateDonation}
|
||||
/>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx='common.cancel'
|
||||
tx='commonCancel'
|
||||
onPress={resetState}
|
||||
/>
|
||||
</View>
|
||||
<ListItem
|
||||
textStyle={{fontSize: 12, color: hint}}
|
||||
leftIcon='faInfoCircle'
|
||||
tx='contactsScreen.ownName.betaWarning'
|
||||
tx='contactsScreen_ownName_betaWarning'
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
@@ -424,13 +424,13 @@ export const OwnName = observer(function (props: {pubkey: string}) {
|
||||
<ResultModalInfo
|
||||
icon="faCheckCircle"
|
||||
iconColor={colors.palette.success200}
|
||||
title={translate("common.success")}
|
||||
title={translate("commonSuccess")}
|
||||
message={resultModalInfo?.message as string}
|
||||
/>
|
||||
<View style={$payButtonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx={'common.close'}
|
||||
tx={'commonClose'}
|
||||
onPress={onResultModalClose}
|
||||
/>
|
||||
</View>
|
||||
|
||||
@@ -83,7 +83,7 @@ export const PrivateContacts = observer(function (props: {
|
||||
log.trace('Start', newContactName, 'saveNewContact')
|
||||
|
||||
if(!newContactName) {
|
||||
setInfo(translate("contactsScreen.privateContacts.saveNewFormat"))
|
||||
setInfo(translate("contactsScreen_privateContacts_saveNewFormat"))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ export const PrivateContacts = observer(function (props: {
|
||||
const profileRecord = await MinibitsClient.getWalletProfileByNip05(newContactName + MINIBITS_NIP05_DOMAIN)
|
||||
|
||||
if(!profileRecord) {
|
||||
warningMessage(translate("contactsScreen.privateContacts.profileNotFound", {
|
||||
warningMessage(translate("contactsScreen_privateContacts_profileNotFound", {
|
||||
name: newContactName + MINIBITS_NIP05_DOMAIN
|
||||
}))
|
||||
setIsLoading(false)
|
||||
@@ -289,16 +289,16 @@ export const PrivateContacts = observer(function (props: {
|
||||
leftIcon="faComment"
|
||||
leftIconInverse={true}
|
||||
leftIconColor={colors.palette.iconGreen200}
|
||||
tx='contactsScreen.privateContacts.explainerText'
|
||||
subTx="contactsScreen.privateContacts.explainerSubText"
|
||||
tx='contactsScreen_privateContacts_explainerText'
|
||||
subTx="contactsScreen_privateContacts_explainerSubText"
|
||||
onPress={gotoNew}
|
||||
/>
|
||||
<ListItem
|
||||
leftIcon="faCircleUser"
|
||||
leftIconInverse={true}
|
||||
leftIconColor={colors.palette.iconMagenta200}
|
||||
tx="contactsScreen.privateContacts.switchName"
|
||||
subTx='contactsScreen.privateContacts.switchNameSubText'
|
||||
tx="contactsScreen_privateContacts_switchName"
|
||||
subTx='contactsScreen_privateContacts_switchNameSubText'
|
||||
onPress={gotoProfile}
|
||||
topSeparator={true}
|
||||
/>
|
||||
@@ -322,7 +322,7 @@ export const PrivateContacts = observer(function (props: {
|
||||
onPress={gotoNew}
|
||||
style={[{backgroundColor: mainButtonColor, borderWidth: 1, borderColor: screenBg}, $buttonNew]}
|
||||
preset='tertiary'
|
||||
text='Add'
|
||||
tx='buttonAdd'
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
@@ -330,11 +330,11 @@ export const PrivateContacts = observer(function (props: {
|
||||
isVisible={isNewContactModalVisible ? true : false}
|
||||
ContentComponent={
|
||||
<View style={$newContainer}>
|
||||
<Text tx="contactsScreen.newTitle" preset="subheading" />
|
||||
<Text tx="contactsScreen_newTitle" preset="subheading" />
|
||||
<Text
|
||||
size="xxs"
|
||||
style={{color: domainText}}
|
||||
tx="contactsScreen.privateContacts.bottomModal"
|
||||
tx="contactsScreen_privateContacts_bottomModal"
|
||||
/>
|
||||
<View
|
||||
style={{
|
||||
@@ -372,7 +372,7 @@ export const PrivateContacts = observer(function (props: {
|
||||
</View>
|
||||
)}
|
||||
<Button
|
||||
tx={'common.save'}
|
||||
tx={'commonSave'}
|
||||
style={{
|
||||
borderRadius: spacing.small,
|
||||
marginRight: spacing.small,
|
||||
@@ -384,8 +384,8 @@ export const PrivateContacts = observer(function (props: {
|
||||
preset="tertiary"
|
||||
tx={
|
||||
isExternalDomain
|
||||
? 'contactsScreen.privateContacts.domainMinibits'
|
||||
: 'contactsScreen.privateContacts.domainExternal'
|
||||
? 'contactsScreen_privateContacts_domainMinibits'
|
||||
: 'contactsScreen_privateContacts_domainExternal'
|
||||
}
|
||||
onPress={toggleExternalDomain}
|
||||
style={{alignSelf: 'flex-start', minHeight: verticalScale(30)}}
|
||||
|
||||
@@ -216,7 +216,7 @@ export const PublicContacts = observer(function (props: {
|
||||
const onPastePublicPubkey = async function () {
|
||||
const key = await Clipboard.getString()
|
||||
if (!key) {
|
||||
setInfo(translate("contactsScreen.publicContacts.npubPasteError"))
|
||||
setInfo(translate("contactsScreen_publicContacts_npubPasteError"))
|
||||
return
|
||||
}
|
||||
setNewPublicPubkey(key.trim())
|
||||
@@ -447,8 +447,8 @@ export const PublicContacts = observer(function (props: {
|
||||
leftIcon='faComment'
|
||||
leftIconInverse={true}
|
||||
leftIconColor={colors.palette.iconViolet200}
|
||||
tx="nostr.tip"
|
||||
subTx='nostr.tipSubText'
|
||||
tx="nostr_tip"
|
||||
subTx='nostr_tipSubText'
|
||||
onPress={toggleNpubModal}
|
||||
/>
|
||||
}
|
||||
@@ -530,22 +530,22 @@ export const PublicContacts = observer(function (props: {
|
||||
<>
|
||||
<ListItem
|
||||
leftIcon='faKey'
|
||||
tx="nostr.setPublicKey"
|
||||
subTx='nostr.setPublicKeySubText'
|
||||
tx="nostr_setPublicKey"
|
||||
subTx='nostr_setPublicKeySubText'
|
||||
onPress={toggleNpubModal}
|
||||
bottomSeparator={true}
|
||||
/>
|
||||
<ListItem
|
||||
leftIcon='faCircleNodes'
|
||||
tx='nostr.setRelay'
|
||||
subTx='nostr.setRelaySubText'
|
||||
tx='nostr_setRelay'
|
||||
subTx='nostr_setRelaySubText'
|
||||
onPress={toggleRelayModal}
|
||||
bottomSeparator={true}
|
||||
/>
|
||||
<ListItem
|
||||
leftIcon='faBan'
|
||||
tx="nostr.removePub"
|
||||
subTx="nostr.removePubSubText"
|
||||
tx="nostr_removePub"
|
||||
subTx="nostr_removePubSubText"
|
||||
onPress={onRemovePublicPubKey}
|
||||
/>
|
||||
</>
|
||||
@@ -557,7 +557,7 @@ export const PublicContacts = observer(function (props: {
|
||||
isVisible={isNpubModalVisible}
|
||||
ContentComponent={
|
||||
<View style={$newContainer}>
|
||||
<Text tx="contactsScreen.publicContacts.addNpub" preset="subheading" />
|
||||
<Text tx="contactsScreen_publicContacts_addNpub" preset="subheading" />
|
||||
<View style={{flexDirection: 'row', alignItems: 'center', marginTop: spacing.small}}>
|
||||
<TextInput
|
||||
ref={npubInputRef}
|
||||
@@ -572,20 +572,20 @@ export const PublicContacts = observer(function (props: {
|
||||
style={[$npubInput, {backgroundColor: inputBg, color: inputText},]}
|
||||
/>
|
||||
<Button
|
||||
tx={'common.paste'}
|
||||
tx={'commonPaste'}
|
||||
preset='secondary'
|
||||
style={$pasteButton}
|
||||
onPress={onPastePublicPubkey}
|
||||
/>
|
||||
<Button
|
||||
tx={'common.save'}
|
||||
tx={'commonSave'}
|
||||
style={$saveButton}
|
||||
onPress={onSavePublicPubkey}
|
||||
/>
|
||||
</View>
|
||||
<View style={[$buttonContainer, {marginTop: spacing.medium}]}>
|
||||
<Button preset='tertiary' onPress={() => setNewPublicPubkey(defaultPublicNpub)} tx="contactsScreen.publicContacts.pasteDemoKey"/>
|
||||
<Button preset='tertiary' onPress={toggleNpubModal} tx="common.cancel"/>
|
||||
<Button preset='tertiary' onPress={() => setNewPublicPubkey(defaultPublicNpub)} tx="contactsScreen_publicContacts_pasteDemoKey"/>
|
||||
<Button preset='tertiary' onPress={toggleNpubModal} tx="commonCancel"/>
|
||||
</View>
|
||||
</View>
|
||||
}
|
||||
@@ -596,7 +596,7 @@ export const PublicContacts = observer(function (props: {
|
||||
isVisible={isRelayModalVisible ? true : false}
|
||||
ContentComponent={
|
||||
<View style={$newContainer}>
|
||||
<Text tx="contactsScreen.publicContacts.setOwnRelay" preset="subheading" />
|
||||
<Text tx="contactsScreen_publicContacts_setOwnRelay" preset="subheading" />
|
||||
<View style={{flexDirection: 'row', alignItems: 'center', marginTop: spacing.small}}>
|
||||
<TextInput
|
||||
ref={relayInputRef}
|
||||
@@ -605,28 +605,28 @@ export const PublicContacts = observer(function (props: {
|
||||
autoCapitalize='none'
|
||||
keyboardType='default'
|
||||
maxLength={64}
|
||||
placeholder='wss://...'
|
||||
placeholder={translate('placeholderRelay')}
|
||||
placeholderTextColor={placeholderTextColor}
|
||||
selectTextOnFocus={true}
|
||||
style={[$npubInput, {backgroundColor: inputBg, color: inputText},]}
|
||||
/>
|
||||
<Button
|
||||
tx={'common.paste'}
|
||||
tx={'commonPaste'}
|
||||
preset='secondary'
|
||||
style={$pasteButton}
|
||||
onPress={onPastePublicRelay}
|
||||
/>
|
||||
<Button
|
||||
tx={'common.save'}
|
||||
tx={'commonSave'}
|
||||
style={$saveButton}
|
||||
onPress={onSavePublicRelay}
|
||||
/>
|
||||
</View>
|
||||
<View style={[$buttonContainer, {marginTop: spacing.medium}]}>
|
||||
{newPublicRelay && (
|
||||
<Button preset='tertiary' onPress={onRemovePublicRelay} tx="common.resetDefault"/>
|
||||
<Button preset='tertiary' onPress={onRemovePublicRelay} tx="commonResetDefault"/>
|
||||
)}
|
||||
<Button preset='tertiary' onPress={toggleRelayModal} tx="common.cancel"/>
|
||||
<Button preset='tertiary' onPress={toggleRelayModal} tx="commonCancel"/>
|
||||
</View>
|
||||
</View>
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ export const RandomName = observer(function (props: {pubkey: string}) {
|
||||
|
||||
const confirmSelectedName = async function () {
|
||||
if (!selectedName) {
|
||||
setInfo(translate('contactsScreen.randomName.selectOneOfUsernames'))
|
||||
setInfo(translate('contactsScreen_randomName_selectOneOfUsernames'))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ export const RandomName = observer(function (props: {pubkey: string}) {
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
onPress={() => confirmSelectedName()}
|
||||
tx="common.confirm"
|
||||
tx="commonConfirm"
|
||||
style={{marginTop: spacing.medium, minWidth: 120}}
|
||||
/>
|
||||
</View>
|
||||
|
||||
@@ -106,16 +106,16 @@ export const DeveloperScreen = observer(function DeveloperScreen({ route }: Prop
|
||||
|
||||
const deletePending = async function () {
|
||||
Alert.alert(
|
||||
translate("common.confirmAlertTitle"),
|
||||
translate("commonConfirmAlertTitle"),
|
||||
"This action can not be undone. Use only in development or testing.",
|
||||
[
|
||||
{
|
||||
text: translate('common.cancel'),
|
||||
text: translate('commonCancel'),
|
||||
style: 'cancel',
|
||||
onPress: () => { /* Action canceled */ },
|
||||
},
|
||||
{
|
||||
text: translate('common.confirm'),
|
||||
text: translate('commonConfirm'),
|
||||
onPress: async () => {
|
||||
try {
|
||||
setIsLoading(true)
|
||||
@@ -146,16 +146,16 @@ export const DeveloperScreen = observer(function DeveloperScreen({ route }: Prop
|
||||
|
||||
const movePendingToSpendable = async function () {
|
||||
Alert.alert(
|
||||
translate("common.confirmAlertTitle"),
|
||||
translate("commonConfirmAlertTitle"),
|
||||
"This action may cause transactions failure. Use only as a recovery path agreed with support.",
|
||||
[
|
||||
{
|
||||
text: translate('common.cancel'),
|
||||
text: translate('commonCancel'),
|
||||
style: 'cancel',
|
||||
onPress: () => { /* Action canceled */ },
|
||||
},
|
||||
{
|
||||
text: translate('common.confirm'),
|
||||
text: translate('commonConfirm'),
|
||||
onPress: async () => {
|
||||
try {
|
||||
setIsLoading(true)
|
||||
@@ -199,16 +199,16 @@ export const DeveloperScreen = observer(function DeveloperScreen({ route }: Prop
|
||||
|
||||
const factoryReset = async function () {
|
||||
Alert.alert(
|
||||
translate("common.confirmAlertTitle"),
|
||||
translate("commonConfirmAlertTitle"),
|
||||
translate("factoryResetUserConfirmDesc"),
|
||||
[
|
||||
{
|
||||
text: translate('common.cancel'),
|
||||
text: translate('commonCancel'),
|
||||
style: 'cancel',
|
||||
onPress: () => { /* Action canceled */ },
|
||||
},
|
||||
{
|
||||
text: translate('common.confirm'),
|
||||
text: translate('commonConfirm'),
|
||||
onPress: async () => {
|
||||
setIsLoading(true)
|
||||
try {
|
||||
@@ -250,7 +250,7 @@ export const DeveloperScreen = observer(function DeveloperScreen({ route }: Prop
|
||||
<View style={[$headerContainer, {backgroundColor: headerBg}]}>
|
||||
<Text
|
||||
preset="heading"
|
||||
tx="developerScreen.title"
|
||||
tx="developerScreen_title"
|
||||
style={{color: headerTitle}}
|
||||
/>
|
||||
</View>
|
||||
@@ -259,7 +259,7 @@ export const DeveloperScreen = observer(function DeveloperScreen({ route }: Prop
|
||||
style={[$card]}
|
||||
HeadingComponent={
|
||||
<ListItem
|
||||
tx="developerScreen.info"
|
||||
tx="developerScreen_info"
|
||||
subText={`Environment: ${APP_ENV}
|
||||
JS Bundle version: ${JS_BUNDLE_VERSION}
|
||||
Commit: ${COMMIT}
|
||||
@@ -281,7 +281,7 @@ Sentry id: ${walletProfileStore.walletId}
|
||||
HeadingComponent={
|
||||
<>
|
||||
<ListItem
|
||||
tx="developerScreen.logLevel"
|
||||
tx="developerScreen_logLevel"
|
||||
subText={userSettingsStore.logLevel.toUpperCase()}
|
||||
leftIcon='faListUl'
|
||||
leftIconColor={colors.palette.iconMagenta200}
|
||||
@@ -301,8 +301,8 @@ Sentry id: ${walletProfileStore.walletId}
|
||||
onPress={() => userSettingsStore.setIsOnboarded(false)}
|
||||
/>
|
||||
<ListItem
|
||||
text="Resync transactions"
|
||||
subText="Refresh recent transactions history from database."
|
||||
tx="developerScreen_resyncTransactions"
|
||||
subTx="developerScreen_resyncTransactionsDescription"
|
||||
leftIcon='faRotate'
|
||||
leftIconColor={colors.palette.blue200}
|
||||
leftIconInverse={true}
|
||||
@@ -319,8 +319,8 @@ Sentry id: ${walletProfileStore.walletId}
|
||||
HeadingComponent={
|
||||
<>
|
||||
<ListItem
|
||||
text="Force move pending"
|
||||
subText="Move pending ecash back to spendable balance."
|
||||
tx="developerScreen_forceMovePending"
|
||||
subTx="developerScreen_forceMovePendingDescription"
|
||||
leftIcon='faArrowUp'
|
||||
leftIconColor={colors.palette.accent200}
|
||||
leftIconInverse={true}
|
||||
@@ -329,8 +329,8 @@ Sentry id: ${walletProfileStore.walletId}
|
||||
onPress={movePendingToSpendable}
|
||||
/>
|
||||
<ListItem
|
||||
text="Force delete pending"
|
||||
subText="Removes ecash from pending state and deletes all pending transactions."
|
||||
tx="developerScreen_forceDeletePending"
|
||||
subTx="developerScreen_forceDeletePendingDescription"
|
||||
leftIcon='faClock'
|
||||
leftIconColor={colors.palette.accent400}
|
||||
leftIconInverse={true}
|
||||
@@ -340,8 +340,8 @@ Sentry id: ${walletProfileStore.walletId}
|
||||
topSeparator
|
||||
/>
|
||||
<ListItem
|
||||
tx="developerScreen.reset"
|
||||
subTx="developerScreen.resetDescription"
|
||||
tx="developerScreen_reset"
|
||||
subTx="developerScreen_resetDescription"
|
||||
leftIcon='faXmark'
|
||||
leftIconColor={colors.palette.angry500}
|
||||
leftIconInverse={true}
|
||||
@@ -389,7 +389,7 @@ Sentry id: ${walletProfileStore.walletId}
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx='common.close'
|
||||
tx='commonClose'
|
||||
onPress={toggleLogLevelSelector}
|
||||
/>
|
||||
</View>
|
||||
|
||||
@@ -20,8 +20,8 @@ export function ErrorDetails(props: ErrorDetailsProps) {
|
||||
>
|
||||
<View style={$topSection}>
|
||||
<Icon icon="faInfoCircle" size={64} />
|
||||
<Text style={$heading} preset="subheading" tx="errorScreen.title" />
|
||||
<Text tx="errorScreen.friendlySubtitle" />
|
||||
<Text style={$heading} preset="subheading" tx="errorScreen_title" />
|
||||
<Text tx="errorScreen_friendlySubtitle" />
|
||||
</View>
|
||||
|
||||
<ScrollView style={$errorSection} contentContainerStyle={$errorSectionContentContainer}>
|
||||
@@ -37,7 +37,7 @@ export function ErrorDetails(props: ErrorDetailsProps) {
|
||||
preset="secondary"
|
||||
style={$resetButton}
|
||||
onPress={props.onReset}
|
||||
tx="errorScreen.reset"
|
||||
tx="errorScreen_reset"
|
||||
/>
|
||||
</Screen>
|
||||
)
|
||||
|
||||
@@ -174,12 +174,12 @@ export const ExportBackupScreen = function ExportBackup({ route }: Props) {
|
||||
'Do you want to swap your wallet ecash for proofs with optimal denominations? The size of your backup will decrease.',
|
||||
[
|
||||
{
|
||||
text: translate('common.cancel'),
|
||||
text: translate('commonCancel'),
|
||||
style: 'cancel',
|
||||
onPress: () => { /* Action canceled */ },
|
||||
},
|
||||
{
|
||||
text: translate('common.confirm'),
|
||||
text: translate('commonConfirm'),
|
||||
onPress: async () => {
|
||||
// Moves all wallet proofs to pending in transactions
|
||||
// split by mints and by units and in offline mode.
|
||||
@@ -404,7 +404,7 @@ export const ExportBackupScreen = function ExportBackup({ route }: Props) {
|
||||
<View style={[$headerContainer, {backgroundColor: headerBg}]}>
|
||||
<Text
|
||||
preset="heading"
|
||||
text="Wallet backup"
|
||||
tx="exportBackupWalletTitle"
|
||||
style={{color: headerTitle}}
|
||||
/>
|
||||
</View>
|
||||
@@ -414,7 +414,7 @@ export const ExportBackupScreen = function ExportBackup({ route }: Props) {
|
||||
<>
|
||||
{totalProofsCount > 0 && (
|
||||
<ListItem
|
||||
text="Ecash proofs"
|
||||
tx="exportBackupEcashProofs"
|
||||
subText={`Number of proofs: ${proofsStore.proofsCount}`}
|
||||
RightComponent={
|
||||
<View style={$rightContainer}>
|
||||
@@ -437,7 +437,7 @@ export const ExportBackupScreen = function ExportBackup({ route }: Props) {
|
||||
)}
|
||||
{mintsStore.mintCount > 0 && (
|
||||
<ListItem
|
||||
text="Mints"
|
||||
tx="exportBackupMints"
|
||||
subText={`Number of mints: ${mintsStore.mintCount}`}
|
||||
RightComponent={
|
||||
<View style={$rightContainer}>
|
||||
@@ -452,7 +452,7 @@ export const ExportBackupScreen = function ExportBackup({ route }: Props) {
|
||||
)}
|
||||
{contactsStore.count > 0 && (
|
||||
<ListItem
|
||||
text="Contacts"
|
||||
tx="contacts"
|
||||
subText={`Number of contacts: ${contactsStore.count}`}
|
||||
RightComponent={
|
||||
<View style={$rightContainer}>
|
||||
@@ -490,7 +490,7 @@ export const ExportBackupScreen = function ExportBackup({ route }: Props) {
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
onPress={copyBackup}
|
||||
text="Copy backup"
|
||||
tx="exportBackupCopyBackup"
|
||||
style={{
|
||||
marginRight: spacing.small
|
||||
}}
|
||||
@@ -514,7 +514,7 @@ export const ExportBackupScreen = function ExportBackup({ route }: Props) {
|
||||
<Button
|
||||
preset="tertiary"
|
||||
onPress={copyOrphanedProofs}
|
||||
text="Copy orphaned proofs"
|
||||
tx="exportBackupCopyOrphanedProofs"
|
||||
textStyle={{fontSize: 14, marginLeft: spacing.small}}
|
||||
/>
|
||||
)}
|
||||
@@ -530,13 +530,13 @@ export const ExportBackupScreen = function ExportBackup({ route }: Props) {
|
||||
<ResultModalInfo
|
||||
icon={'faCheckCircle'}
|
||||
iconColor={colors.palette.success200}
|
||||
title={resultModalInfo.title || translate('common.success')}
|
||||
title={resultModalInfo.title || translate('commonSuccess')}
|
||||
message={resultModalInfo?.message}
|
||||
/>
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx='common.close'
|
||||
tx='commonClose'
|
||||
onPress={toggleResultModal}
|
||||
/>
|
||||
</View>
|
||||
@@ -548,13 +548,13 @@ export const ExportBackupScreen = function ExportBackup({ route }: Props) {
|
||||
<ResultModalInfo
|
||||
icon="faTriangleExclamation"
|
||||
iconColor={colors.palette.focus300}
|
||||
title={resultModalInfo?.title as string || translate('transactionCommon.receiveFailed')}
|
||||
title={resultModalInfo?.title as string || translate('transactionCommon_receiveFailed')}
|
||||
message={resultModalInfo?.message as string}
|
||||
/>
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx={'common.close'}
|
||||
tx={'commonClose'}
|
||||
onPress={toggleResultModal}
|
||||
/>
|
||||
</View>
|
||||
|
||||
@@ -103,7 +103,7 @@ export const ImportBackupScreen = observer(function ImportBackupScreen({ route }
|
||||
const onConfirmMnemonic = async function () {
|
||||
try {
|
||||
if(!mnemonic) {
|
||||
throw new AppError(Err.VALIDATION_ERROR, translate('backupScreen.missingMnemonicError'))
|
||||
throw new AppError(Err.VALIDATION_ERROR, translate('backupMissingMnemonicError'))
|
||||
}
|
||||
|
||||
LayoutAnimation.easeInEaseOut()
|
||||
@@ -130,7 +130,7 @@ export const ImportBackupScreen = observer(function ImportBackupScreen({ route }
|
||||
if(profile.nip05.includes(MINIBITS_NIP05_DOMAIN)) {
|
||||
setProfileToRecover(profile)
|
||||
} else {
|
||||
setInfo(translate("recovery.ownKeysImportAgain", { addr: profile.nip05 }))
|
||||
setInfo(translate("recovery_ownKeysImportAgain", { addr: profile.nip05 }))
|
||||
setIsNewProfileNeeded(true)
|
||||
}
|
||||
} catch (e: any) {
|
||||
@@ -216,7 +216,7 @@ export const ImportBackupScreen = observer(function ImportBackupScreen({ route }
|
||||
throw new AppError(Err.VALIDATION_ERROR, 'Missing wallet spnapshot decoded from backup.')
|
||||
}
|
||||
|
||||
setStatusMessage(translate("recovery.starting"))
|
||||
setStatusMessage(translate("recovery_starting"))
|
||||
setIsLoading(true)
|
||||
|
||||
// import wallet snapshot into the state
|
||||
@@ -270,12 +270,12 @@ export const ImportBackupScreen = observer(function ImportBackupScreen({ route }
|
||||
const onCompleteAddress = async () => {
|
||||
try {
|
||||
if(!seedHashRef.current || !seedRef.current) {
|
||||
throw new AppError(Err.VALIDATION_ERROR, translate('backupScreen.missingMnemonicOrSeedError'))
|
||||
throw new AppError(Err.VALIDATION_ERROR, translate('backupMissingMnemonicOrSeedError'))
|
||||
}
|
||||
// create a new walletId and Nostr key pair after a new install or factory reset
|
||||
// and keep provided seed
|
||||
setIsLoading(true)
|
||||
setStatusMessage(translate("recovery.recoveringAddress"))
|
||||
setStatusMessage(translate("recovery_recoveringAddress"))
|
||||
|
||||
const keys = KeyChain.generateWalletKeys()
|
||||
// Set seed to the provided one
|
||||
@@ -315,7 +315,7 @@ export const ImportBackupScreen = observer(function ImportBackupScreen({ route }
|
||||
await mintsStore.addMint(MINIBITS_MINT_URL)
|
||||
}
|
||||
|
||||
setStatusMessage(translate('recovery.completed'))
|
||||
setStatusMessage(translate('recovery_completed'))
|
||||
|
||||
// go directly to the wallet (profile hase been rehydrated from the one with the seed)
|
||||
// @ts-ignore
|
||||
@@ -346,15 +346,15 @@ export const ImportBackupScreen = observer(function ImportBackupScreen({ route }
|
||||
return (
|
||||
<Screen contentContainerStyle={$screen} preset="fixed">
|
||||
<View style={[$headerContainer, {backgroundColor: headerBg}]}>
|
||||
<Text preset="heading" text="Wallet recovery" style={{color: headerTitle, zIndex: 10}} />
|
||||
<Text preset="heading" tx="importBackupWalletRecovery" style={{color: headerTitle, zIndex: 10}} />
|
||||
</View>
|
||||
<ScrollView style={$contentContainer}>
|
||||
<Card
|
||||
style={$card}
|
||||
ContentComponent={
|
||||
<ListItem
|
||||
tx="recovery.mnemonicCollision"
|
||||
subTx="recovery.mnemonicCollisionDesc"
|
||||
tx="recovery_mnemonicCollision"
|
||||
subTx="recovery_mnemonicCollisionDesc"
|
||||
leftIcon='faTriangleExclamation'
|
||||
// leftIconColor='red'
|
||||
style={$item}
|
||||
@@ -365,7 +365,7 @@ export const ImportBackupScreen = observer(function ImportBackupScreen({ route }
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
onPress={onBack}
|
||||
tx='common.back'
|
||||
tx='commonBack'
|
||||
preset='secondary'
|
||||
/>
|
||||
</View>
|
||||
@@ -398,7 +398,7 @@ export const ImportBackupScreen = observer(function ImportBackupScreen({ route }
|
||||
style={$card}
|
||||
ContentComponent={
|
||||
<ListItem
|
||||
text="Insert wallet backup"
|
||||
tx="importBackupInsertWalletBackup"
|
||||
subText={'Paste the backup exported from previous wallet.'}
|
||||
LeftComponent={<View style={[$numIcon, {backgroundColor: numIconColor}]}><Text text='2'/></View>}
|
||||
style={$item}
|
||||
@@ -423,12 +423,12 @@ export const ImportBackupScreen = observer(function ImportBackupScreen({ route }
|
||||
{backup ? (
|
||||
<Button
|
||||
onPress={onConfirmBackup}
|
||||
tx='common.confirm'
|
||||
tx='commonConfirm'
|
||||
/>
|
||||
) : (
|
||||
<Button
|
||||
onPress={onPasteBackup}
|
||||
tx='common.paste'
|
||||
tx='commonPaste'
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ export const LightningPayScreen = function LightningPayScreen({ route }: Props)
|
||||
setMint(mint)
|
||||
}
|
||||
|
||||
if (!isInternetReachable) setInfo(translate('common.offlinePretty'))
|
||||
if (!isInternetReachable) setInfo(translate('commonOfflinePretty'))
|
||||
} catch (e: any) {
|
||||
handleError(e)
|
||||
}
|
||||
@@ -88,7 +88,7 @@ export const LightningPayScreen = function LightningPayScreen({ route }: Props)
|
||||
const onPaste = async function() {
|
||||
const clipboard = await Clipboard.getString()
|
||||
if (clipboard.length === 0) {
|
||||
infoMessage(translate('lightningPayScreen.onPasteEmptyClipboard'))
|
||||
infoMessage(translate('lightningPayScreen_onPasteEmptyClipboard'))
|
||||
return
|
||||
}
|
||||
setLightningData(clipboard)
|
||||
@@ -178,7 +178,7 @@ export const LightningPayScreen = function LightningPayScreen({ route }: Props)
|
||||
<View style={[$headerContainer, {backgroundColor: headerBg}]}>
|
||||
<Text
|
||||
preset="heading"
|
||||
tx="lightningPayScreen.payHeading"
|
||||
tx="lightningPayScreen_payHeading"
|
||||
style={{color: headerTitle}}
|
||||
/>
|
||||
</View>
|
||||
@@ -188,7 +188,7 @@ export const LightningPayScreen = function LightningPayScreen({ route }: Props)
|
||||
<ListItem
|
||||
leftIcon='faBolt'
|
||||
leftIconColor={colors.palette.orange400}
|
||||
tx="payCommon.payWithLightning"
|
||||
tx="payCommon_payWithLightning"
|
||||
bottomSeparator={true}
|
||||
RightComponent={
|
||||
<Button
|
||||
@@ -226,7 +226,7 @@ export const LightningPayScreen = function LightningPayScreen({ route }: Props)
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset='default'
|
||||
tx='common.confirm'
|
||||
tx='commonConfirm'
|
||||
onPress={onConfirm}
|
||||
style={{marginLeft: spacing.small}}
|
||||
LeftAccessory={() => <Icon icon='faCheckCircle' color='white'/>}
|
||||
@@ -236,13 +236,13 @@ export const LightningPayScreen = function LightningPayScreen({ route }: Props)
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset='secondary'
|
||||
tx='common.paste'
|
||||
tx='commonPaste'
|
||||
onPress={onPaste}
|
||||
LeftAccessory={() => <Icon icon='faPaste'/> }
|
||||
/>
|
||||
<Button
|
||||
preset='secondary'
|
||||
tx={'common.scan'}
|
||||
tx={'commonScan'}
|
||||
onPress={gotoScan}
|
||||
style={{marginLeft: spacing.small}}
|
||||
LeftAccessory={() => {
|
||||
@@ -263,7 +263,7 @@ export const LightningPayScreen = function LightningPayScreen({ route }: Props)
|
||||
}
|
||||
/>
|
||||
<Button
|
||||
tx="common.sendAsEcash"
|
||||
tx="commonSendAsEcash"
|
||||
LeftAccessory={() => (
|
||||
<Icon
|
||||
icon='faMoneyBill1'
|
||||
|
||||
@@ -210,7 +210,7 @@ export const MintInfoScreen = observer(function MintInfoScreen({ route }: Props)
|
||||
{mintInfo?.motd && mintInfo?.motd !== 'Message to users' && <MOTDCard info={mintInfo} />}
|
||||
{mintInfo && <DescriptionCard info={mintInfo} />}
|
||||
<Card
|
||||
label={"Mint URL"}
|
||||
labelTx={"mintInfo_mintUrlHeading"}
|
||||
HeadingTextProps={{style: [$sizeStyles.sm, {color: textDim}]}}
|
||||
content={mint?.mintUrl}
|
||||
RightComponent={
|
||||
@@ -228,7 +228,7 @@ export const MintInfoScreen = observer(function MintInfoScreen({ route }: Props)
|
||||
<>
|
||||
<ContactCard info={mintInfo} popupMessage={setInfo} />
|
||||
<Card
|
||||
labelTx={"mintInfo.keyValueInfoCardHeading"}
|
||||
labelTx={"mintInfo_keyValueInfoCardHeading"}
|
||||
ContentComponent={
|
||||
<>
|
||||
{mintInfo && <MintInfoDetails info={mintInfo} popupMessage={setInfo} />}
|
||||
@@ -247,7 +247,7 @@ export const MintInfoScreen = observer(function MintInfoScreen({ route }: Props)
|
||||
<View style={$rightContainer}>
|
||||
<Button
|
||||
onPress={toggleLocalInfo}
|
||||
text={isLocalInfoVisible ? translate("common.hide") : translate("common.show")}
|
||||
text={isLocalInfoVisible ? translate("commonHide") : translate("commonShow")}
|
||||
preset="secondary"
|
||||
/>
|
||||
</View>
|
||||
@@ -274,8 +274,8 @@ export const MintInfoScreen = observer(function MintInfoScreen({ route }: Props)
|
||||
)}
|
||||
<QRShareModal
|
||||
data={route.params.mintUrl}
|
||||
shareModalTx='mintsScreen.share'
|
||||
subHeading={mintInfo?.name ?? translate('mintInfo.loadingNamePlaceholder')}
|
||||
shareModalTx='mintsScreen_share'
|
||||
subHeading={mintInfo?.name ?? translate('mintInfo_loadingNamePlaceholder')}
|
||||
type='URL'
|
||||
isVisible={isShareModalVisible}
|
||||
onClose={toggleShareModal}
|
||||
@@ -334,12 +334,12 @@ function MintLimitsCard(props: { info: GetInfoResponse, limitInfo: ReturnType<ty
|
||||
const textDim = useThemeColor('textDim')
|
||||
|
||||
return (<Card
|
||||
labelTx="mintInfo.mintMeltHeading"
|
||||
labelTx="mintInfo_mintMeltHeading"
|
||||
// HeadingTextProps={{ style: [$sizeStyles.sm, { color: textDim }] }}
|
||||
ContentComponent={<>
|
||||
<View style={$limitItemWrapper}>
|
||||
<Text text="Deposit (Mint)" style={{ width: '50%' }} />
|
||||
<Text text="Withdraw (Melt)" style={{ width: '50%' }} />
|
||||
<Text tx="mintInfo_depositMint" style={{ width: '50%' }} />
|
||||
<Text tx="mintInfo_withdrawMelt" style={{ width: '50%' }} />
|
||||
</View>
|
||||
<View style={$limitItemWrapper}>
|
||||
<LimitItem m={props.limitInfo.mintSats as MethodLimit} type="mint" />
|
||||
@@ -352,8 +352,8 @@ function MintLimitsCard(props: { info: GetInfoResponse, limitInfo: ReturnType<ty
|
||||
function DescriptionCard(props: {info: GetInfoResponse}) {
|
||||
const textDim = useThemeColor('textDim')
|
||||
return (<Card
|
||||
// labelTx="mintInfo.descriptionHeading"
|
||||
//headingTx="mintInfo.descriptionHeading"
|
||||
// labelTx="mintInfo_descriptionHeading"
|
||||
//headingTx="mintInfo_descriptionHeading"
|
||||
// HeadingTextProps={{ style: [$sizeStyles.sm, { color: textDim }] }}
|
||||
ContentComponent={
|
||||
props.info && props.info.description ? (
|
||||
@@ -368,8 +368,8 @@ function DescriptionCard(props: {info: GetInfoResponse}) {
|
||||
) : (
|
||||
<Text
|
||||
style={{fontStyle: 'italic'}}
|
||||
text={translate('mintInfo.emptyValueParam', {
|
||||
param: translate('mintInfo.descriptionHeading'),
|
||||
text={translate('mintInfo_emptyValueParam', {
|
||||
param: translate('mintInfo_descriptionHeading'),
|
||||
})}
|
||||
/>
|
||||
)
|
||||
@@ -438,7 +438,7 @@ function NutsCard(props: {info: GetInfoResponse}) {
|
||||
const smallNutCols = 4
|
||||
return (
|
||||
<Card
|
||||
labelTx="mintInfo.nutsHeading"
|
||||
labelTx="mintInfo_nutsHeading"
|
||||
style={{marginBottom: spacing.small}}
|
||||
// HeadingTextProps={{style: [$sizeStyles.sm, {color: textDim}]}}
|
||||
ContentComponent={
|
||||
@@ -480,13 +480,13 @@ function ContactCard(props: { info: GetInfoResponse, popupMessage: (msg: string)
|
||||
|
||||
return (
|
||||
<Card
|
||||
labelTx="mintInfo.contactsHeading"
|
||||
labelTx="mintInfo_contactsHeading"
|
||||
//HeadingTextProps={{style: [$sizeStyles.sm, {color: textDim}]}}
|
||||
ContentComponent={
|
||||
contacts.length === 0 ? (
|
||||
<Text
|
||||
style={{fontStyle: 'italic'}}
|
||||
text={translate('mintInfo.emptyValueParam', { param: translate('mintInfo.contactsHeading') })}
|
||||
text={translate('mintInfo_emptyValueParam', { param: translate('mintInfo_contactsHeading') })}
|
||||
/>
|
||||
) : (
|
||||
<>
|
||||
@@ -501,7 +501,7 @@ function ContactCard(props: { info: GetInfoResponse, popupMessage: (msg: string)
|
||||
topSeparator={index !== 0}
|
||||
onLongPress={() => {
|
||||
Clipboard.setString(info)
|
||||
props.popupMessage(translate('common.copySuccessParam', { param: info }))
|
||||
props.popupMessage(translate('commonCopySuccessParam', { param: info }))
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
@@ -526,7 +526,7 @@ function MintInfoDetails(props: { info: GetInfoResponse, popupMessage: (msg: str
|
||||
style={{fontStyle: 'italic'}}
|
||||
size="xs"
|
||||
key={key}
|
||||
text={translate('mintInfo.emptyValueParam', { param: key })}
|
||||
text={translate('mintInfo_emptyValueParam', { param: key })}
|
||||
/>
|
||||
|
||||
let stringValue = isObj(value) ? JSON.stringify(value) : value.toString() ?? ''
|
||||
@@ -537,7 +537,7 @@ function MintInfoDetails(props: { info: GetInfoResponse, popupMessage: (msg: str
|
||||
const handleLongPress = () => {
|
||||
if (stringValue.trim() === '') return;
|
||||
Clipboard.setString(stringValue)
|
||||
props.popupMessage(translate('common.copySuccessParam', { param: stringValue }))
|
||||
props.popupMessage(translate('commonCopySuccessParam', { param: stringValue }))
|
||||
}
|
||||
|
||||
// @ts-ignore no-implicit-any
|
||||
|
||||
@@ -109,7 +109,7 @@ export const MintBalanceSelector = observer(function (props: {
|
||||
ListFooterComponent={props.mintBalances.length > 1 && collapsible ? (
|
||||
<View style={{alignItems: 'center'}}>
|
||||
<Button
|
||||
tx={allVisible ? 'common.hideMore' : 'common.showMore'}
|
||||
tx={allVisible ? 'commonHideMore' : 'commonShowMore'}
|
||||
onPress={toggleAllVisible}
|
||||
preset='tertiary'
|
||||
textStyle={{fontSize: 14}}
|
||||
@@ -153,7 +153,7 @@ export const MintBalanceSelector = observer(function (props: {
|
||||
<Icon icon={props.cancelIcon} color={secondaryIconColor} size={spacing.medium}/>
|
||||
))
|
||||
}
|
||||
tx={'common.cancel'}
|
||||
tx={'commonCancel'}
|
||||
onPress={props.onCancel}
|
||||
/>
|
||||
</View>
|
||||
|
||||
+25
-25
@@ -79,7 +79,7 @@ export const MintsScreen = observer(function MintsScreen({ route }: Props) {
|
||||
new URL(url)
|
||||
setMintUrl(url)
|
||||
} catch (e) {
|
||||
setInfo(translate('mintsScreen.invalidUrl'))
|
||||
setInfo(translate('mintsScreen_invalidUrl'))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ export const MintsScreen = observer(function MintsScreen({ route }: Props) {
|
||||
setIsAddMintVisible(false)
|
||||
|
||||
if (mintsStore.alreadyExists(mintUrl)) {
|
||||
const msg = translate('mintsScreen.mintExists')
|
||||
const msg = translate('mintsScreen_mintExists')
|
||||
log.trace(msg)
|
||||
setInfo(msg)
|
||||
return
|
||||
@@ -116,7 +116,7 @@ export const MintsScreen = observer(function MintsScreen({ route }: Props) {
|
||||
toggleAddMintModal() // close
|
||||
setIsLoading(true)
|
||||
await mintsStore.addMint(mintUrl)
|
||||
setInfo(translate('mintsScreen.mintAdded'))
|
||||
setInfo(translate('mintsScreen_mintAdded'))
|
||||
} catch (e: any) {
|
||||
setMintUrl('')
|
||||
handleError(e)
|
||||
@@ -191,7 +191,7 @@ export const MintsScreen = observer(function MintsScreen({ route }: Props) {
|
||||
if (!selectedMint) {return}
|
||||
|
||||
if(mintsStore.allMints.length === 1) {
|
||||
setInfo('You need to keep at least 1 mint.')
|
||||
setInfo(translate('mintsScreen_keepAtLeastOneMint'))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -209,14 +209,14 @@ export const MintsScreen = observer(function MintsScreen({ route }: Props) {
|
||||
message,
|
||||
[
|
||||
{
|
||||
text: translate('common.cancel'),
|
||||
text: translate('commonCancel'),
|
||||
style: 'cancel',
|
||||
onPress: () => {
|
||||
// Action canceled
|
||||
},
|
||||
},
|
||||
{
|
||||
text: translate('common.confirm'),
|
||||
text: translate('commonConfirm'),
|
||||
onPress: () => {
|
||||
try {
|
||||
onMintUnselect()
|
||||
@@ -228,7 +228,7 @@ export const MintsScreen = observer(function MintsScreen({ route }: Props) {
|
||||
if (pendingProofsByMint && pendingProofsByMint.length > 0) {
|
||||
proofsStore.removeProofs(pendingProofsByMint, true)
|
||||
}
|
||||
setInfo(translate('mintsScreen.mintRemoved'))
|
||||
setInfo(translate('mintsScreen_mintRemoved'))
|
||||
} catch (e: any) {
|
||||
handleError(e)
|
||||
}
|
||||
@@ -242,7 +242,7 @@ export const MintsScreen = observer(function MintsScreen({ route }: Props) {
|
||||
if (!selectedMint) return
|
||||
try {
|
||||
mintsStore.blockMint(selectedMint as Mint)
|
||||
setInfo(translate('mintsScreen.mintBlocked'))
|
||||
setInfo(translate('mintsScreen_mintBlocked'))
|
||||
} catch (e: any) {
|
||||
handleError(e)
|
||||
} finally {
|
||||
@@ -254,7 +254,7 @@ export const MintsScreen = observer(function MintsScreen({ route }: Props) {
|
||||
if (!selectedMint) return
|
||||
try {
|
||||
mintsStore.unblockMint(selectedMint as Mint)
|
||||
setInfo(translate('mintsScreen.mintUnblocked'))
|
||||
setInfo(translate('mintsScreen_mintUnblocked'))
|
||||
} catch (e: any) {
|
||||
handleError(e)
|
||||
} finally {
|
||||
@@ -308,7 +308,7 @@ export const MintsScreen = observer(function MintsScreen({ route }: Props) {
|
||||
ContentComponent={
|
||||
<>
|
||||
<ListItem
|
||||
tx='mintsScreen.addMint'
|
||||
tx='mintsScreen_addMint'
|
||||
LeftComponent={<Icon
|
||||
containerStyle={$iconContainer}
|
||||
icon="faPlus"
|
||||
@@ -321,7 +321,7 @@ export const MintsScreen = observer(function MintsScreen({ route }: Props) {
|
||||
/>
|
||||
{!mintsStore.alreadyExists(defaultMintUrl) && (
|
||||
<ListItem
|
||||
tx="mintsScreen.addMintMinibits"
|
||||
tx="mintsScreen_addMintMinibits"
|
||||
LeftComponent={<SvgXml
|
||||
width={spacing.medium}
|
||||
height={spacing.medium}
|
||||
@@ -369,21 +369,21 @@ export const MintsScreen = observer(function MintsScreen({ route }: Props) {
|
||||
<ListItem
|
||||
leftIcon="faInfoCircle"
|
||||
onPress={gotoInfo}
|
||||
tx='mintsScreen.mintInfo'
|
||||
tx='mintsScreen_mintInfo'
|
||||
bottomSeparator={true}
|
||||
style={{paddingHorizontal: spacing.medium}}
|
||||
/>
|
||||
<ListItem
|
||||
leftIcon="faQrcode"
|
||||
onPress={onShare}
|
||||
tx="mintsScreen.share"
|
||||
tx="mintsScreen_share"
|
||||
bottomSeparator={true}
|
||||
style={{paddingHorizontal: spacing.medium}}
|
||||
/>
|
||||
<ListItem
|
||||
leftIcon='faRotate'
|
||||
onPress={updateMint}
|
||||
tx="mintsScreen.refreshMintSettings"
|
||||
tx="mintsScreen_refreshMintSettings"
|
||||
bottomSeparator={true}
|
||||
style={{paddingHorizontal: spacing.medium}}
|
||||
/>
|
||||
@@ -391,7 +391,7 @@ export const MintsScreen = observer(function MintsScreen({ route }: Props) {
|
||||
<ListItem
|
||||
leftIcon="faShieldHalved"
|
||||
onPress={unblockMint}
|
||||
tx='mintsScreen.unblockMint'
|
||||
tx='mintsScreen_unblockMint'
|
||||
bottomSeparator={true}
|
||||
style={{paddingHorizontal: spacing.medium}}
|
||||
/>
|
||||
@@ -399,7 +399,7 @@ export const MintsScreen = observer(function MintsScreen({ route }: Props) {
|
||||
<ListItem
|
||||
leftIcon="faShieldHalved"
|
||||
onPress={blockMint}
|
||||
tx='mintsScreen.blockMint'
|
||||
tx='mintsScreen_blockMint'
|
||||
bottomSeparator={true}
|
||||
style={{paddingHorizontal: spacing.medium}}
|
||||
/>
|
||||
@@ -407,14 +407,14 @@ export const MintsScreen = observer(function MintsScreen({ route }: Props) {
|
||||
<ListItem
|
||||
leftIcon='faGlobe'
|
||||
onPress={updateMintUrlStart}
|
||||
text="Update mint URL"
|
||||
tx="mintsScreen_updateMintUrl"
|
||||
bottomSeparator={true}
|
||||
style={{paddingHorizontal: spacing.medium}}
|
||||
/>
|
||||
<ListItem
|
||||
leftIcon="faXmark"
|
||||
onPress={removeMint}
|
||||
tx='mintsScreen.removeMint'
|
||||
tx='mintsScreen_removeMint'
|
||||
bottomSeparator={true}
|
||||
style={{paddingHorizontal: spacing.medium}}
|
||||
/>
|
||||
@@ -429,7 +429,7 @@ export const MintsScreen = observer(function MintsScreen({ route }: Props) {
|
||||
<View style={$bottomModal}>
|
||||
<Text
|
||||
preset="subheading"
|
||||
tx={selectedMint ? 'mintsScreen.updateMintUrl' : 'mintsScreen.addMintUrl'}
|
||||
tx={selectedMint ? 'mintsScreen_updateMintUrl' : 'mintsScreen_addMintUrl'}
|
||||
// style={{marginBottom: spacing.medium, textAlign: 'center'}}
|
||||
/>
|
||||
<View style={{flexDirection: 'row', alignItems: 'center', marginTop: spacing.small}}>
|
||||
@@ -447,7 +447,7 @@ export const MintsScreen = observer(function MintsScreen({ route }: Props) {
|
||||
/>
|
||||
<Button
|
||||
preset='secondary'
|
||||
tx='common.paste'
|
||||
tx='commonPaste'
|
||||
style={{
|
||||
borderRadius: 0,
|
||||
marginLeft: -spacing.small,
|
||||
@@ -458,7 +458,7 @@ export const MintsScreen = observer(function MintsScreen({ route }: Props) {
|
||||
/>
|
||||
<Button
|
||||
preset='secondary'
|
||||
tx="common.scan"
|
||||
tx="commonScan"
|
||||
style={{
|
||||
borderTopLeftRadius: 0,
|
||||
borderBottomLeftRadius: 0,
|
||||
@@ -470,7 +470,7 @@ export const MintsScreen = observer(function MintsScreen({ route }: Props) {
|
||||
<View style={$buttonContainer}>
|
||||
{selectedMint ? (
|
||||
<Button
|
||||
tx='common.update'
|
||||
tx='commonUpdate'
|
||||
style={{
|
||||
// borderTopLeftRadius: 0,
|
||||
// borderBottomLeftRadius: 0,
|
||||
@@ -481,7 +481,7 @@ export const MintsScreen = observer(function MintsScreen({ route }: Props) {
|
||||
/>
|
||||
) : (
|
||||
<Button
|
||||
tx='common.save'
|
||||
tx='commonSave'
|
||||
style={{
|
||||
// borderTopLeftRadius: 0,
|
||||
// borderBottomLeftRadius: 0,
|
||||
@@ -493,7 +493,7 @@ export const MintsScreen = observer(function MintsScreen({ route }: Props) {
|
||||
)}
|
||||
|
||||
<Button
|
||||
tx='common.cancel'
|
||||
tx='commonCancel'
|
||||
onPress={toggleAddMintModal}
|
||||
preset="secondary"
|
||||
/>
|
||||
@@ -506,7 +506,7 @@ export const MintsScreen = observer(function MintsScreen({ route }: Props) {
|
||||
{selectedMint && (
|
||||
<QRShareModal
|
||||
data={selectedMint.mintUrl}
|
||||
shareModalTx='mintsScreen.share'
|
||||
shareModalTx='mintsScreen_share'
|
||||
subHeading={selectedMint?.shortname}
|
||||
type='URL'
|
||||
isVisible={isShareModalVisible}
|
||||
|
||||
@@ -56,7 +56,7 @@ export const MnemonicScreen = observer(function MnemonicScreen({ route }: Props)
|
||||
if (!validateMnemonic(mnemonic, wordlist)) {
|
||||
throw new AppError(
|
||||
Err.VALIDATION_ERROR,
|
||||
translate("backupScreen.invalidMnemonicError")
|
||||
translate("backupInvalidMnemonicError")
|
||||
)
|
||||
}
|
||||
|
||||
@@ -79,10 +79,10 @@ export const MnemonicScreen = observer(function MnemonicScreen({ route }: Props)
|
||||
}
|
||||
throw new AppError(
|
||||
Err.VALIDATION_ERROR,
|
||||
translate("backupScreen.missingMnemonicError")
|
||||
translate("backupMissingMnemonicError")
|
||||
)
|
||||
} catch (e: any) {
|
||||
setInfo(translate('common.copyFailParam', { param: e.message }))
|
||||
setInfo(translate('commonCopyFailParam', { param: e.message }))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,15 +97,15 @@ export const MnemonicScreen = observer(function MnemonicScreen({ route }: Props)
|
||||
return (
|
||||
<Screen contentContainerStyle={$screen} preset='fixed'>
|
||||
<View style={[$headerContainer, {backgroundColor: headerBg}]}>
|
||||
<Text preset="heading" tx='backupScreen.seedBackup' style={{color: headerTitle}} />
|
||||
<Text preset="heading" tx='backupSeedBackup' style={{color: headerTitle}} />
|
||||
</View>
|
||||
<View style={$contentContainer}>
|
||||
<Card
|
||||
style={$card}
|
||||
ContentComponent={
|
||||
<ListItem
|
||||
tx="backupScreen.mnemonicTitle"
|
||||
subTx="backupScreen.mnemonicDescription"
|
||||
tx="backupMnemonicTitle"
|
||||
subTx="backupMnemonicDescription"
|
||||
leftIcon='faInfoCircle'
|
||||
leftIconColor={colors.palette.iconYellow300}
|
||||
leftIconInverse={true}
|
||||
@@ -144,7 +144,7 @@ export const MnemonicScreen = observer(function MnemonicScreen({ route }: Props)
|
||||
<Button
|
||||
preset="default"
|
||||
style={{margin: spacing.small}}
|
||||
tx='common.copy'
|
||||
tx='commonCopy'
|
||||
onPress={onCopy}
|
||||
/>
|
||||
</View>
|
||||
|
||||
+20
-19
@@ -8,6 +8,7 @@ import {useHeader} from '../utils/useHeader'
|
||||
import {useStores} from '../models'
|
||||
import AppError, { Err } from '../utils/AppError'
|
||||
import { log } from '../services'
|
||||
import { translate } from '../i18n'
|
||||
import { verticalScale } from '@gocodingnow/rn-size-matters'
|
||||
import { NwcConnection } from '../models/NwcStore'
|
||||
import { QRCodeBlock } from './Wallet/QRCode'
|
||||
@@ -94,7 +95,7 @@ export const NwcScreen = observer(function NwcScreen(_props) {
|
||||
if(!isRemoteDataPushEnabled) {
|
||||
setSelectedConnection(undefined)
|
||||
nwcStore.receiveNwcEventsQueue()
|
||||
setInfo(`Your device can not receive background push messages. This is essential to recieve NWC commands. As a fallback, Minibits subscribed to Nostr relays to receive the commands. However, this will stop working when app is in the background or off.`)
|
||||
setInfo(translate('nwcScreen_pushNotificationWarning'))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,17 +112,17 @@ export const NwcScreen = observer(function NwcScreen(_props) {
|
||||
try {
|
||||
|
||||
if(!newConnectionName || !newConnectionDailyLimit) {
|
||||
setInfo('Insert name or daily limit')
|
||||
setInfo(translate('nwcScreen_missingNameOrLimit'))
|
||||
return
|
||||
}
|
||||
|
||||
if(parseInt(newConnectionDailyLimit) === 0) {
|
||||
setInfo('Daily limit must be above zero')
|
||||
setInfo(translate('nwcScreen_limitMustBePositive'))
|
||||
return
|
||||
}
|
||||
|
||||
if(nwcStore.alreadyExists(newConnectionName)) {
|
||||
setInfo('Connection with this name already exists.')
|
||||
setInfo(translate('nwcScreen_connectionExists'))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -173,8 +174,8 @@ export const NwcScreen = observer(function NwcScreen(_props) {
|
||||
BottomComponent={
|
||||
<CollapsibleText
|
||||
collapsed={true}
|
||||
summary='NWC lets you control your wallet from another application, such as your favourite Nostr app.'
|
||||
text={'NWC lets you control your wallet from another application, such as your favourite Nostr app. Allow access only to the apps you trust. Your device must have push notifications enabled and stay online.'}
|
||||
summary={translate('nwcScreen_nwcSummary')}
|
||||
text={translate('nwcScreen_nwcDescription')}
|
||||
textProps={{style: $subText}}
|
||||
/>
|
||||
}
|
||||
@@ -214,11 +215,11 @@ export const NwcScreen = observer(function NwcScreen(_props) {
|
||||
BottomComponent={
|
||||
<View style={{flexDirection: 'column'}}>
|
||||
<Text
|
||||
text={`Daily limit ${item.dailyLimit} SAT`}
|
||||
text={translate("nwcScreen_dailyLimit", {limit: item.dailyLimit, currency: 'SAT'})}
|
||||
style={$subText}
|
||||
/>
|
||||
<Text
|
||||
text={`Remaining ${item.remainingDailyLimit} SAT`}
|
||||
text={translate("nwcScreen_remainingLimit", {remaining: item.remainingDailyLimit, currency: 'SAT'})}
|
||||
style={$subText}
|
||||
/>
|
||||
</View>}
|
||||
@@ -248,7 +249,7 @@ export const NwcScreen = observer(function NwcScreen(_props) {
|
||||
onPress={gotoAdd}
|
||||
style={[{backgroundColor: mainButtonColor, borderWidth: 1, borderColor: screenBg}, $buttonNew]}
|
||||
preset='tertiary'
|
||||
text='Add connection'
|
||||
tx='nwcScreen_addConnection'
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
@@ -261,7 +262,7 @@ export const NwcScreen = observer(function NwcScreen(_props) {
|
||||
<ListItem
|
||||
leftIcon="faXmark"
|
||||
onPress={removeConnection}
|
||||
text="Remove connection"
|
||||
tx="nwcScreen_removeConnection"
|
||||
style={{paddingHorizontal: spacing.medium}}
|
||||
/>
|
||||
</View>
|
||||
@@ -277,13 +278,13 @@ export const NwcScreen = observer(function NwcScreen(_props) {
|
||||
<View style={$newContainer}>
|
||||
<QRCodeBlock
|
||||
qrCodeData={selectedConnection?.connectionString as string}
|
||||
title='Share NWC connection'
|
||||
titleTx='nwcScreen_shareNwcConnection'
|
||||
type='NWC'
|
||||
/>
|
||||
<Text
|
||||
size="xxs"
|
||||
style={{color: labelText, marginTop: spacing.medium, alignSelf: 'center'}}
|
||||
text="Scan or copy this connection string to another application to allow it to connect to your wallet. Use only with apps you trust."
|
||||
tx="nwcScreen_shareDescription"
|
||||
/>
|
||||
</View>
|
||||
</>
|
||||
@@ -295,12 +296,12 @@ export const NwcScreen = observer(function NwcScreen(_props) {
|
||||
isVisible={isAddConnectionModalVisible ? true : false}
|
||||
ContentComponent={
|
||||
<>
|
||||
<Text text='Create NWC connection' preset="subheading" style={{alignSelf: 'center'}} />
|
||||
<Text tx='nwcScreen_createNwcConnection' preset="subheading" style={{alignSelf: 'center'}} />
|
||||
<View style={$newContainer}>
|
||||
<Text
|
||||
size="xxs"
|
||||
style={{color: labelText, marginTop: spacing.medium}}
|
||||
text="Name your connection by the app you will use it with"
|
||||
tx="nwcScreen_nameConnectionHint"
|
||||
/>
|
||||
<View style={{
|
||||
flexDirection: 'row',
|
||||
@@ -313,7 +314,7 @@ export const NwcScreen = observer(function NwcScreen(_props) {
|
||||
autoCapitalize='sentences'
|
||||
keyboardType='default'
|
||||
maxLength={64}
|
||||
placeholder='My NWC application'
|
||||
placeholder={translate('nwcScreen_appNamePlaceholder')}
|
||||
placeholderTextColor={placeholderTextColor}
|
||||
selectTextOnFocus={true}
|
||||
style={[$connInput, {backgroundColor: inputBg, color: inputText}]}
|
||||
@@ -322,7 +323,7 @@ export const NwcScreen = observer(function NwcScreen(_props) {
|
||||
<Text
|
||||
size="xxs"
|
||||
style={{color: labelText, marginTop: spacing.medium}}
|
||||
text="Set maximal daily limit to spend"
|
||||
tx="nwcScreen_dailyLimitHint"
|
||||
/>
|
||||
<View style={{
|
||||
flexDirection: 'row',
|
||||
@@ -334,7 +335,7 @@ export const NwcScreen = observer(function NwcScreen(_props) {
|
||||
value={newConnectionDailyLimit}
|
||||
keyboardType='numeric'
|
||||
maxLength={8}
|
||||
placeholder='Enter daily limit in SAT'
|
||||
placeholder={translate('nwcScreen_dailyLimitPlaceholder')}
|
||||
placeholderTextColor={placeholderTextColor}
|
||||
selectTextOnFocus={true}
|
||||
style={[$connInput, {backgroundColor: inputBg, color: inputText}]}
|
||||
@@ -353,11 +354,11 @@ export const NwcScreen = observer(function NwcScreen(_props) {
|
||||
</View>
|
||||
<View style={[$buttonContainer, {marginTop: spacing.medium}]}>
|
||||
<Button
|
||||
tx={'common.save'}
|
||||
tx={'commonSave'}
|
||||
style={$saveButton}
|
||||
onPress={onSaveConnection}
|
||||
/>
|
||||
<Button preset='tertiary' onPress={toggleAddConnectionModal} style={{marginLeft: spacing.small}} text='Cancel'/>
|
||||
<Button preset='tertiary' onPress={toggleAddConnectionModal} style={{marginLeft: spacing.small}} tx='commonCancel'/>
|
||||
</View>
|
||||
</View>
|
||||
</>
|
||||
|
||||
@@ -62,7 +62,7 @@ export const OwnKeysScreen = observer(function OwnKeysScreen({ route }: Props) {
|
||||
const onPasteOwnNip05 = async function () {
|
||||
const nip = await Clipboard.getString()
|
||||
if (!nip) {
|
||||
setInfo(translate("nostr.pasteError"))
|
||||
setInfo(translate("nostr_pasteError"))
|
||||
return
|
||||
}
|
||||
setOwnNip05(nip.trim())
|
||||
@@ -75,11 +75,11 @@ export const OwnKeysScreen = observer(function OwnKeysScreen({ route }: Props) {
|
||||
const nip05Domain = NostrClient.getDomainFromNip05(ownNip05)
|
||||
|
||||
if(!nip05Name || !nip05Domain) {
|
||||
setInfo(translate("nostr.invalidAddressFormat"))
|
||||
setInfo(translate("nostr_invalidAddressFormat"))
|
||||
}
|
||||
|
||||
if(MINIBITS_NIP05_DOMAIN.includes(nip05Domain as string)) {
|
||||
setInfo(translate("nostr.minibitsNameKeyReuseError", { domain: MINIBITS_NIP05_DOMAIN }))
|
||||
setInfo(translate("nostr_minibitsNameKeyReuseError", { domain: MINIBITS_NIP05_DOMAIN }))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ export const OwnKeysScreen = observer(function OwnKeysScreen({ route }: Props) {
|
||||
} else {
|
||||
throw new AppError(
|
||||
Err.VALIDATION_ERROR,
|
||||
translate("nostr.profileRelayMismatchedIdentifierError"),
|
||||
translate("nostr_profileRelayMismatchedIdentifierError"),
|
||||
{ ownNip05, profile }
|
||||
)
|
||||
}
|
||||
@@ -129,7 +129,7 @@ export const OwnKeysScreen = observer(function OwnKeysScreen({ route }: Props) {
|
||||
if(profile.nip05 !== ownNip05) {
|
||||
throw new AppError(
|
||||
Err.VALIDATION_ERROR,
|
||||
translate("nostr.profileRelayMismatchedIdentifierError"),
|
||||
translate("nostr_profileRelayMismatchedIdentifierError"),
|
||||
{ ownNip05, profile }
|
||||
)
|
||||
}
|
||||
@@ -252,8 +252,8 @@ export const OwnKeysScreen = observer(function OwnKeysScreen({ route }: Props) {
|
||||
<View style={$nip05Container}>
|
||||
<ListItem
|
||||
LeftComponent={<View style={[$numIcon, {backgroundColor: iconNip05}]}><Text text='1'/></View>}
|
||||
tx="nostr.enterAddress"
|
||||
subTx="nostr.enterAddressDesc"
|
||||
tx="nostr_enterAddress"
|
||||
subTx="nostr_enterAddressDesc"
|
||||
bottomSeparator={true}
|
||||
style={{}}
|
||||
/>
|
||||
@@ -275,13 +275,13 @@ export const OwnKeysScreen = observer(function OwnKeysScreen({ route }: Props) {
|
||||
style={[$nip05Input, {backgroundColor: inputBg, color: inputText}]}
|
||||
/>
|
||||
<Button
|
||||
tx='common.paste'
|
||||
tx='commonPaste'
|
||||
preset='secondary'
|
||||
style={$pasteButton}
|
||||
onPress={onPasteOwnNip05}
|
||||
/>
|
||||
<Button
|
||||
tx='common.confirm'
|
||||
tx='commonConfirm'
|
||||
style={$saveButton}
|
||||
onPress={onConfirmOwnNip05}
|
||||
/>
|
||||
@@ -354,13 +354,13 @@ export const OwnKeysScreen = observer(function OwnKeysScreen({ route }: Props) {
|
||||
style={[$nip05Input, {backgroundColor: inputBg, color: inputText}]}
|
||||
/>
|
||||
<Button
|
||||
tx='common.paste'
|
||||
tx='commonPaste'
|
||||
preset='secondary'
|
||||
style={$pasteButton}
|
||||
onPress={onPasteOwnNsec}
|
||||
/>
|
||||
<Button
|
||||
tx='common.confirm'
|
||||
tx='commonConfirm'
|
||||
style={$saveButton}
|
||||
onPress={onConfirmOwnNsec}
|
||||
/>
|
||||
@@ -378,14 +378,14 @@ export const OwnKeysScreen = observer(function OwnKeysScreen({ route }: Props) {
|
||||
<>
|
||||
<ListItem
|
||||
leftIcon='faTriangleExclamation'
|
||||
tx="nostr.lastStandDialog.title"
|
||||
subTx="nostr.lastStandDialog.desc"
|
||||
tx="nostr_lastStandDialog_title"
|
||||
subTx="nostr_lastStandDialog_desc"
|
||||
/>
|
||||
<ListItem
|
||||
leftIcon='faCheckCircle'
|
||||
leftIconColor={colors.palette.success200}
|
||||
tx="nostr.lastStandDialog.readyTitle"
|
||||
subText="nostr.lastStandDialog.readyDesc"
|
||||
tx="nostr_lastStandDialog_readyTitle"
|
||||
subText="nostr_lastStandDialog_readyDesc"
|
||||
style={{}}
|
||||
/>
|
||||
</>
|
||||
@@ -394,12 +394,12 @@ export const OwnKeysScreen = observer(function OwnKeysScreen({ route }: Props) {
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="default"
|
||||
tx='nostr.lastStandDialog.confirm'
|
||||
tx='nostr_lastStandDialog_confirm'
|
||||
onPress={onConfirmChange}
|
||||
/>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx='nostr.lastStandDialog.cancel'
|
||||
tx='nostr_lastStandDialog_cancel'
|
||||
onPress={onCancelChange}
|
||||
/>
|
||||
</View>
|
||||
@@ -415,12 +415,12 @@ export const OwnKeysScreen = observer(function OwnKeysScreen({ route }: Props) {
|
||||
<ProfileHeader headerBg='transparent' headerTextStyle={{color: textResult}}/>
|
||||
<Text
|
||||
style={{color: textResult, textAlign: 'center', marginTop: spacing.small}}
|
||||
tx="nostr.lastStandDialog.complete"
|
||||
tx="nostr_lastStandDialog_complete"
|
||||
/>
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx='common.close'
|
||||
tx='commonClose'
|
||||
onPress={onProfileChangeClose}
|
||||
/>
|
||||
</View>
|
||||
|
||||
@@ -100,12 +100,12 @@ export const PictureScreen = (function PictureScreen({ route }: Props) {
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="default"
|
||||
tx='common.confirm'
|
||||
tx='commonConfirm'
|
||||
onPress={onPictureConfirm}
|
||||
/>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx='common.cancel'
|
||||
tx='commonCancel'
|
||||
onPress={() => setSelectedPicture('')}
|
||||
/>
|
||||
</View>
|
||||
|
||||
@@ -110,7 +110,7 @@ export const PrivacyScreen = observer(function PrivacyScreen({ route }: Props) {
|
||||
return (
|
||||
<Screen style={$screen} preset='fixed'>
|
||||
<View style={[$headerContainer, {backgroundColor: headerBg}]}>
|
||||
<Text preset="heading" text="Privacy" style={{color: headerTitle}} />
|
||||
<Text preset="heading" tx="privacyScreen_title" style={{color: headerTitle}} />
|
||||
</View>
|
||||
<ScrollView style={$contentContainer}>
|
||||
{/*<Card
|
||||
@@ -118,8 +118,8 @@ export const PrivacyScreen = observer(function PrivacyScreen({ route }: Props) {
|
||||
ContentComponent={
|
||||
<>
|
||||
<ListItem
|
||||
tx="privacyScreen.torDaemon"
|
||||
subTx="privacyScreen.torDaemonDescription"
|
||||
tx="privacyScreen_torDaemon"
|
||||
subTx="privacyScreen_torDaemonDescription"
|
||||
leftIcon={'faBullseye'}
|
||||
leftIconColor={
|
||||
isTorDaemonOn
|
||||
@@ -139,7 +139,7 @@ export const PrivacyScreen = observer(function PrivacyScreen({ route }: Props) {
|
||||
/>
|
||||
{isTorDaemonOn && (
|
||||
<ListItem
|
||||
tx="privacyScreen.torStatus"
|
||||
tx="privacyScreen_torStatus"
|
||||
subText={`${torStatus}`}
|
||||
leftIcon={torStatus === TorStatus.NOTINIT ? (
|
||||
'faBan'
|
||||
@@ -190,10 +190,10 @@ export const PrivacyScreen = observer(function PrivacyScreen({ route }: Props) {
|
||||
ContentComponent={
|
||||
<>
|
||||
<ListItem
|
||||
tx="nostr.useOwnProfile.title"
|
||||
tx="nostr_useOwnProfile_title"
|
||||
subText={walletProfileStore.isOwnProfile
|
||||
? walletProfileStore.nip05
|
||||
: translate("nostr.useOwnProfile.desc")
|
||||
: translate("nostr_useOwnProfile_desc")
|
||||
}
|
||||
leftIcon={'faShareNodes'}
|
||||
leftIconColor={
|
||||
@@ -208,14 +208,14 @@ export const PrivacyScreen = observer(function PrivacyScreen({ route }: Props) {
|
||||
<Button
|
||||
style={{maxHeight: 10, marginTop: spacing.medium}}
|
||||
preset="secondary"
|
||||
tx="common.reset"
|
||||
tx="commonReset"
|
||||
onPress={resetProfile}
|
||||
/>
|
||||
) : (
|
||||
<Button
|
||||
style={{maxHeight: 10, marginTop: spacing.medium}}
|
||||
preset="secondary"
|
||||
tx="common.import"
|
||||
tx="commonImport"
|
||||
onPress={gotoOwnKeys}
|
||||
/>
|
||||
)}
|
||||
@@ -231,8 +231,8 @@ export const PrivacyScreen = observer(function PrivacyScreen({ route }: Props) {
|
||||
ContentComponent={
|
||||
<>
|
||||
<ListItem
|
||||
tx="privacyScreen.logger"
|
||||
subTx="privacyScreen.loggerDescription"
|
||||
tx="privacyScreen_logger"
|
||||
subTx="privacyScreen_loggerDescription"
|
||||
leftIcon={'faBug'}
|
||||
leftIconColor={
|
||||
isLoggerOn
|
||||
|
||||
@@ -116,7 +116,7 @@ export const ProfileScreen = observer(function ProfileScreen({ route }: Props) {
|
||||
try {
|
||||
Clipboard.setString(nip05)
|
||||
} catch (e: any) {
|
||||
setInfo(translate('common.copyFailParam', { param: e.message }))
|
||||
setInfo(translate('commonCopyFailParam', { param: e.message }))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,21 +208,21 @@ export const ProfileScreen = observer(function ProfileScreen({ route }: Props) {
|
||||
<>
|
||||
{walletProfileStore.isOwnProfile ? (
|
||||
<ListItem
|
||||
tx="profileOnboarding.ownAddrTitle"
|
||||
subTx="profileOnboarding.ownAddrDesc"
|
||||
tx="profileOnboarding_ownAddrTitle"
|
||||
subTx="profileOnboarding_ownAddrDesc"
|
||||
leftIcon='faCircleUser'
|
||||
bottomSeparator={true}
|
||||
style={{paddingRight: spacing.small}}
|
||||
/>
|
||||
) : (
|
||||
<ListItem
|
||||
tx="profileOnboarding.minibitsTitle"
|
||||
//subTx="profileOnboarding.minibitsDesc"
|
||||
tx="profileOnboarding_minibitsTitle"
|
||||
//subTx="profileOnboarding_minibitsDesc"
|
||||
leftIcon='faCircleUser'
|
||||
BottomComponent={
|
||||
<CollapsibleText
|
||||
collapsed={true}
|
||||
text={translate('profileOnboarding.minibitsDesc')}
|
||||
text={translate('profileOnboarding_minibitsDesc')}
|
||||
textProps={{style: $subText}}
|
||||
/>}
|
||||
bottomSeparator={true}
|
||||
@@ -232,13 +232,13 @@ export const ProfileScreen = observer(function ProfileScreen({ route }: Props) {
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset='secondary'
|
||||
tx='common.share'
|
||||
tx='commonShare'
|
||||
LeftAccessory={() => <Icon icon='faShareNodes'/>}
|
||||
onPress={toggleShareModal}
|
||||
/>
|
||||
<Button
|
||||
preset='secondary'
|
||||
tx="common.change"
|
||||
tx="commonChange"
|
||||
style={{marginLeft: spacing.small}}
|
||||
LeftAccessory={() => <Icon icon='faRotate'/>}
|
||||
onPress={toggleUpdateModal}
|
||||
@@ -252,7 +252,7 @@ export const ProfileScreen = observer(function ProfileScreen({ route }: Props) {
|
||||
ContentComponent={
|
||||
<>
|
||||
<ListItem
|
||||
text='Batch receive'
|
||||
tx='profileScreen_batchReceive'
|
||||
leftIcon='faCubes'
|
||||
style={$item}
|
||||
RightComponent={
|
||||
@@ -266,7 +266,7 @@ export const ProfileScreen = observer(function ProfileScreen({ route }: Props) {
|
||||
BottomComponent={
|
||||
<CollapsibleText
|
||||
collapsed={true}
|
||||
text={'Recommended for heavy zap collectors. If there are more payments or zaps received to your lightning address, batch them into a single one.'}
|
||||
text={translate('profileScreen_batchReceiveDesc')}
|
||||
textProps={{style: $subText}}
|
||||
/>}
|
||||
bottomSeparator={false}
|
||||
@@ -362,15 +362,15 @@ const WalletProfileActionsBlock = function (props: {
|
||||
return (
|
||||
<>
|
||||
<ListItem
|
||||
tx='profileScreen.changeAvatar'
|
||||
subTx='profileScreen.changeAvatarSubtext'
|
||||
tx='profileScreen_changeAvatar'
|
||||
subTx='profileScreen_changeAvatarSubtext'
|
||||
leftIcon='faCircleUser'
|
||||
onPress={props.gotoAvatar}
|
||||
bottomSeparator={true}
|
||||
/>
|
||||
<ListItem
|
||||
tx='profileScreen.changeWalletaddress'
|
||||
subTx='profileScreen.changeWalletaddressSubtext'
|
||||
tx='profileScreen_changeWalletaddress'
|
||||
subTx='profileScreen_changeWalletaddressSubtext'
|
||||
leftIcon='faPencil'
|
||||
onPress={props.gotoWalletName}
|
||||
// bottomSeparator={true}
|
||||
|
||||
@@ -109,7 +109,7 @@ export const ReceiveScreen = observer(function ReceiveScreen({ route }: Props) {
|
||||
if (error) {
|
||||
setResultModalInfo({
|
||||
status,
|
||||
title: error.params?.message ? error.message : translate("transactionCommon.receiveFailed"),
|
||||
title: error.params?.message ? error.message : translate("transactionCommon_receiveFailed"),
|
||||
message: error.params?.message || error.message,
|
||||
})
|
||||
} else {
|
||||
@@ -358,13 +358,13 @@ export const ReceiveScreen = observer(function ReceiveScreen({ route }: Props) {
|
||||
{isP2PKLockedToWallet ? (
|
||||
<Text
|
||||
size='xs'
|
||||
tx={toNumber(receivedAmount) > 0 ? "receiveScreen.received" : "receiveScreen.lockedToWalletPK"}
|
||||
tx={toNumber(receivedAmount) > 0 ? "receiveScreen_received" : "receiveScreen_lockedToWalletPK"}
|
||||
style={{color: amountInputColor, textAlign: 'center'}}
|
||||
/>
|
||||
) : (
|
||||
<Text
|
||||
size='xs'
|
||||
tx={toNumber(receivedAmount) > 0 ? "receiveScreen.received" : "receiveScreen.lockedToUnknownPK"}
|
||||
tx={toNumber(receivedAmount) > 0 ? "receiveScreen_received" : "receiveScreen_lockedToUnknownPK"}
|
||||
style={{color: amountInputColor, textAlign: 'center'}}
|
||||
/>
|
||||
)}
|
||||
@@ -372,7 +372,7 @@ export const ReceiveScreen = observer(function ReceiveScreen({ route }: Props) {
|
||||
) : (
|
||||
<Text
|
||||
size='xs'
|
||||
tx={toNumber(receivedAmount) > 0 ? "receiveScreen.received" : "receiveScreen.toReceive"}
|
||||
tx={toNumber(receivedAmount) > 0 ? "receiveScreen_received" : "receiveScreen_toReceive"}
|
||||
style={{
|
||||
color: amountInputColor,
|
||||
textAlign: 'center',
|
||||
@@ -390,7 +390,7 @@ export const ReceiveScreen = observer(function ReceiveScreen({ route }: Props) {
|
||||
style={$memoCard}
|
||||
ContentComponent={
|
||||
<ListItem
|
||||
text={memo || 'No description'}
|
||||
text={memo || translate('commonNoDescPlaceholder')}
|
||||
LeftComponent={
|
||||
<Icon
|
||||
containerStyle={$iconContainer}
|
||||
@@ -442,24 +442,24 @@ export const ReceiveScreen = observer(function ReceiveScreen({ route }: Props) {
|
||||
ContentComponent={
|
||||
<>
|
||||
<TranItem
|
||||
label="transactionCommon.receivedTo"
|
||||
label="transactionCommon_receivedTo"
|
||||
isFirst={true}
|
||||
value={mintsStore.findByUrl(transaction.mint)?.shortname as string}
|
||||
/>
|
||||
{transaction?.memo && (
|
||||
<TranItem
|
||||
label="receiveScreen.memoFromSender"
|
||||
label="receiveScreen_memoFromSender"
|
||||
value={transaction.memo as string}
|
||||
/>
|
||||
)}
|
||||
<TranItem
|
||||
label="transactionCommon.feePaid"
|
||||
label="transactionCommon_feePaid"
|
||||
value={transaction.fee || 0}
|
||||
unit={unit}
|
||||
isCurrency={true}
|
||||
/>
|
||||
<TranItem
|
||||
label="receiveScreen.status"
|
||||
label="receiveScreen_status"
|
||||
value={transaction.status as string}
|
||||
/>
|
||||
</>
|
||||
@@ -471,7 +471,7 @@ export const ReceiveScreen = observer(function ReceiveScreen({ route }: Props) {
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx={'common.close'}
|
||||
tx={'commonClose'}
|
||||
onPress={gotoWallet}
|
||||
/>
|
||||
</View>
|
||||
@@ -481,7 +481,7 @@ export const ReceiveScreen = observer(function ReceiveScreen({ route }: Props) {
|
||||
<View style={$buttonContainer}>
|
||||
{isInternetReachable ? (
|
||||
<Button
|
||||
tx='payCommon.receive'
|
||||
tx='payCommon_receive'
|
||||
onPress={receiveToken}
|
||||
style={{marginRight: spacing.medium}}
|
||||
LeftAccessory={() => (
|
||||
@@ -494,7 +494,7 @@ export const ReceiveScreen = observer(function ReceiveScreen({ route }: Props) {
|
||||
/>
|
||||
) : (
|
||||
<Button
|
||||
tx='payCommon.receiveOffline'
|
||||
tx='payCommon_receiveOffline'
|
||||
onPress={receiveOfflineToken}
|
||||
style={{marginRight: spacing.medium}}
|
||||
LeftAccessory={() => (
|
||||
@@ -508,7 +508,7 @@ export const ReceiveScreen = observer(function ReceiveScreen({ route }: Props) {
|
||||
)}
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx='common.cancel'
|
||||
tx='commonCancel'
|
||||
onPress={gotoWallet}
|
||||
/>
|
||||
</View>
|
||||
@@ -526,13 +526,13 @@ export const ReceiveScreen = observer(function ReceiveScreen({ route }: Props) {
|
||||
<ResultModalInfo
|
||||
icon={'faCheckCircle'}
|
||||
iconColor={colors.palette.success200}
|
||||
title={translate('common.success')}
|
||||
title={translate('commonSuccess')}
|
||||
message={resultModalInfo?.message}
|
||||
/>
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx='common.close'
|
||||
tx='commonClose'
|
||||
onPress={gotoWallet}
|
||||
/>
|
||||
</View>
|
||||
@@ -549,7 +549,7 @@ export const ReceiveScreen = observer(function ReceiveScreen({ route }: Props) {
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx='common.close'
|
||||
tx='commonClose'
|
||||
onPress={gotoWallet}
|
||||
/>
|
||||
</View>
|
||||
@@ -561,20 +561,20 @@ export const ReceiveScreen = observer(function ReceiveScreen({ route }: Props) {
|
||||
<ResultModalInfo
|
||||
icon="faTriangleExclamation"
|
||||
iconColor={colors.palette.angry500}
|
||||
title={resultModalInfo?.title as string || translate('transactionCommon.receiveFailed')}
|
||||
title={resultModalInfo?.title as string || translate('transactionCommon_receiveFailed')}
|
||||
message={resultModalInfo?.message as string}
|
||||
/>
|
||||
<View style={$buttonContainer}>
|
||||
{resultModalInfo.message.includes('outputs have already been signed before') ? (
|
||||
<Button
|
||||
preset="secondary"
|
||||
text={"Try again"}
|
||||
tx="commonTryAgain"
|
||||
onPress={increaseProofsCounterAndRetry}
|
||||
/>
|
||||
) : (
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx={'common.close'}
|
||||
tx={'commonClose'}
|
||||
onPress={toggleResultModal}
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -45,7 +45,7 @@ export const RecoverWalletAddressScreen = observer(function RecoverWalletAddress
|
||||
const onConfirmMnemonic = async function () {
|
||||
try {
|
||||
if (!mnemonic) {
|
||||
throw new AppError(Err.VALIDATION_ERROR, translate('backupScreen.missingMnemonicError'))
|
||||
throw new AppError(Err.VALIDATION_ERROR, translate('backupMissingMnemonicError'))
|
||||
}
|
||||
|
||||
LayoutAnimation.easeInEaseOut()
|
||||
@@ -74,7 +74,7 @@ export const RecoverWalletAddressScreen = observer(function RecoverWalletAddress
|
||||
throw new AppError(Err.VALIDATION_ERROR, 'Could not get seed')
|
||||
}
|
||||
|
||||
setStatusMessage(translate('recovery.recoveringAddress'))
|
||||
setStatusMessage(translate('recovery_recoveringAddress'))
|
||||
setIsLoading(true)
|
||||
|
||||
const seedHash = QuickCrypto.createHash('sha256')
|
||||
@@ -88,7 +88,7 @@ export const RecoverWalletAddressScreen = observer(function RecoverWalletAddress
|
||||
if (profile.nip05.includes(MINIBITS_NIP05_DOMAIN)) {
|
||||
setProfileToRecover(profile)
|
||||
} else {
|
||||
setStatusMessage(translate("recovery.ownKeysImportAgain", { addr: profile.nip05 }))
|
||||
setStatusMessage(translate("recovery_ownKeysImportAgain", { addr: profile.nip05 }))
|
||||
await delay(4000)
|
||||
}
|
||||
|
||||
@@ -102,11 +102,11 @@ export const RecoverWalletAddressScreen = observer(function RecoverWalletAddress
|
||||
const onCompleteAddress = async () => {
|
||||
try {
|
||||
if(!seedHashRef.current || !seedRef.current || !profileToRecover) {
|
||||
throw new AppError(Err.VALIDATION_ERROR, translate("recovery.missingMnemonicSeedProfileError"))
|
||||
throw new AppError(Err.VALIDATION_ERROR, translate("recovery_missingMnemonicSeedProfileError"))
|
||||
}
|
||||
|
||||
setIsLoading(true)
|
||||
setStatusMessage(translate("recovery.recoveringAddress"))
|
||||
setStatusMessage(translate("recovery_recoveringAddress"))
|
||||
|
||||
const keys = await walletStore.getCachedWalletKeys()
|
||||
|
||||
@@ -120,7 +120,7 @@ export const RecoverWalletAddressScreen = observer(function RecoverWalletAddress
|
||||
|
||||
userSettingsStore.setIsOnboarded(true)
|
||||
|
||||
setStatusMessage(translate('recovery.completed'))
|
||||
setStatusMessage(translate('recovery_completed'))
|
||||
await delay(1000)
|
||||
setStatusMessage('')
|
||||
setIsLoading(false)
|
||||
@@ -148,7 +148,7 @@ export const RecoverWalletAddressScreen = observer(function RecoverWalletAddress
|
||||
<View style={[$headerContainer, { backgroundColor: headerBg }]}>
|
||||
<Text
|
||||
preset="heading"
|
||||
text="Recover address"
|
||||
tx="recovery_recoverAddress"
|
||||
style={{ color: headerTitle, textAlign: 'center' }}
|
||||
/>
|
||||
</View>
|
||||
@@ -169,14 +169,14 @@ export const RecoverWalletAddressScreen = observer(function RecoverWalletAddress
|
||||
<>
|
||||
<ListItem
|
||||
text={profileToRecover.nip05}
|
||||
subText="This is the wallet address linked to the provided seed."
|
||||
subTx="recovery_addressLinkedToSeed"
|
||||
LeftComponent={<View style={[$numIcon, { backgroundColor: numIconColor }]}><Text text='2' /></View>}
|
||||
style={$item}
|
||||
bottomSeparator
|
||||
/>
|
||||
<ListItem
|
||||
text={'Do not lose your ecash!'}
|
||||
subText="Your current wallet seed phrase will NOT be changed. Keep it in a safe place!"
|
||||
tx="recovery_doNotLoseEcashTitle"
|
||||
subTx="recovery_doNotLoseEcashDesc"
|
||||
LeftComponent={<View style={[$numIcon, { backgroundColor: numIconColor }]}><Text text='3' /></View>}
|
||||
style={$item}
|
||||
/>
|
||||
@@ -191,7 +191,7 @@ export const RecoverWalletAddressScreen = observer(function RecoverWalletAddress
|
||||
<View style={$buttonContainer}>
|
||||
{profileToRecover ? (
|
||||
<Button
|
||||
tx="recovery.completeCTA"
|
||||
tx="recovery_completeCTA"
|
||||
style={{ marginRight: spacing.small }}
|
||||
LeftAccessory={() => (
|
||||
<Icon
|
||||
@@ -204,7 +204,7 @@ export const RecoverWalletAddressScreen = observer(function RecoverWalletAddress
|
||||
/>
|
||||
) : (
|
||||
<Button
|
||||
tx="recovery.findAddressCTA"
|
||||
tx="recovery_findAddressCTA"
|
||||
style={{ marginRight: spacing.small }}
|
||||
LeftAccessory={() => (
|
||||
<Icon
|
||||
|
||||
@@ -30,7 +30,7 @@ export const MnemonicInput = forwardRef<TextInput, MnemonicInputProps>((props, m
|
||||
const maybeMnemonic = await Clipboard.getString()
|
||||
|
||||
if(!maybeMnemonic) {
|
||||
throw new AppError(Err.VALIDATION_ERROR, translate('backupScreen.missingMnemonicError'))
|
||||
throw new AppError(Err.VALIDATION_ERROR, translate('backupMissingMnemonicError'))
|
||||
}
|
||||
|
||||
const cleaned = maybeMnemonic.replace(/\s+/g, ' ').trim()
|
||||
@@ -54,7 +54,7 @@ export const MnemonicInput = forwardRef<TextInput, MnemonicInputProps>((props, m
|
||||
style={$card}
|
||||
ContentComponent={
|
||||
<ListItem
|
||||
tx='backupScreen.mnemonicTitle'
|
||||
tx='backupMnemonicTitle'
|
||||
subText={mnemonic}
|
||||
subTextStyle={{fontFamily: typography.code?.normal}}
|
||||
LeftComponent={<View style={[$numIcon, {backgroundColor: numIconColor}]}><Text text='1'/></View>}
|
||||
@@ -93,12 +93,12 @@ export const MnemonicInput = forwardRef<TextInput, MnemonicInputProps>((props, m
|
||||
{mnemonic ? (
|
||||
<Button
|
||||
onPress={onConfirm}
|
||||
tx='common.confirm'
|
||||
tx='commonConfirm'
|
||||
/>
|
||||
) : (
|
||||
<Button
|
||||
onPress={onPaste}
|
||||
tx='common.paste'
|
||||
tx='commonPaste'
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ export const RecoveryOptionsScreen = observer(function RecoveryOptionsScreen({ r
|
||||
const onPasteMintQuote = async function () {
|
||||
const quote = await Clipboard.getString()
|
||||
if (!quote || quote.length !== 40) {
|
||||
setInfo('Invalid mint quote')
|
||||
setInfo(translate('recoveryInvalidMintQuote'))
|
||||
return
|
||||
}
|
||||
setMintQuote(quote)
|
||||
@@ -212,7 +212,7 @@ export const RecoveryOptionsScreen = observer(function RecoveryOptionsScreen({ r
|
||||
const onPasteMeltQuote = async function () {
|
||||
const quote = await Clipboard.getString()
|
||||
if (!quote || quote.length !== 40) {
|
||||
setInfo('Invalid melt quote')
|
||||
setInfo(translate('recoveryInvalidMeltQuote'))
|
||||
return
|
||||
}
|
||||
setMeltQuote(quote)
|
||||
@@ -322,7 +322,7 @@ export const RecoveryOptionsScreen = observer(function RecoveryOptionsScreen({ r
|
||||
<View style={[$headerContainer, {backgroundColor: headerBg}]}>
|
||||
<Text
|
||||
preset="heading"
|
||||
tx="recoveryOptions.title"
|
||||
tx="recoveryOptionsTitle"
|
||||
style={{color: 'white'}}
|
||||
/>
|
||||
</View>
|
||||
@@ -333,8 +333,8 @@ export const RecoveryOptionsScreen = observer(function RecoveryOptionsScreen({ r
|
||||
ContentComponent={
|
||||
<>
|
||||
<ListItem
|
||||
tx="recoveryOptions.fromBackup"
|
||||
subTx="recoveryOptions.fromBackupDescription"
|
||||
tx="recoveryOptionsFromBackup"
|
||||
subTx="recoveryOptionsFromBackupDescription"
|
||||
leftIcon='faDownload'
|
||||
leftIconColor={colors.palette.focus300}
|
||||
leftIconInverse={true}
|
||||
@@ -343,8 +343,8 @@ export const RecoveryOptionsScreen = observer(function RecoveryOptionsScreen({ r
|
||||
onPress={gotoImportBackup}
|
||||
/>
|
||||
<ListItem
|
||||
tx="recoveryOptions.fromSeed"
|
||||
subTx="recoveryOptions.fromSeedDescription"
|
||||
tx="recoveryOptionsFromSeed"
|
||||
subTx="recoveryOptionsFromSeedDescription"
|
||||
leftIcon='faSeedling'
|
||||
leftIconColor={colors.palette.orange400}
|
||||
leftIconInverse={true}
|
||||
@@ -373,8 +373,8 @@ export const RecoveryOptionsScreen = observer(function RecoveryOptionsScreen({ r
|
||||
<Card
|
||||
style={$card} HeadingComponent={
|
||||
<ListItem
|
||||
tx="backupScreen.removeSpentCoins"
|
||||
subTx="backupScreen.removeSpentCoinsDescription"
|
||||
tx="backupRemoveSpentCoins"
|
||||
subTx="backupRemoveSpentCoinsDescription"
|
||||
leftIcon='faRecycle'
|
||||
leftIconColor={colors.palette.secondary300}
|
||||
leftIconInverse={true}
|
||||
@@ -382,7 +382,7 @@ export const RecoveryOptionsScreen = observer(function RecoveryOptionsScreen({ r
|
||||
<View style={$rightContainer}>
|
||||
<Button
|
||||
onPress={checkSpent}
|
||||
text='Remove'
|
||||
tx='recoveryScreen_remove'
|
||||
preset='secondary'
|
||||
/>
|
||||
</View>
|
||||
@@ -405,7 +405,7 @@ export const RecoveryOptionsScreen = observer(function RecoveryOptionsScreen({ r
|
||||
<View style={$rightContainer}>
|
||||
<Button
|
||||
onPress={increaseCounters}
|
||||
text='Increase'
|
||||
tx='recoveryScreen_increase'
|
||||
preset='secondary'
|
||||
/>
|
||||
</View>
|
||||
@@ -416,13 +416,13 @@ export const RecoveryOptionsScreen = observer(function RecoveryOptionsScreen({ r
|
||||
}
|
||||
/>
|
||||
<Card
|
||||
label='Experimental tools'
|
||||
labelTx='recoveryScreen_experimentalTools'
|
||||
style={[$card, {marginBottom: spacing.huge * 2}]}
|
||||
HeadingComponent={
|
||||
<>
|
||||
<ListItem
|
||||
text="Recover mint quote"
|
||||
subText="Retry to mint ecash from an already paid mint quote."
|
||||
tx="recoveryScreen_recoverMintQuote"
|
||||
subTx="recoveryScreen_recoverMintQuoteDesc"
|
||||
leftIcon='faCoins'
|
||||
leftIconColor={colors.palette.orange400}
|
||||
leftIconInverse={true}
|
||||
@@ -430,7 +430,7 @@ export const RecoveryOptionsScreen = observer(function RecoveryOptionsScreen({ r
|
||||
<View style={$rightContainer}>
|
||||
<Button
|
||||
onPress={startMintQuoteRecovery}
|
||||
text='Start'
|
||||
tx='recoveryScreen_start'
|
||||
preset='secondary'
|
||||
/>
|
||||
</View>
|
||||
@@ -438,8 +438,8 @@ export const RecoveryOptionsScreen = observer(function RecoveryOptionsScreen({ r
|
||||
style={$item}
|
||||
/>
|
||||
<ListItem
|
||||
text="Recover melt quote change"
|
||||
subText="Retry to receive back unspent ecash from a completed Lightning payment."
|
||||
tx="recoveryScreen_recoverMeltQuoteChange"
|
||||
subTx="recoveryScreen_recoverMeltQuoteChangeDesc"
|
||||
leftIcon='faArrowTurnDown'
|
||||
leftIconColor={colors.palette.iconGreyBlue400}
|
||||
leftIconInverse={true}
|
||||
@@ -448,7 +448,7 @@ export const RecoveryOptionsScreen = observer(function RecoveryOptionsScreen({ r
|
||||
<View style={$rightContainer}>
|
||||
<Button
|
||||
onPress={startMeltQuoteRecovery}
|
||||
text='Start'
|
||||
tx='recoveryScreen_start'
|
||||
preset='secondary'
|
||||
/>
|
||||
</View>
|
||||
@@ -471,13 +471,13 @@ export const RecoveryOptionsScreen = observer(function RecoveryOptionsScreen({ r
|
||||
<ResultModalInfo
|
||||
icon="faTriangleExclamation"
|
||||
iconColor={colors.palette.accent300}
|
||||
title={"Permission needed"}
|
||||
message={"Minibits needs a permission to display notification while this task will be running."}
|
||||
title={translate("recoveryPermissionNeededTitle")}
|
||||
message={translate("recoveryPermissionNeededDesc")}
|
||||
/>
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
text={'Open settings'}
|
||||
tx={'recoveryOpenSettingsButton'}
|
||||
onPress={openNotificationSettings}
|
||||
/>
|
||||
</View>
|
||||
@@ -494,8 +494,8 @@ export const RecoveryOptionsScreen = observer(function RecoveryOptionsScreen({ r
|
||||
<MintBalanceSelector
|
||||
mintBalances={mintBalancesRef.current}
|
||||
unit={unitRef.current}
|
||||
title='Select mint to recover from'
|
||||
confirmTitle={'Confirm'}
|
||||
title={translate('recoveryScreen_selectMintToRecoverFrom')}
|
||||
confirmTitle={translate('recoveryScreen_confirm')}
|
||||
collapsible={false}
|
||||
onMintBalanceSelect={onMintBalanceSelect}
|
||||
selectedMintBalance={mintBalanceToRecoverFrom}
|
||||
@@ -511,7 +511,7 @@ export const RecoveryOptionsScreen = observer(function RecoveryOptionsScreen({ r
|
||||
isVisible={isMintQuoteModalVisible ? true : false}
|
||||
ContentComponent={
|
||||
<View style={$quoteContainer}>
|
||||
<Text text='Enter mint quote' />
|
||||
<Text tx='recoveryEnterMintQuote' />
|
||||
<View style={{flexDirection: 'row', alignItems: 'center', marginTop: spacing.small}}>
|
||||
<TextInput
|
||||
ref={mintQuoteInputRef}
|
||||
@@ -524,25 +524,26 @@ export const RecoveryOptionsScreen = observer(function RecoveryOptionsScreen({ r
|
||||
style={[$quoteInput, {backgroundColor: inputBg, color: inputText}]}
|
||||
/>
|
||||
<Button
|
||||
tx={'common.paste'}
|
||||
tx='commonPaste'
|
||||
preset='secondary'
|
||||
style={$pasteButton}
|
||||
onPress={onPasteMintQuote}
|
||||
/>
|
||||
</View>
|
||||
<View style={[$buttonContainer, {marginTop: spacing.medium}]}>
|
||||
<Button onPress={onMintEcashFromQuote} text='Mint ecash' />
|
||||
<Button onPress={onMintEcashFromQuote} tx="recoveryMintEcashButton" />
|
||||
</View>
|
||||
</View>
|
||||
}
|
||||
onBackButtonPress={toggleMintQuoteModal}
|
||||
onBackdropPress={toggleMintQuoteModal}
|
||||
/>
|
||||
{/* it looks like this modal is a duplicate of the one above? for now not removing, but worth checking later */}
|
||||
<BottomModal
|
||||
isVisible={isMintQuoteModalVisible ? true : false}
|
||||
ContentComponent={
|
||||
<View style={$quoteContainer}>
|
||||
<Text text='Enter mint quote' />
|
||||
<Text tx='recoveryEnterMintQuote' />
|
||||
<View style={{flexDirection: 'row', alignItems: 'center', marginTop: spacing.small}}>
|
||||
<TextInput
|
||||
ref={mintQuoteInputRef}
|
||||
@@ -555,14 +556,14 @@ export const RecoveryOptionsScreen = observer(function RecoveryOptionsScreen({ r
|
||||
style={[$quoteInput, {backgroundColor: inputBg, color: inputText}]}
|
||||
/>
|
||||
<Button
|
||||
tx={'common.paste'}
|
||||
tx='commonPaste'
|
||||
preset='secondary'
|
||||
style={$pasteButton}
|
||||
onPress={onPasteMintQuote}
|
||||
/>
|
||||
</View>
|
||||
<View style={[$buttonContainer, {marginTop: spacing.medium}]}>
|
||||
<Button onPress={onMintEcashFromQuote} text='Mint ecash' />
|
||||
<Button onPress={onMintEcashFromQuote} tx='recoveryMintEcashButton' />
|
||||
</View>
|
||||
</View>
|
||||
}
|
||||
@@ -576,13 +577,13 @@ export const RecoveryOptionsScreen = observer(function RecoveryOptionsScreen({ r
|
||||
<ResultModalInfo
|
||||
icon="faCheckCircle"
|
||||
iconColor={colors.palette.success200}
|
||||
title="Success!"
|
||||
message={`Successfully minted ${mintedAmount} SAT from the provided mint quote.`}
|
||||
title={translate("recoverySuccessTitle")}
|
||||
message={translate("recoveryMintSuccessMessage", {amount: mintedAmount})}
|
||||
/>
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx={'common.close'}
|
||||
tx={'commonClose'}
|
||||
onPress={toggleMintQuoteResultModal}
|
||||
/>
|
||||
</View>
|
||||
@@ -595,7 +596,7 @@ export const RecoveryOptionsScreen = observer(function RecoveryOptionsScreen({ r
|
||||
isVisible={isMeltQuoteModalVisible ? true : false}
|
||||
ContentComponent={
|
||||
<View style={$quoteContainer}>
|
||||
<Text text='Enter melt quote' />
|
||||
<Text tx='recoveryEnterMeltQuote' />
|
||||
<View style={{flexDirection: 'row', alignItems: 'center', marginTop: spacing.small}}>
|
||||
<TextInput
|
||||
ref={mintQuoteInputRef}
|
||||
@@ -608,14 +609,14 @@ export const RecoveryOptionsScreen = observer(function RecoveryOptionsScreen({ r
|
||||
style={[$quoteInput, {backgroundColor: inputBg, color: inputText}]}
|
||||
/>
|
||||
<Button
|
||||
tx={'common.paste'}
|
||||
tx={'commonPaste'}
|
||||
preset='secondary'
|
||||
style={$pasteButton}
|
||||
onPress={onPasteMeltQuote}
|
||||
/>
|
||||
</View>
|
||||
<View style={[$buttonContainer, {marginTop: spacing.medium}]}>
|
||||
<Button onPress={onRecoverChangeFromQuote} text='Recover change' />
|
||||
<Button onPress={onRecoverChangeFromQuote} tx='recoveryRecoverChangeButton' />
|
||||
</View>
|
||||
</View>
|
||||
}
|
||||
@@ -629,13 +630,13 @@ export const RecoveryOptionsScreen = observer(function RecoveryOptionsScreen({ r
|
||||
<ResultModalInfo
|
||||
icon="faCheckCircle"
|
||||
iconColor={colors.palette.success200}
|
||||
title="Success!"
|
||||
message={`Successfully recovered ${meltChangeAmount} SAT from the provided melt quote.`}
|
||||
title={translate("recoverySuccessTitle")}
|
||||
message={translate("recoveryMeltSuccessMessage", {amount: meltChangeAmount})}
|
||||
/>
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx={'common.close'}
|
||||
tx={'commonClose'}
|
||||
onPress={toggleMeltQuoteResultModal}
|
||||
/>
|
||||
</View>
|
||||
|
||||
@@ -231,7 +231,7 @@ export const RelaysScreen = observer(function RelaysScreen({ route }: Props) {
|
||||
<ListItem
|
||||
leftIcon="faCloudArrowUp"
|
||||
onPress={onConnect}
|
||||
tx="common.reconnect"
|
||||
tx="commonReconnect"
|
||||
bottomSeparator={true}
|
||||
style={{paddingHorizontal: spacing.medium}}
|
||||
/>
|
||||
@@ -251,7 +251,7 @@ export const RelaysScreen = observer(function RelaysScreen({ route }: Props) {
|
||||
isVisible={isAddRelayModalVisible ? true : false}
|
||||
ContentComponent={
|
||||
<View style={$newContainer}>
|
||||
<Text text='Set your own relay' preset="subheading" />
|
||||
<Text tx='relaysSetYourRelay' preset="subheading" />
|
||||
<View style={{flexDirection: 'row', alignItems: 'center', marginTop: spacing.small}}>
|
||||
<TextInput
|
||||
ref={newRelayInputRef}
|
||||
@@ -266,19 +266,19 @@ export const RelaysScreen = observer(function RelaysScreen({ route }: Props) {
|
||||
style={[$relayInput, {backgroundColor: inputBg, color: inputText}]}
|
||||
/>
|
||||
<Button
|
||||
tx={'common.paste'}
|
||||
tx={'commonPaste'}
|
||||
preset='secondary'
|
||||
style={$pasteButton}
|
||||
onPress={onPastePublicRelay}
|
||||
/>
|
||||
<Button
|
||||
tx={'common.save'}
|
||||
tx={'commonSave'}
|
||||
style={$saveButton}
|
||||
onPress={onSavePublicRelay}
|
||||
/>
|
||||
</View>
|
||||
<View style={[$buttonContainer, {marginTop: spacing.medium}]}>
|
||||
<Button preset='tertiary' onPress={resetDefaultRelays} tx='common.resetDefault' />
|
||||
<Button preset='tertiary' onPress={resetDefaultRelays} tx='commonResetDefault' />
|
||||
<Button preset='tertiary' onPress={toggleAddRelayModal} style={{marginLeft: spacing.small}} text='Cancel'/>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
@@ -260,7 +260,7 @@ export const ScanScreen = function ScanScreen({ route }: Props) {
|
||||
const onPaste = async function() {
|
||||
const clipboard = await Clipboard.getString()
|
||||
if (clipboard.length === 0) {
|
||||
infoMessage(translate("scanScreen.onPasteEmptyClipboard"))
|
||||
infoMessage(translate("scanScreen_onPasteEmptyClipboard"))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -300,7 +300,7 @@ export const ScanScreen = function ScanScreen({ route }: Props) {
|
||||
LeftAccessory={() => (
|
||||
<Icon icon='faPaste'/>
|
||||
)}
|
||||
tx='common.paste'
|
||||
tx='commonPaste'
|
||||
preset='secondary'
|
||||
style={{marginTop: spacing.medium, minWidth: 120}}
|
||||
/>
|
||||
|
||||
@@ -102,7 +102,7 @@ export const SecurityScreen = observer(function SecurityScreen({ route }: Props)
|
||||
return (
|
||||
<Screen preset='fixed' contentContainerStyle={$screen}>
|
||||
<View style={[$headerContainer, {backgroundColor: headerBg}]}>
|
||||
<Text preset="heading" text="Security" style={{color: headerTitle}} />
|
||||
<Text preset="heading" tx="securityScreenTitle" style={{color: headerTitle}} />
|
||||
</View>
|
||||
<ScrollView style={$contentContainer}>
|
||||
<Card
|
||||
@@ -110,8 +110,8 @@ export const SecurityScreen = observer(function SecurityScreen({ route }: Props)
|
||||
ContentComponent={
|
||||
<>
|
||||
<ListItem
|
||||
tx="securityScreen.biometricAuth"
|
||||
subTx="securityScreen.biometricAuthDescription"
|
||||
tx="securityScreen_biometricAuth"
|
||||
subTx="securityScreen_biometricAuthDescription"
|
||||
leftIcon={isBiometricAuthOn ? 'faLock' : 'faLockOpen'}
|
||||
leftIconColor={
|
||||
isBiometricAuthOn
|
||||
@@ -131,8 +131,8 @@ export const SecurityScreen = observer(function SecurityScreen({ route }: Props)
|
||||
/>
|
||||
{/*isBiometricAuthOn && (
|
||||
<ListItem
|
||||
tx="securityScreen.biometry"
|
||||
subTx={biometryType ? 'securityScreen.biometryAvailable' : 'securityScreen.biometryNone'}
|
||||
tx="securityScreen_biometry"
|
||||
subTx={biometryType ? 'securityScreen_biometryAvailable' : 'securityScreen_biometryNone'}
|
||||
leftIcon='faFingerprint'
|
||||
leftIconColor={colors.palette.iconGreyBlue400}
|
||||
leftIconInverse={true}
|
||||
|
||||
@@ -121,7 +121,7 @@ export const SeedRecoveryScreen = observer(function SeedRecoveryScreen({ route }
|
||||
const maybeMnemonic = await Clipboard.getString()
|
||||
|
||||
if(!maybeMnemonic) {
|
||||
throw new AppError(Err.VALIDATION_ERROR, translate('backupScreen.missingMnemonicError'))
|
||||
throw new AppError(Err.VALIDATION_ERROR, translate('backupMissingMnemonicError'))
|
||||
}
|
||||
|
||||
const cleanedMnemonic = maybeMnemonic.replace(/\s+/g, ' ').trim()
|
||||
@@ -136,7 +136,7 @@ export const SeedRecoveryScreen = observer(function SeedRecoveryScreen({ route }
|
||||
const onConfirmMnemonic = async function () {
|
||||
try {
|
||||
if(!mnemonic) {
|
||||
throw new AppError(Err.VALIDATION_ERROR, translate('backupScreen.missingMnemonicError'))
|
||||
throw new AppError(Err.VALIDATION_ERROR, translate('backupMissingMnemonicError'))
|
||||
}
|
||||
|
||||
LayoutAnimation.easeInEaseOut()
|
||||
@@ -163,7 +163,7 @@ export const SeedRecoveryScreen = observer(function SeedRecoveryScreen({ route }
|
||||
if(profile.nip05.includes(MINIBITS_NIP05_DOMAIN)) {
|
||||
setProfileToRecover(profile)
|
||||
} else {
|
||||
setInfo(translate("recovery.ownKeysImportAgain", { addr: profile.nip05 }))
|
||||
setInfo(translate("recovery_ownKeysImportAgain", { addr: profile.nip05 }))
|
||||
setIsNewProfileNeeded(true)
|
||||
}
|
||||
} catch (e: any) {
|
||||
@@ -221,12 +221,12 @@ export const SeedRecoveryScreen = observer(function SeedRecoveryScreen({ route }
|
||||
|
||||
const startRecovery = async function () {
|
||||
if(!selectedMintUrl) {
|
||||
setInfo(translate("recovery.selectMintFrom"))
|
||||
setInfo(translate("recovery_selectMintFrom"))
|
||||
return
|
||||
}
|
||||
|
||||
setIsRecoveryStarted(true)
|
||||
setStatusMessage(translate("recovery.starting"))
|
||||
setStatusMessage(translate("recovery_starting"))
|
||||
setIsLoading(true)
|
||||
setTimeout(() => doRecovery(), 100)
|
||||
}
|
||||
@@ -249,16 +249,16 @@ export const SeedRecoveryScreen = observer(function SeedRecoveryScreen({ route }
|
||||
}
|
||||
|
||||
if(!recoveredMint) {
|
||||
setInfo(translate("recovery.noMintSelected"))
|
||||
setInfo(translate("recovery_noMintSelected"))
|
||||
return
|
||||
}
|
||||
|
||||
if(!selectedKeyset) {
|
||||
setInfo(translate("recovery.noKeysetSelected"))
|
||||
setInfo(translate("recovery_noKeysetSelected"))
|
||||
return
|
||||
}
|
||||
|
||||
setStatusMessage(translate("recovery.restoringFromParam", { hostname: recoveredMint.hostname }))
|
||||
setStatusMessage(translate("recovery_restoringFromParam", { hostname: recoveredMint.hostname }))
|
||||
log.info('[restore]', `Restoring from ${recoveredMint.hostname}...`)
|
||||
|
||||
const { proofs } = await walletStore.restore(
|
||||
@@ -272,7 +272,7 @@ export const SeedRecoveryScreen = observer(function SeedRecoveryScreen({ route }
|
||||
)
|
||||
|
||||
//log.debug('[restore]', `Restored proofs`, proofs.length)
|
||||
setStatusMessage(translate("recovery.foundProofsAmount", { amount: proofs.length }))
|
||||
setStatusMessage(translate("recovery_foundProofsAmount", { amount: proofs.length }))
|
||||
|
||||
if (proofs.length > 0) {
|
||||
// need to move counter by whole interval to avoid duplicate _B!!!
|
||||
@@ -287,14 +287,14 @@ export const SeedRecoveryScreen = observer(function SeedRecoveryScreen({ route }
|
||||
|
||||
log.debug('[restore]', `Spent and pending proofs`, {spent: proofStates.SPENT.length, pending: proofStates.PENDING.length})
|
||||
|
||||
setStatusMessage(translate("recovery.spentProofsAmount", { amount: proofStates.SPENT.length }))
|
||||
setStatusMessage(translate("recovery_spentProofsAmount", { amount: proofStates.SPENT.length }))
|
||||
|
||||
const spentAmount = CashuUtils.getProofsAmount(proofStates.SPENT as Proof[])
|
||||
alreadySpentAmount += spentAmount
|
||||
|
||||
if(proofStates.UNSPENT.length > 0) {
|
||||
|
||||
setStatusMessage(translate("recovery.completing"))
|
||||
setStatusMessage(translate("recovery_completing"))
|
||||
|
||||
const amount = CashuUtils.getProofsAmount(proofStates.UNSPENT)
|
||||
recoveredAmount = amount
|
||||
@@ -354,7 +354,7 @@ export const SeedRecoveryScreen = observer(function SeedRecoveryScreen({ route }
|
||||
|
||||
const pendingAmount = CashuUtils.getProofsAmount(proofStates.PENDING as Proof[])
|
||||
|
||||
setStatusMessage(translate("recovery.foundPendingProofsAmount", { pendingAmount }))
|
||||
setStatusMessage(translate("recovery_foundPendingProofsAmount", { pendingAmount }))
|
||||
log.debug(`Found pending ecash with ${recoveredMint.hostname}...`)
|
||||
|
||||
// Let's create new draft receive transaction in database
|
||||
@@ -453,7 +453,7 @@ export const SeedRecoveryScreen = observer(function SeedRecoveryScreen({ route }
|
||||
const currency = getCurrency(selectedKeyset?.unit as MintUnit)
|
||||
setResultModalInfo({
|
||||
status: TransactionStatus.COMPLETED,
|
||||
message: translate("recovery.recoveredResult", {
|
||||
message: translate("recovery_recoveredResult", {
|
||||
formattedCurrency: formatCurrency(recoveredAmount, currency.code),
|
||||
code: currency.code
|
||||
})
|
||||
@@ -462,19 +462,19 @@ export const SeedRecoveryScreen = observer(function SeedRecoveryScreen({ route }
|
||||
if(errors.length > 0) {
|
||||
setResultModalInfo({
|
||||
status: TransactionStatus.ERROR,
|
||||
message: translate("recovery.resultErrors")
|
||||
message: translate("recovery_resultErrors")
|
||||
})
|
||||
setRecoveryErrors(errors)
|
||||
} else {
|
||||
if(alreadySpentAmount > 0) {
|
||||
setResultModalInfo({
|
||||
status: TransactionStatus.EXPIRED,
|
||||
message: translate("recovery.resultSpent")
|
||||
message: translate("recovery_resultSpent")
|
||||
})
|
||||
} else {
|
||||
setResultModalInfo({
|
||||
status: TransactionStatus.EXPIRED,
|
||||
message: translate("recovery.resultExpired")
|
||||
message: translate("recovery_resultExpired")
|
||||
})
|
||||
}
|
||||
|
||||
@@ -488,12 +488,12 @@ export const SeedRecoveryScreen = observer(function SeedRecoveryScreen({ route }
|
||||
const onCompleteAddress = async () => {
|
||||
try {
|
||||
if(!seedHashRef.current || !seedRef.current) {
|
||||
throw new AppError(Err.VALIDATION_ERROR, translate('backupScreen.missingMnemonicOrSeedError'))
|
||||
throw new AppError(Err.VALIDATION_ERROR, translate('backupMissingMnemonicOrSeedError'))
|
||||
}
|
||||
// create a new walletId and Nostr key pair after a new install or factory reset
|
||||
// and keep provided seed
|
||||
setIsLoading(true)
|
||||
setStatusMessage(translate("recovery.recoveringAddress"))
|
||||
setStatusMessage(translate("recovery_recoveringAddress"))
|
||||
|
||||
const keys = KeyChain.generateWalletKeys()
|
||||
// Set seed to the provided one
|
||||
@@ -533,7 +533,7 @@ export const SeedRecoveryScreen = observer(function SeedRecoveryScreen({ route }
|
||||
await mintsStore.addMint(MINIBITS_MINT_URL)
|
||||
}
|
||||
|
||||
setStatusMessage(translate('recovery.completed'))
|
||||
setStatusMessage(translate('recovery_completed'))
|
||||
|
||||
// go directly to the wallet (profile hase been rehydrated from the one with the seed)
|
||||
//@ts-ignore
|
||||
@@ -567,15 +567,15 @@ export const SeedRecoveryScreen = observer(function SeedRecoveryScreen({ route }
|
||||
onLeftPress={() => navigation.goBack()}
|
||||
/>
|
||||
<View style={[$headerContainer, {backgroundColor: headerBg}]}>
|
||||
<Text preset="heading" text="Wallet recovery" style={{color: headerTitle, zIndex: 10}} />
|
||||
<Text preset="heading" tx="seedRecoveryScreenTitle" style={{color: headerTitle, zIndex: 10}} />
|
||||
</View>
|
||||
<ScrollView style={$contentContainer}>
|
||||
<Card
|
||||
style={$card}
|
||||
ContentComponent={
|
||||
<ListItem
|
||||
tx="recovery.mnemonicCollision"
|
||||
subTx="recovery.mnemonicCollisionDesc"
|
||||
tx="recovery_mnemonicCollision"
|
||||
subTx="recovery_mnemonicCollisionDesc"
|
||||
leftIcon='faTriangleExclamation'
|
||||
// leftIconColor='red'
|
||||
style={$item}
|
||||
@@ -586,7 +586,7 @@ export const SeedRecoveryScreen = observer(function SeedRecoveryScreen({ route }
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
onPress={onBack}
|
||||
tx='common.back'
|
||||
tx='commonBack'
|
||||
preset='secondary'
|
||||
/>
|
||||
</View>
|
||||
@@ -607,7 +607,7 @@ export const SeedRecoveryScreen = observer(function SeedRecoveryScreen({ route }
|
||||
/>
|
||||
)}
|
||||
<View style={[$headerContainer, {backgroundColor: headerBg}]}>
|
||||
<Text preset="heading" text="Wallet recovery" style={{color: headerTitle, zIndex: 10}} />
|
||||
<Text preset="heading" tx="seedRecoveryScreenTitle" style={{color: headerTitle, zIndex: 10}} />
|
||||
</View>
|
||||
<ScrollView style={$contentContainer}>
|
||||
<MnemonicInput
|
||||
@@ -628,12 +628,12 @@ export const SeedRecoveryScreen = observer(function SeedRecoveryScreen({ route }
|
||||
<ListItem
|
||||
tx="recoveryFromMints"
|
||||
subTx={mintsStore.mintCount > 0 ? undefined : "recoveryFromMintsDesc"}
|
||||
LeftComponent={<View style={[$numIcon, {backgroundColor: numIconColor}]}><Text text='2'/></View>}
|
||||
LeftComponent={<View style={[$numIcon, {backgroundColor: numIconColor}]}><Text tx='seedRecoveryStep2'/></View>}
|
||||
RightComponent={mintsStore.mintCount > 0 ? (
|
||||
<View style={$rightContainer}>
|
||||
<Button
|
||||
onPress={onAddMints}
|
||||
text='Mints'
|
||||
tx='seedRecoveryMints'
|
||||
preset='secondary'
|
||||
/>
|
||||
</View>
|
||||
@@ -682,7 +682,7 @@ export const SeedRecoveryScreen = observer(function SeedRecoveryScreen({ route }
|
||||
{(startIndex > 0 || totalRecoveredAmount > 0) && (
|
||||
<Button
|
||||
onPress={onCompleteAddress}
|
||||
tx="common.completed"
|
||||
tx="commonCompleted"
|
||||
preset='secondary'
|
||||
/>
|
||||
)}
|
||||
@@ -690,7 +690,7 @@ export const SeedRecoveryScreen = observer(function SeedRecoveryScreen({ route }
|
||||
|
||||
<View style={[$buttonContainer,{marginTop: 0}]}>
|
||||
<Text
|
||||
text={translate("recovery.intervalParam", {
|
||||
text={translate("recovery_intervalParam", {
|
||||
startIndex: startIndex,
|
||||
endIndex: endIndex
|
||||
})}
|
||||
@@ -699,7 +699,7 @@ export const SeedRecoveryScreen = observer(function SeedRecoveryScreen({ route }
|
||||
/>
|
||||
<Pressable onPress={toggleIndexModal}>
|
||||
<Text
|
||||
tx="recovery.setManually"
|
||||
tx="recovery_setManually"
|
||||
size='xxs'
|
||||
style={{color: textHint, alignSelf: 'center', marginTop: spacing.small}}
|
||||
/>
|
||||
@@ -707,7 +707,7 @@ export const SeedRecoveryScreen = observer(function SeedRecoveryScreen({ route }
|
||||
</View>
|
||||
<View style={[$buttonContainer,{marginTop: 0}]}>
|
||||
<Text
|
||||
text={translate("recovery.keysetID", {
|
||||
text={translate("recovery_keysetID", {
|
||||
id: selectedKeyset?.id,
|
||||
unit: selectedKeyset?.unit
|
||||
})}
|
||||
@@ -717,7 +717,7 @@ export const SeedRecoveryScreen = observer(function SeedRecoveryScreen({ route }
|
||||
{selectedMintKeysets.length > 1 && (
|
||||
<Pressable onPress={toggleKeysetModal}>
|
||||
<Text
|
||||
tx="recovery.selectAnotherKeyset"
|
||||
tx="recovery_selectAnotherKeyset"
|
||||
size='xxs'
|
||||
style={{color: textHint, alignSelf: 'center', marginTop: spacing.extraSmall}}
|
||||
/>
|
||||
@@ -728,7 +728,7 @@ export const SeedRecoveryScreen = observer(function SeedRecoveryScreen({ route }
|
||||
)}
|
||||
{mintsStore.mintCount > 0 && !selectedMintUrl && (
|
||||
<Text
|
||||
tx='recovery.selectMintFrom'
|
||||
tx='recovery_selectMintFrom'
|
||||
size='xxs'
|
||||
style={{color: textHint, alignSelf: 'center', margin: spacing.large}}
|
||||
/>
|
||||
@@ -756,12 +756,12 @@ export const SeedRecoveryScreen = observer(function SeedRecoveryScreen({ route }
|
||||
textAlign='right'
|
||||
/>
|
||||
<Button
|
||||
tx='common.save'
|
||||
tx='commonSave'
|
||||
onPress={onResetStartIndex}
|
||||
/>
|
||||
</View>
|
||||
<Text
|
||||
tx="recovery.startIndexDesc"
|
||||
tx="recovery_startIndexDesc"
|
||||
size='xxs'
|
||||
style={{color: textHint, margin: spacing.small}}
|
||||
/>
|
||||
@@ -773,7 +773,7 @@ export const SeedRecoveryScreen = observer(function SeedRecoveryScreen({ route }
|
||||
<BottomModal
|
||||
isVisible={isKeysetModalVisible}
|
||||
// style={{alignItems: 'stretch'}}
|
||||
HeadingComponent={<Text tx="recovery.selectKeyset" style={{textAlign: 'center', margin: spacing.small}}/>}
|
||||
HeadingComponent={<Text tx="recovery_selectKeyset" style={{textAlign: 'center', margin: spacing.small}}/>}
|
||||
ContentComponent={
|
||||
<FlatList
|
||||
data={selectedMintKeysets}
|
||||
@@ -802,7 +802,7 @@ export const SeedRecoveryScreen = observer(function SeedRecoveryScreen({ route }
|
||||
<Button
|
||||
preset={'secondary'}
|
||||
onPress={toggleKeysetModal}
|
||||
tx='common.close'
|
||||
tx='commonClose'
|
||||
style={{marginTop: spacing.small}}
|
||||
/>}
|
||||
onBackButtonPress={toggleKeysetModal}
|
||||
@@ -840,13 +840,13 @@ export const SeedRecoveryScreen = observer(function SeedRecoveryScreen({ route }
|
||||
<ResultModalInfo
|
||||
icon="faCheckCircle"
|
||||
iconColor={colors.palette.success200}
|
||||
title={translate("recovery.success")}
|
||||
title={translate("recovery_success")}
|
||||
message={resultModalInfo?.message}
|
||||
/>
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx='common.close'
|
||||
tx='commonClose'
|
||||
onPress={toggleResultModal}
|
||||
/>
|
||||
</View>
|
||||
@@ -858,7 +858,7 @@ export const SeedRecoveryScreen = observer(function SeedRecoveryScreen({ route }
|
||||
<ResultModalInfo
|
||||
icon="faTriangleExclamation"
|
||||
iconColor={colors.palette.angry500}
|
||||
title={translate("recovery.failed")}
|
||||
title={translate("recovery_failed")}
|
||||
message={resultModalInfo?.message}
|
||||
/>
|
||||
<View style={$buttonContainer}>
|
||||
@@ -882,7 +882,7 @@ export const SeedRecoveryScreen = observer(function SeedRecoveryScreen({ route }
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx='common.close'
|
||||
tx='commonClose'
|
||||
onPress={toggleResultModal}
|
||||
/>
|
||||
</View>
|
||||
|
||||
+25
-25
@@ -574,14 +574,14 @@ export const SendScreen = observer(function SendScreen({ route }: Props) {
|
||||
log.trace('[onAmountEndEditing]', amount)
|
||||
|
||||
if (!amount || amount === 0) {
|
||||
infoMessage(translate('payCommon.amountZeroOrNegative'))
|
||||
infoMessage(translate('payCommon_amountZeroOrNegative'))
|
||||
return
|
||||
}
|
||||
|
||||
const availableBalances = proofsStore.getMintBalancesWithEnoughBalance(amount, unitRef.current)
|
||||
|
||||
if (availableBalances.length === 0) {
|
||||
infoMessage(translate('payCommon.insufficientFunds'))
|
||||
infoMessage(translate('payCommon_insufficientFunds'))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1043,7 +1043,7 @@ export const SendScreen = observer(function SendScreen({ route }: Props) {
|
||||
/>
|
||||
<Text
|
||||
size='xs'
|
||||
text="Locked"
|
||||
tx="sendLocked"
|
||||
style={{color: amountInputColor, marginLeft: spacing.tiny}}
|
||||
/>
|
||||
|
||||
@@ -1051,7 +1051,7 @@ export const SendScreen = observer(function SendScreen({ route }: Props) {
|
||||
) : (
|
||||
<Text
|
||||
size='xs'
|
||||
tx='amount.send'
|
||||
tx='amountSend'
|
||||
style={{
|
||||
color: amountInputColor,
|
||||
textAlign: 'center',
|
||||
@@ -1106,7 +1106,7 @@ export const SendScreen = observer(function SendScreen({ route }: Props) {
|
||||
ContentComponent={
|
||||
<>
|
||||
<TranItem
|
||||
label="tranDetailScreen.sentTo"
|
||||
label="tranDetailScreen_sentTo"
|
||||
isFirst={true}
|
||||
value={mintsStore.findByUrl(transaction.mint)?.shortname as string}
|
||||
/>
|
||||
@@ -1117,13 +1117,13 @@ export const SendScreen = observer(function SendScreen({ route }: Props) {
|
||||
/>
|
||||
)}
|
||||
<TranItem
|
||||
label="transactionCommon.feePaid"
|
||||
label="transactionCommon_feePaid"
|
||||
value={transaction.fee || 0}
|
||||
unit={unitRef.current}
|
||||
isCurrency={true}
|
||||
/>
|
||||
<TranItem
|
||||
label="tranDetailScreen.status"
|
||||
label="tranDetailScreen_status"
|
||||
value={transaction.status as string}
|
||||
/>
|
||||
</>
|
||||
@@ -1135,7 +1135,7 @@ export const SendScreen = observer(function SendScreen({ route }: Props) {
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx={'common.close'}
|
||||
tx={'commonClose'}
|
||||
onPress={gotoWallet}
|
||||
/>
|
||||
</View>
|
||||
@@ -1164,11 +1164,11 @@ export const SendScreen = observer(function SendScreen({ route }: Props) {
|
||||
isVisible={isPubkeySelectorModalVisible}
|
||||
ContentComponent={
|
||||
<View style={$bottomModal}>
|
||||
<Text text="Lock ecash" preset="subheading" />
|
||||
<Text tx="sendLockEcash" preset="subheading" />
|
||||
<Text
|
||||
size="xxs"
|
||||
style={{color: hintColor}}
|
||||
text="Lock ecash token to one of your contacts or to a public key. Only the receiver will be able to unlock it."
|
||||
tx="sendLockEcashDesc"
|
||||
/>
|
||||
<View
|
||||
style={{
|
||||
@@ -1193,7 +1193,7 @@ export const SendScreen = observer(function SendScreen({ route }: Props) {
|
||||
/>
|
||||
<Button
|
||||
preset='secondary'
|
||||
tx='common.paste'
|
||||
tx='commonPaste'
|
||||
style={{
|
||||
borderRadius: 0,
|
||||
marginLeft: -spacing.small,
|
||||
@@ -1204,7 +1204,7 @@ export const SendScreen = observer(function SendScreen({ route }: Props) {
|
||||
/>
|
||||
<Button
|
||||
preset='secondary'
|
||||
tx="common.scan"
|
||||
tx="commonScan"
|
||||
style={{
|
||||
borderTopLeftRadius: 0,
|
||||
borderBottomLeftRadius: 0,
|
||||
@@ -1252,7 +1252,7 @@ export const SendScreen = observer(function SendScreen({ route }: Props) {
|
||||
<Text
|
||||
size="xxs"
|
||||
style={{color: hintColor, marginTop: spacing.small}}
|
||||
text="Lock for"
|
||||
tx="sendLockFor"
|
||||
/>
|
||||
<View
|
||||
style={[
|
||||
@@ -1303,7 +1303,7 @@ export const SendScreen = observer(function SendScreen({ route }: Props) {
|
||||
</View>
|
||||
<View style={[$buttonContainer, {marginTop: spacing.medium}]}>
|
||||
<Button
|
||||
text="Lock"
|
||||
tx="sendLock"
|
||||
LeftAccessory={() => (<Icon icon="faLock" color="white" size={spacing.medium}/>)}
|
||||
onPress={onLockPubkeySelect}
|
||||
style={{marginRight: spacing.medium}}
|
||||
@@ -1311,7 +1311,7 @@ export const SendScreen = observer(function SendScreen({ route }: Props) {
|
||||
<Button
|
||||
style={{marginRight: spacing.medium}}
|
||||
preset="tertiary"
|
||||
tx="common.cancel"
|
||||
tx="commonCancel"
|
||||
onPress={onLockPubkeyCancel}
|
||||
/>
|
||||
</View>
|
||||
@@ -1365,7 +1365,7 @@ export const SendScreen = observer(function SendScreen({ route }: Props) {
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx={'common.close'}
|
||||
tx={'commonClose'}
|
||||
onPress={gotoWallet}
|
||||
/>
|
||||
</View>
|
||||
@@ -1396,7 +1396,7 @@ export const SendScreen = observer(function SendScreen({ route }: Props) {
|
||||
) : (
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx={'common.close'}
|
||||
tx={'commonClose'}
|
||||
onPress={toggleResultModal}
|
||||
/>
|
||||
)}
|
||||
@@ -1464,9 +1464,9 @@ const SelectProofsBlock = observer(function (props: {
|
||||
]}
|
||||
/>
|
||||
</View>
|
||||
<Text text='Select ecash to send' style={{marginTop: spacing.large}}/>
|
||||
<Text tx='sendSelectEcashToSend' style={{marginTop: spacing.large}}/>
|
||||
<Text
|
||||
text='You can only send exact ecash denominations while you are offline.'
|
||||
tx='sendOfflineExactDenoms'
|
||||
style={{color: hintColor, paddingHorizontal: spacing.small, textAlign: 'center'}}
|
||||
size='xs'
|
||||
/>
|
||||
@@ -1506,13 +1506,13 @@ const SelectProofsBlock = observer(function (props: {
|
||||
<View style={[$bottomContainer, {marginTop: spacing.extraLarge}]}>
|
||||
<View style={[$buttonContainer]}>
|
||||
<Button
|
||||
text="Create token"
|
||||
tx="sendCreateToken"
|
||||
onPress={props.onOfflineSendConfirm}
|
||||
style={{marginRight: spacing.medium}}
|
||||
/>
|
||||
<Button
|
||||
preset="secondary"
|
||||
text="Cancel"
|
||||
tx="commonCancel"
|
||||
onPress={onCancel}
|
||||
/>
|
||||
</View>
|
||||
@@ -1552,7 +1552,7 @@ const SelectProofsBlock = observer(function (props: {
|
||||
/>
|
||||
) : (
|
||||
<Button
|
||||
text='Send to contact'
|
||||
tx='sendToContact'
|
||||
preset='secondary'
|
||||
onPress={props.gotoContacts}
|
||||
style={{
|
||||
@@ -1617,7 +1617,7 @@ const SendAsNostrDMBlock = observer(function (props: {
|
||||
) : (
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
text="Send"
|
||||
tx="commonSend"
|
||||
onPress={props.sendAsNostrDM}
|
||||
style={{marginRight: spacing.medium}}
|
||||
LeftAccessory={() => (
|
||||
@@ -1631,7 +1631,7 @@ const SendAsNostrDMBlock = observer(function (props: {
|
||||
/>
|
||||
<Button
|
||||
preset="tertiary"
|
||||
text="Close"
|
||||
tx="commonClose"
|
||||
onPress={props.toggleNostrDMModal}
|
||||
/>
|
||||
</View>
|
||||
@@ -1665,7 +1665,7 @@ const SendAsNostrDMBlock = observer(function (props: {
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx={'common.close'}
|
||||
tx={'commonClose'}
|
||||
onPress={props.onClose}
|
||||
/>
|
||||
</View>
|
||||
|
||||
@@ -278,7 +278,7 @@ export const SettingsScreen = observer(function SettingsScreen({ route }: Props)
|
||||
try {
|
||||
userSettingsStore.setNextTheme(theme)
|
||||
setCurrentTheme(theme)
|
||||
setInfo('Restart the wallet to apply the new theme.')
|
||||
setInfo(translate('settingsScreen_restartTheme'))
|
||||
} catch (e: any) {
|
||||
log.warn('[onSelectTheme]', e.message)
|
||||
}
|
||||
@@ -316,7 +316,7 @@ export const SettingsScreen = observer(function SettingsScreen({ route }: Props)
|
||||
<View style={[isHeaderVisible ? $headerContainer : $headerCollapsed, {backgroundColor: headerBg}]}>
|
||||
<Text
|
||||
preset='heading'
|
||||
tx='settingsScreen.title'
|
||||
tx='settingsScreen_title'
|
||||
style={{color: headerTitle}}
|
||||
/>
|
||||
</View>
|
||||
@@ -336,7 +336,7 @@ export const SettingsScreen = observer(function SettingsScreen({ route }: Props)
|
||||
<View style={$rightContainer}>
|
||||
<Text
|
||||
style={$itemRight}
|
||||
text={translate('settingsScreen.mintsCount', {count: mintsStore.mintCount})}
|
||||
text={translate('settingsScreen_mintsCount', {count: mintsStore.mintCount})}
|
||||
/>
|
||||
</View>
|
||||
}
|
||||
@@ -345,7 +345,7 @@ export const SettingsScreen = observer(function SettingsScreen({ route }: Props)
|
||||
onPress={gotoMints}
|
||||
/>
|
||||
<ListItem
|
||||
tx='settingsScreen.exchangeCurrency'
|
||||
tx='settingsScreen_exchangeCurrency'
|
||||
leftIcon='faMoneyBill1'
|
||||
leftIconColor={getRateColor() as string}
|
||||
leftIconInverse={true}
|
||||
@@ -353,7 +353,8 @@ export const SettingsScreen = observer(function SettingsScreen({ route }: Props)
|
||||
RightComponent={
|
||||
<View style={$rightContainer}>
|
||||
<Text
|
||||
text={userSettingsStore.exchangeCurrency ?? 'None'}
|
||||
tx={userSettingsStore.exchangeCurrency ? undefined : 'settingsScreen_currencyNone'}
|
||||
text={userSettingsStore.exchangeCurrency ?? undefined}
|
||||
style={$itemRight}
|
||||
/>
|
||||
</View>
|
||||
@@ -362,7 +363,7 @@ export const SettingsScreen = observer(function SettingsScreen({ route }: Props)
|
||||
onPress={toggleCurrencyModal}
|
||||
/>
|
||||
<ListItem
|
||||
tx='settingsScreen.theme'
|
||||
tx='settingsScreen_theme'
|
||||
leftIcon='faPaintbrush'
|
||||
leftIconColor={currentTheme === ThemeCode.DEFAULT ? defaultThemeColor as string : Themes[currentTheme as ThemeCode]?.color as string}
|
||||
leftIconInverse={true}
|
||||
@@ -396,16 +397,16 @@ export const SettingsScreen = observer(function SettingsScreen({ route }: Props)
|
||||
<View style={$rightContainer}>
|
||||
<Text
|
||||
style={$itemRight}
|
||||
tx={areNotificationsEnabled ? 'common.enabled' : 'common.disabled'}
|
||||
tx={areNotificationsEnabled ? 'commonEnabled' : 'commonDisabled'}
|
||||
/>
|
||||
</View>
|
||||
}
|
||||
bottomSeparator={true}
|
||||
onPress={openNotificationSettings}
|
||||
/>
|
||||
<ListItem
|
||||
text='Nostr Wallet Connect'
|
||||
subText={`${nwcStore.all.length} allowed app${nwcStore.all.length > 1 ? 's' : ''}`}
|
||||
/>
|
||||
<ListItem
|
||||
tx='settingsScreen_nwcTitle'
|
||||
subText={translate('settingsScreen_nwcSubtext', {count: nwcStore.all.length})}
|
||||
LeftComponent={
|
||||
<View style={{
|
||||
borderRadius: spacing.small,
|
||||
@@ -429,8 +430,8 @@ export const SettingsScreen = observer(function SettingsScreen({ route }: Props)
|
||||
onPress={gotoNwc}
|
||||
/>
|
||||
<ListItem
|
||||
tx="nostr.relaysTitle"
|
||||
subText={translate("common.connectedParam", { param: relaysStore.connectedCount })}
|
||||
tx="nostr_relaysTitle"
|
||||
subText={translate("commonConnectedParam", { param: relaysStore.connectedCount })}
|
||||
leftIcon='faCircleNodes'
|
||||
leftIconColor={colors.palette.iconViolet200}
|
||||
leftIconInverse={true}
|
||||
@@ -438,7 +439,7 @@ export const SettingsScreen = observer(function SettingsScreen({ route }: Props)
|
||||
<View style={$rightContainer}>
|
||||
<Text
|
||||
style={$itemRight}
|
||||
text={`${relaysStore.allRelays.length} relays`}
|
||||
text={translate('settingsScreen_relaysCount', {count: relaysStore.allRelays.length})}
|
||||
/>
|
||||
</View>
|
||||
}
|
||||
@@ -453,7 +454,7 @@ export const SettingsScreen = observer(function SettingsScreen({ route }: Props)
|
||||
ContentComponent={
|
||||
<>
|
||||
<ListItem
|
||||
text='Backup'
|
||||
tx='settingsScreen_backup'
|
||||
leftIcon='faCloudArrowUp'
|
||||
leftIconColor={colors.palette.success300}
|
||||
leftIconInverse={true}
|
||||
@@ -462,7 +463,7 @@ export const SettingsScreen = observer(function SettingsScreen({ route }: Props)
|
||||
onPress={gotoBackupOptions}
|
||||
/>
|
||||
<ListItem
|
||||
text='Recovery'
|
||||
tx='settingsScreen_recovery'
|
||||
leftIcon='faHeartPulse'
|
||||
leftIconColor={colors.palette.angry300}
|
||||
leftIconInverse={true}
|
||||
@@ -477,7 +478,7 @@ export const SettingsScreen = observer(function SettingsScreen({ route }: Props)
|
||||
ContentComponent={
|
||||
<>
|
||||
<ListItem
|
||||
tx='settingsScreen.security'
|
||||
tx='settingsScreen_security'
|
||||
leftIcon='faShieldHalved'
|
||||
leftIconColor={colors.palette.iconGreyBlue400}
|
||||
leftIconInverse={true}
|
||||
@@ -486,7 +487,7 @@ export const SettingsScreen = observer(function SettingsScreen({ route }: Props)
|
||||
onPress={gotoSecurity}
|
||||
/>
|
||||
<ListItem
|
||||
tx='settingsScreen.privacy'
|
||||
tx='settingsScreen_privacy'
|
||||
leftIcon='faEyeSlash'
|
||||
leftIconColor={colors.palette.blue200}
|
||||
leftIconInverse={true}
|
||||
@@ -495,7 +496,7 @@ export const SettingsScreen = observer(function SettingsScreen({ route }: Props)
|
||||
onPress={gotoPrivacy}
|
||||
/>
|
||||
<ListItem
|
||||
tx='settingsScreen.update'
|
||||
tx='settingsScreen_update'
|
||||
leftIcon='faWandMagicSparkles'
|
||||
leftIconColor={(isUpdateAvailable || isNativeUpdateAvailable) ? colors.palette.iconMagenta200 : colors.palette.neutral400}
|
||||
leftIconInverse={true}
|
||||
@@ -503,7 +504,7 @@ export const SettingsScreen = observer(function SettingsScreen({ route }: Props)
|
||||
<View style={$rightContainer}>
|
||||
<Text
|
||||
style={$itemRight}
|
||||
text={(isUpdateAvailable || isNativeUpdateAvailable) ? '1 update' : ''}
|
||||
tx={(isUpdateAvailable || isNativeUpdateAvailable) ? 'settingsScreen_updateAvailable' : undefined}
|
||||
/>
|
||||
</View>
|
||||
}
|
||||
@@ -512,7 +513,7 @@ export const SettingsScreen = observer(function SettingsScreen({ route }: Props)
|
||||
onPress={gotoUpdate}
|
||||
/>
|
||||
<ListItem
|
||||
tx='settingsScreen.devOptions'
|
||||
tx='settingsScreen_devOptions'
|
||||
leftIcon='faCode'
|
||||
leftIconColor={colors.palette.neutral600}
|
||||
leftIconInverse={true}
|
||||
@@ -544,7 +545,7 @@ export const SettingsScreen = observer(function SettingsScreen({ route }: Props)
|
||||
)}
|
||||
<ListItem
|
||||
leftIcon='faXmark'
|
||||
text={'Do not load exchange rates'}
|
||||
tx='settingsScreen_doNotLoadRates'
|
||||
onPress={onResetCurrency}
|
||||
bottomSeparator={true}
|
||||
/>
|
||||
|
||||
@@ -89,7 +89,7 @@ export const TokenReceiveScreen = function TokenReceiveScreen({ route }: Props)
|
||||
const onPaste = async function() {
|
||||
const clipboard = await Clipboard.getString()
|
||||
if (clipboard.length === 0) {
|
||||
infoMessage(translate('tokenReceiveScreen.onPasteEmptyClipboard'))
|
||||
infoMessage(translate('tokenReceiveScreen_onPasteEmptyClipboard'))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ export const TokenReceiveScreen = function TokenReceiveScreen({ route }: Props)
|
||||
<View style={[$headerContainer, {backgroundColor: headerBg}]}>
|
||||
<Text
|
||||
preset="heading"
|
||||
tx="payCommon.receiveEcash"
|
||||
tx="payCommon_receiveEcash"
|
||||
style={{color: headerTitle}}
|
||||
/>
|
||||
</View>
|
||||
@@ -171,7 +171,7 @@ export const TokenReceiveScreen = function TokenReceiveScreen({ route }: Props)
|
||||
<>
|
||||
<ListItem
|
||||
leftIcon='faMoneyBill1'
|
||||
tx="common.pasteEcashToken"
|
||||
tx="commonPasteEcashToken"
|
||||
bottomSeparator={showTokenInput}
|
||||
onPress={() => setShowTokenInput((v) => !v)}
|
||||
/>
|
||||
@@ -201,7 +201,7 @@ export const TokenReceiveScreen = function TokenReceiveScreen({ route }: Props)
|
||||
<View style={[$buttonContainer, {marginTop: spacing.small}]}>
|
||||
<Button
|
||||
preset='default'
|
||||
tx='common.confirm'
|
||||
tx='commonConfirm'
|
||||
onPress={onConfirm}
|
||||
// style={{marginLeft: spacing.small}}
|
||||
LeftAccessory={() => <Icon icon='faCheckCircle' color='white'/>}
|
||||
@@ -211,7 +211,7 @@ export const TokenReceiveScreen = function TokenReceiveScreen({ route }: Props)
|
||||
<View style={[$buttonContainer, {marginTop: spacing.small}]}>
|
||||
<Button
|
||||
preset='secondary'
|
||||
tx={'common.paste'}
|
||||
tx={'commonPaste'}
|
||||
onPress={onPaste}
|
||||
LeftAccessory={() => (
|
||||
<Icon icon='faPaste'/>
|
||||
@@ -224,7 +224,7 @@ export const TokenReceiveScreen = function TokenReceiveScreen({ route }: Props)
|
||||
{/* Create Payment Request */}
|
||||
<ListItem
|
||||
leftIcon='faQrcode'
|
||||
tx="common.createCashuPaymentRequest"
|
||||
tx="commonCreateCashuPaymentRequest"
|
||||
onPress={gotoCashuPaymentRequest}
|
||||
topSeparator={true}
|
||||
/>
|
||||
@@ -234,7 +234,7 @@ export const TokenReceiveScreen = function TokenReceiveScreen({ route }: Props)
|
||||
//style={{marginBottom: spacing.medium}}
|
||||
/>
|
||||
<Button
|
||||
tx="tokenReceiveScreen.topupWithLightning"
|
||||
tx="tokenReceiveScreen_topupWithLightning"
|
||||
LeftAccessory={() => (
|
||||
<Icon
|
||||
icon='faBolt'
|
||||
@@ -270,7 +270,7 @@ export const TokenReceiveScreen = function TokenReceiveScreen({ route }: Props)
|
||||
)}
|
||||
onPress={gotoScan}
|
||||
style={{backgroundColor: mainButtonColor}}
|
||||
text='Scan'
|
||||
tx='tokenReceiveScreen_scan'
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
+40
-40
@@ -206,7 +206,7 @@ export const TopupScreen = observer(function TopupScreen({ route }: Props) {
|
||||
}
|
||||
|
||||
if (!relays) {
|
||||
throw new AppError(Err.VALIDATION_ERROR, translate("nostr.missingRelaysError"))
|
||||
throw new AppError(Err.VALIDATION_ERROR, translate("nostr_missingRelaysError"))
|
||||
}
|
||||
|
||||
const {pubkey, npub, name, picture} = walletProfileStore
|
||||
@@ -288,7 +288,7 @@ export const TopupScreen = observer(function TopupScreen({ route }: Props) {
|
||||
status: result.transaction?.status as TransactionStatus,
|
||||
title: result.error.params?.message
|
||||
? result.error.message
|
||||
: translate("topup.failed"),
|
||||
: translate("topup_failed"),
|
||||
message: result.error.params?.message || result.error.message,
|
||||
})
|
||||
setIsResultModalVisible(true)
|
||||
@@ -389,11 +389,11 @@ export const TopupScreen = observer(function TopupScreen({ route }: Props) {
|
||||
log.trace('[onAmountEndEditing]', {amount, unit: unitRef.current})
|
||||
|
||||
if (!isInternetReachable) {
|
||||
setInfo(translate('common.offlinePretty'))
|
||||
setInfo(translate('commonOfflinePretty'))
|
||||
}
|
||||
|
||||
if (!amount || amount === 0) {
|
||||
infoMessage(translate('payCommon.amountZeroOrNegative'))
|
||||
infoMessage(translate('payCommon_amountZeroOrNegative'))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -402,7 +402,7 @@ export const TopupScreen = observer(function TopupScreen({ route }: Props) {
|
||||
amount < roundUp(lnurlWithdrawParams?.minWithdrawable / 1000, 0)
|
||||
) {
|
||||
infoMessage(
|
||||
translate('payCommon.minimumWithdraw', {
|
||||
translate('payCommon_minimumWithdraw', {
|
||||
amount: roundUp(lnurlWithdrawParams?.minWithdrawable / 1000, 0),
|
||||
currency: CurrencyCode.SAT,
|
||||
}),
|
||||
@@ -414,8 +414,8 @@ export const TopupScreen = observer(function TopupScreen({ route }: Props) {
|
||||
|
||||
if (availableBalances.length === 0) {
|
||||
infoMessage(
|
||||
translate("topup.missingMintAddFirst"),
|
||||
translate("topup.missingMintAddFirstDesc"),
|
||||
translate("topup_missingMintAddFirst"),
|
||||
translate("topup_missingMintAddFirstDesc"),
|
||||
)
|
||||
return
|
||||
}
|
||||
@@ -496,7 +496,7 @@ export const TopupScreen = observer(function TopupScreen({ route }: Props) {
|
||||
const receiverPubkey = contactToSendTo?.pubkey
|
||||
|
||||
// redable message
|
||||
const message = translate('topup.nostrDMreceived', {
|
||||
const message = translate('topup_nostrDMreceived', {
|
||||
npub: walletProfileStore.npub,
|
||||
amount: amountToTopup,
|
||||
currency: getCurrency(unitRef.current).code
|
||||
@@ -543,7 +543,7 @@ export const TopupScreen = observer(function TopupScreen({ route }: Props) {
|
||||
})
|
||||
}
|
||||
} else {
|
||||
setInfo(translate('topup.relayMissingSentEvent'))
|
||||
setInfo(translate('topup_relayMissingSentEvent'))
|
||||
}
|
||||
} catch (e: any) {
|
||||
handleError(e)
|
||||
@@ -647,11 +647,11 @@ export const TopupScreen = observer(function TopupScreen({ route }: Props) {
|
||||
const getAmountTitle = function () {
|
||||
switch (paymentOption) {
|
||||
case ReceiveOption.SEND_PAYMENT_REQUEST:
|
||||
return translate("amount.requested")
|
||||
return translate("amountRequested")
|
||||
case ReceiveOption.LNURL_WITHDRAW:
|
||||
return translate("amount.withdraw")
|
||||
return translate("amountWithdraw")
|
||||
default:
|
||||
return translate("amount.topup")
|
||||
return translate("amountTopup")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -754,7 +754,7 @@ export const TopupScreen = observer(function TopupScreen({ route }: Props) {
|
||||
<Button
|
||||
preset="secondary"
|
||||
style={$memoButton}
|
||||
text="Done"
|
||||
tx="topupScreen_done"
|
||||
onPress={onMemoDone}
|
||||
disabled={
|
||||
transactionStatus === TransactionStatus.PENDING
|
||||
@@ -772,8 +772,8 @@ export const TopupScreen = observer(function TopupScreen({ route }: Props) {
|
||||
mintBalances={availableMintBalances}
|
||||
selectedMintBalance={mintBalanceToTopup as MintBalance}
|
||||
unit={unitRef.current}
|
||||
title={translate("topup.mint")}
|
||||
confirmTitle={translate("common.confirmCreateInvoice")}
|
||||
title={translate("topup_mint")}
|
||||
confirmTitle={translate("commonConfirmCreateInvoice")}
|
||||
onMintBalanceSelect={onMintBalanceSelect}
|
||||
onCancel={onMintBalanceCancel}
|
||||
onMintBalanceConfirm={onMintBalanceConfirm}
|
||||
@@ -785,7 +785,7 @@ export const TopupScreen = observer(function TopupScreen({ route }: Props) {
|
||||
<>
|
||||
<QRCodeBlock
|
||||
qrCodeData={invoiceToPay as string}
|
||||
title='Invoice to pay'
|
||||
titleTx='topupScreen_invoiceToPay'
|
||||
type='Bolt11Invoice'
|
||||
size={270}
|
||||
/>
|
||||
@@ -804,7 +804,7 @@ export const TopupScreen = observer(function TopupScreen({ route }: Props) {
|
||||
ContentComponent={
|
||||
<>
|
||||
<TranItem
|
||||
label="topup.to"
|
||||
label="topup_to"
|
||||
isFirst={true}
|
||||
value={
|
||||
mintsStore.findByUrl(transaction.mint)
|
||||
@@ -818,13 +818,13 @@ export const TopupScreen = observer(function TopupScreen({ route }: Props) {
|
||||
/>
|
||||
)}
|
||||
<TranItem
|
||||
label="transactionCommon.feePaid"
|
||||
label="transactionCommon_feePaid"
|
||||
value={transaction.fee || 0}
|
||||
unit={unitRef.current}
|
||||
isCurrency={true}
|
||||
/>
|
||||
<TranItem
|
||||
label="tranDetailScreen.status"
|
||||
label="tranDetailScreen_status"
|
||||
value={transaction.status as string}
|
||||
/>
|
||||
</>
|
||||
@@ -836,7 +836,7 @@ export const TopupScreen = observer(function TopupScreen({ route }: Props) {
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx='common.close'
|
||||
tx='commonClose'
|
||||
onPress={gotoWallet}
|
||||
/>
|
||||
</View>
|
||||
@@ -908,13 +908,13 @@ export const TopupScreen = observer(function TopupScreen({ route }: Props) {
|
||||
<ResultModalInfo
|
||||
icon="faCheckCircle"
|
||||
iconColor={colors.palette.success200}
|
||||
title={translate('common.success')}
|
||||
title={translate('commonSuccess')}
|
||||
message={resultModalInfo?.message}
|
||||
/>
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx='common.close'
|
||||
tx='commonClose'
|
||||
onPress={gotoWallet}
|
||||
/>
|
||||
</View>
|
||||
@@ -926,13 +926,13 @@ export const TopupScreen = observer(function TopupScreen({ route }: Props) {
|
||||
<ResultModalInfo
|
||||
icon="faTriangleExclamation"
|
||||
iconColor={colors.palette.angry500}
|
||||
title={resultModalInfo?.title || translate('topup.failed')}
|
||||
title={resultModalInfo?.title || translate('topup_failed')}
|
||||
message={resultModalInfo?.message}
|
||||
/>
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx='common.close'
|
||||
tx='commonClose'
|
||||
onPress={toggleResultModal}
|
||||
/>
|
||||
</View>
|
||||
@@ -964,7 +964,7 @@ const InvoiceOptionsBlock = observer(function (props: {
|
||||
<View style={$buttonContainer}>
|
||||
{props.contactToSendTo ? (
|
||||
<Button
|
||||
text={translate("topup.sendToNip", {
|
||||
text={translate("topup_sendToNip", {
|
||||
sendToNip05: props.contactToSendTo.nip05
|
||||
})}
|
||||
preset="secondary"
|
||||
@@ -980,7 +980,7 @@ const InvoiceOptionsBlock = observer(function (props: {
|
||||
/>
|
||||
) : (
|
||||
<Button
|
||||
tx="topup.sendToContact"
|
||||
tx="topup_sendToContact"
|
||||
preset="secondary"
|
||||
onPress={props.gotoContacts}
|
||||
style={{maxHeight: 50}}
|
||||
@@ -995,7 +995,7 @@ const InvoiceOptionsBlock = observer(function (props: {
|
||||
)}
|
||||
{props.paymentOption === ReceiveOption.LNURL_WITHDRAW && (
|
||||
<Button
|
||||
tx="topup.withdraw"
|
||||
tx="topup_withdraw"
|
||||
preset="secondary"
|
||||
onPress={props.toggleWithdrawModal}
|
||||
style={{marginLeft: spacing.medium}}
|
||||
@@ -1055,7 +1055,7 @@ const SendAsNostrDMBlock = observer(function (props: {
|
||||
) : (
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
tx="topup.sendRequest"
|
||||
tx="topup_sendRequest"
|
||||
onPress={props.sendAsNostrDM}
|
||||
style={{marginRight: spacing.medium}}
|
||||
LeftAccessory={() => (
|
||||
@@ -1069,7 +1069,7 @@ const SendAsNostrDMBlock = observer(function (props: {
|
||||
/>
|
||||
<Button
|
||||
preset="tertiary"
|
||||
tx="common.close"
|
||||
tx="commonClose"
|
||||
onPress={props.toggleNostrDMModal}
|
||||
/>
|
||||
</View>
|
||||
@@ -1095,13 +1095,13 @@ const NostrDMSuccessBlock = observer(function (props: {
|
||||
<ResultModalInfo
|
||||
icon="faCheckCircle"
|
||||
iconColor={colors.palette.success200}
|
||||
title={translate('common.success')}
|
||||
message={translate("walletScreen.paymentSentSuccess")}
|
||||
title={translate('commonSuccess')}
|
||||
message={translate("walletScreen_paymentSentSuccess")}
|
||||
/>
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx={'common.close'}
|
||||
tx={'commonClose'}
|
||||
onPress={props.onClose}
|
||||
/>
|
||||
</View>
|
||||
@@ -1227,8 +1227,8 @@ const LnurlWithdrawBlock = observer(function (props: {
|
||||
<ListItem
|
||||
leftIcon="faCheckCircle"
|
||||
leftIconColor={colors.palette.success200}
|
||||
tx="topup.withdrawalAvailable"
|
||||
subText={translate("topup.withdrawAvailableDesc", {
|
||||
tx="topup_withdrawalAvailable"
|
||||
subText={translate("topup_withdrawAvailableDesc", {
|
||||
amount: roundDown( props.lnurlWithdrawParams.maxWithdrawable / 1000, 0),
|
||||
code: CurrencyCode.SAT
|
||||
})}
|
||||
@@ -1237,11 +1237,11 @@ const LnurlWithdrawBlock = observer(function (props: {
|
||||
<ListItem
|
||||
leftIcon="faCheckCircle"
|
||||
leftIconColor={colors.palette.success200}
|
||||
text={translate("topup.invoiceCreatedParam", {
|
||||
text={translate("topup_invoiceCreatedParam", {
|
||||
amount: props.amountToTopup,
|
||||
code: CurrencyCode.SAT
|
||||
})}
|
||||
subText={translate("topup.invoiceCreatedDescParam", {
|
||||
subText={translate("topup_invoiceCreatedDescParam", {
|
||||
mintUrl: props.mintBalanceToTopup.mintUrl
|
||||
})}
|
||||
bottomSeparator={true}
|
||||
@@ -1253,7 +1253,7 @@ const LnurlWithdrawBlock = observer(function (props: {
|
||||
) : (
|
||||
<View style={[$buttonContainer, {marginTop: spacing.medium}]}>
|
||||
<Button
|
||||
tx="topup.withdraw"
|
||||
tx="topup_withdraw"
|
||||
onPress={props.onLnurlWithdraw}
|
||||
style={{marginRight: spacing.medium}}
|
||||
LeftAccessory={() => (
|
||||
@@ -1267,7 +1267,7 @@ const LnurlWithdrawBlock = observer(function (props: {
|
||||
/>
|
||||
<Button
|
||||
preset="tertiary"
|
||||
tx='common.cancel'
|
||||
tx='commonCancel'
|
||||
onPress={props.toggleWithdrawModal}
|
||||
/>
|
||||
</View>
|
||||
@@ -1288,13 +1288,13 @@ const LnurlWithdrawSuccessBlock = observer(function (props: {
|
||||
<ResultModalInfo
|
||||
icon="faCheckCircle"
|
||||
iconColor={colors.palette.success200}
|
||||
title={translate("common.success")}
|
||||
title={translate("commonSuccess")}
|
||||
message={`Withdrawal request has been received by ${props.lnurlWithdrawParams.domain}.`}
|
||||
/>
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx='common.close'
|
||||
tx='commonClose'
|
||||
onPress={props.onClose}
|
||||
/>
|
||||
</View>
|
||||
|
||||
+109
-109
@@ -156,7 +156,7 @@ export const TranDetailScreen = observer(function TranDetailScreen({ route }: Pr
|
||||
try {
|
||||
if(transaction) Clipboard.setString(JSON.stringify(getAuditTrail(transaction)))
|
||||
} catch (e: any) {
|
||||
setInfo(translate("common.copyFailParam", { param: e.message }))
|
||||
setInfo(translate("commonCopyFailParam", { param: e.message }))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ export const TranDetailScreen = observer(function TranDetailScreen({ route }: Pr
|
||||
try {
|
||||
if(transaction && transaction.inputToken) Clipboard.setString(transaction.inputToken)
|
||||
} catch (e: any) {
|
||||
setInfo(translate("common.copyFailParam", { param: e.message }))
|
||||
setInfo(translate("commonCopyFailParam", { param: e.message }))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ export const TranDetailScreen = observer(function TranDetailScreen({ route }: Pr
|
||||
try {
|
||||
if(transaction && transaction.outputToken) Clipboard.setString(transaction.outputToken)
|
||||
} catch (e: any) {
|
||||
setInfo(translate("common.copyFailParam", { param: e.message }))
|
||||
setInfo(translate("commonCopyFailParam", { param: e.message }))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -306,7 +306,7 @@ export const TranDetailScreen = observer(function TranDetailScreen({ route }: Pr
|
||||
<Button
|
||||
preset="secondary"
|
||||
style={$noteButton}
|
||||
tx="common.save"
|
||||
tx="commonSave"
|
||||
onPress={onNoteSave}
|
||||
|
||||
/>
|
||||
@@ -314,7 +314,7 @@ export const TranDetailScreen = observer(function TranDetailScreen({ route }: Pr
|
||||
<Button
|
||||
preset="secondary"
|
||||
style={$noteButton}
|
||||
tx="common.edit"
|
||||
tx="commonEdit"
|
||||
onPress={onNoteEdit}
|
||||
|
||||
/>
|
||||
@@ -368,17 +368,17 @@ export const TranDetailScreen = observer(function TranDetailScreen({ route }: Pr
|
||||
)}
|
||||
{isDataParsable && (
|
||||
<Card
|
||||
labelTx='tranDetailScreen.auditTrail'
|
||||
labelTx='tranDetailScreen_auditTrail'
|
||||
style={$dataCard}
|
||||
ContentComponent={
|
||||
<>
|
||||
<ListItem
|
||||
text='Detailed record of your transaction'
|
||||
tx='tranDetailScreen_auditTrailDesc'
|
||||
RightComponent={
|
||||
<View style={$rightContainer}>
|
||||
<Button
|
||||
onPress={toggleAuditTrail}
|
||||
text={isAuditTrailVisible ? translate("common.hide") : translate("common.show")}
|
||||
text={isAuditTrailVisible ? translate("commonHide") : translate("commonShow")}
|
||||
preset="secondary"
|
||||
/>
|
||||
</View>
|
||||
@@ -398,7 +398,7 @@ export const TranDetailScreen = observer(function TranDetailScreen({ route }: Pr
|
||||
<Button
|
||||
preset="tertiary"
|
||||
onPress={copyAuditTrail}
|
||||
tx="common.copy"
|
||||
tx="commonCopy"
|
||||
style={{
|
||||
minHeight: 50,
|
||||
paddingVertical: spacing.extraSmall,
|
||||
@@ -422,17 +422,17 @@ export const TranDetailScreen = observer(function TranDetailScreen({ route }: Pr
|
||||
].includes(transaction.status)
|
||||
) && (
|
||||
<Card
|
||||
label='Token tracking'
|
||||
labelTx='tranDetailScreen_tokenTracking'
|
||||
style={$dataCard}
|
||||
ContentComponent={
|
||||
<>
|
||||
<ListItem
|
||||
text='Logged ecash tokens for debugging purposes'
|
||||
tx='tranDetailScreen_tokenTrackingDesc'
|
||||
RightComponent={
|
||||
<View style={$rightContainer}>
|
||||
<Button
|
||||
onPress={toggleTokenTracking}
|
||||
text={isTokenTrackingVisible ? translate("common.hide") : translate("common.show")}
|
||||
text={isTokenTrackingVisible ? translate("commonHide") : translate("commonShow")}
|
||||
preset="secondary"
|
||||
/>
|
||||
</View>
|
||||
@@ -442,7 +442,7 @@ export const TranDetailScreen = observer(function TranDetailScreen({ route }: Pr
|
||||
<>
|
||||
{transaction.inputToken && (
|
||||
<ListItem
|
||||
text='Inputs'
|
||||
tx='tranDetailScreen_inputs'
|
||||
subText={transaction.inputToken}
|
||||
subTextEllipsizeMode='middle'
|
||||
subTextStyle={{fontFamily: typography.code?.normal}}
|
||||
@@ -450,7 +450,7 @@ export const TranDetailScreen = observer(function TranDetailScreen({ route }: Pr
|
||||
<View style={$rightContainer}>
|
||||
<Button
|
||||
onPress={copyInputToken}
|
||||
text={translate("common.copy")}
|
||||
text={translate("commonCopy")}
|
||||
preset="secondary"
|
||||
/>
|
||||
</View>
|
||||
@@ -459,7 +459,7 @@ export const TranDetailScreen = observer(function TranDetailScreen({ route }: Pr
|
||||
)}
|
||||
{transaction.outputToken && (
|
||||
<ListItem
|
||||
text='Outputs'
|
||||
tx='tranDetailScreen_outputs'
|
||||
subText={transaction.outputToken}
|
||||
subTextEllipsizeMode='middle'
|
||||
subTextStyle={{fontFamily: typography.code?.normal}}
|
||||
@@ -467,7 +467,7 @@ export const TranDetailScreen = observer(function TranDetailScreen({ route }: Pr
|
||||
<View style={$rightContainer}>
|
||||
<Button
|
||||
onPress={copyOutputToken}
|
||||
text={translate("common.copy")}
|
||||
text={translate("commonCopy")}
|
||||
preset="secondary"
|
||||
/>
|
||||
</View>
|
||||
@@ -637,7 +637,7 @@ const ReceiveInfoBlock = function (props: {
|
||||
|
||||
const transactionDataUpdate = {
|
||||
status: TransactionStatus.EXPIRED,
|
||||
message: translate("tranDetailScreen.successRetrieveEcashAfterRetry"),
|
||||
message: translate("tranDetailScreen_successRetrieveEcashAfterRetry"),
|
||||
createdAt: new Date(),
|
||||
}
|
||||
|
||||
@@ -734,7 +734,7 @@ const ReceiveInfoBlock = function (props: {
|
||||
ContentComponent={
|
||||
<>
|
||||
<TranItem
|
||||
label="tranDetailScreen.amount"
|
||||
label="tranDetailScreen_amount"
|
||||
value={transaction.amount}
|
||||
unit={transaction.unit}
|
||||
isCurrency={true}
|
||||
@@ -742,7 +742,7 @@ const ReceiveInfoBlock = function (props: {
|
||||
/>
|
||||
{transaction.memo && (
|
||||
<TranItem
|
||||
label="tranDetailScreen.memoFromSender"
|
||||
label="tranDetailScreen_memoFromSender"
|
||||
value={transaction.memo as string}
|
||||
/>
|
||||
)}
|
||||
@@ -753,7 +753,7 @@ const ReceiveInfoBlock = function (props: {
|
||||
style={{flexDirection: 'row', justifyContent: 'space-between'}}
|
||||
>
|
||||
<TranItem
|
||||
label="tranDetailScreen.sentFrom"
|
||||
label="tranDetailScreen_sentFrom"
|
||||
value={transaction.sentFrom}
|
||||
url={sentFromUrl}
|
||||
/>
|
||||
@@ -786,7 +786,7 @@ const ReceiveInfoBlock = function (props: {
|
||||
</View>
|
||||
) : (
|
||||
<TranItem
|
||||
label="tranDetailScreen.sentFrom"
|
||||
label="tranDetailScreen_sentFrom"
|
||||
value={transaction.sentFrom}
|
||||
url={sentFromUrl}
|
||||
/>
|
||||
@@ -796,17 +796,17 @@ const ReceiveInfoBlock = function (props: {
|
||||
)}
|
||||
{eventUrl && (
|
||||
<TranItem
|
||||
label="tranDetailScreen.eventUrl"
|
||||
label="tranDetailScreen_eventUrl"
|
||||
value={`${eventUrl.substring(0,30)}...`}
|
||||
url={eventUrl}
|
||||
/>
|
||||
)}
|
||||
<TranItem
|
||||
label="tranDetailScreen.type"
|
||||
label="tranDetailScreen_type"
|
||||
value={transaction.type as string}
|
||||
/>
|
||||
<TranItem
|
||||
label="tranDetailScreen.fee"
|
||||
label="tranDetailScreen_fee"
|
||||
value={transaction.fee}
|
||||
unit={transaction.unit}
|
||||
isCurrency={true}
|
||||
@@ -815,46 +815,46 @@ const ReceiveInfoBlock = function (props: {
|
||||
<View
|
||||
style={{flexDirection: 'row', justifyContent: 'space-between'}}>
|
||||
<TranItem
|
||||
label="tranDetailScreen.status"
|
||||
label="tranDetailScreen_status"
|
||||
value={transaction.status as string}
|
||||
/>
|
||||
<Button
|
||||
style={{marginTop: spacing.medium}}
|
||||
// preset="secondary"
|
||||
tx="tranDetailScreen.retryToReceive"
|
||||
tx="tranDetailScreen_retryToReceive"
|
||||
onPress={onRetryToReceive}
|
||||
/>
|
||||
</View>
|
||||
) : (
|
||||
<TranItem
|
||||
label="tranDetailScreen.status"
|
||||
label="tranDetailScreen_status"
|
||||
value={transaction.status as string}
|
||||
/>
|
||||
)}
|
||||
{transaction.status === TransactionStatus.COMPLETED && (
|
||||
<TranItem
|
||||
label="tranDetailScreen.balanceAfter"
|
||||
label="tranDetailScreen_balanceAfter"
|
||||
value={transaction.balanceAfter || 0}
|
||||
unit={transaction.unit}
|
||||
isCurrency={true}
|
||||
/>
|
||||
)}
|
||||
<TranItem
|
||||
label="tranDetailScreen.createdAt"
|
||||
label="tranDetailScreen_createdAt"
|
||||
value={(transaction.createdAt as Date).toLocaleString()}
|
||||
/>
|
||||
{transaction.paymentId && (
|
||||
<TranItem
|
||||
label="tranDetailScreen.paymentId"
|
||||
label="tranDetailScreen_paymentId"
|
||||
value={transaction.paymentId as string}
|
||||
/>
|
||||
)}
|
||||
<TranItem label="tranDetailScreen.id" value={`${transaction.id}`} />
|
||||
<TranItem label="tranDetailScreen_id" value={`${transaction.id}`} />
|
||||
</>
|
||||
}
|
||||
/>
|
||||
<Card
|
||||
labelTx='transactionCommon.receivedTo'
|
||||
labelTx='transactionCommon_receivedTo'
|
||||
style={$dataCard}
|
||||
ContentComponent={
|
||||
mint ? (
|
||||
@@ -877,13 +877,13 @@ const ReceiveInfoBlock = function (props: {
|
||||
<ResultModalInfo
|
||||
icon="faCheckCircle"
|
||||
iconColor={colors.palette.success200}
|
||||
title={translate("tranDetailScreen.modalSuccess")}
|
||||
title={translate("tranDetailScreen_modalSuccess")}
|
||||
message={resultModalInfo?.message}
|
||||
/>
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx={'common.close'}
|
||||
tx={'commonClose'}
|
||||
onPress={onGoBack}
|
||||
/>
|
||||
</View>
|
||||
@@ -895,13 +895,13 @@ const ReceiveInfoBlock = function (props: {
|
||||
<ResultModalInfo
|
||||
icon="faTriangleExclamation"
|
||||
iconColor={colors.palette.angry500}
|
||||
title={translate('transactionCommon.receiveFailed')}
|
||||
title={translate('transactionCommon_receiveFailed')}
|
||||
message={resultModalInfo?.message as string}
|
||||
/>
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx='common.close'
|
||||
tx='commonClose'
|
||||
onPress={toggleResultModal}
|
||||
/>
|
||||
</View>
|
||||
@@ -999,7 +999,7 @@ const ReceiveOfflineInfoBlock = function (props: {
|
||||
<View
|
||||
style={{flexDirection: 'row', justifyContent: 'space-between'}}>
|
||||
<TranItem
|
||||
label="tranDetailScreen.amount"
|
||||
label="tranDetailScreen_amount"
|
||||
value={transaction.amount}
|
||||
unit={transaction.unit}
|
||||
isCurrency={true}
|
||||
@@ -1009,72 +1009,72 @@ const ReceiveOfflineInfoBlock = function (props: {
|
||||
<Button
|
||||
style={{maxHeight: 10, marginTop: spacing.medium}}
|
||||
preset="default"
|
||||
tx="tranDetailScreen.receiveOfflineComplete"
|
||||
tx="tranDetailScreen_receiveOfflineComplete"
|
||||
onPress={receiveOfflineComplete}
|
||||
/>
|
||||
) : (
|
||||
<Button
|
||||
style={{maxHeight: 10, marginTop: spacing.medium}}
|
||||
preset="secondary"
|
||||
tx="tranDetailScreen.isOffline"
|
||||
tx="tranDetailScreen_isOffline"
|
||||
/>
|
||||
)}
|
||||
</View>
|
||||
) : (
|
||||
<TranItem
|
||||
label="tranDetailScreen.amount"
|
||||
label="tranDetailScreen_amount"
|
||||
value={transaction.amount}
|
||||
isFirst={true}
|
||||
/>
|
||||
)}
|
||||
<TranItem
|
||||
label="tranDetailScreen.memoFromSender"
|
||||
label="tranDetailScreen_memoFromSender"
|
||||
value={transaction.memo as string}
|
||||
/>
|
||||
{transaction.sentFrom && (
|
||||
<TranItem
|
||||
label="tranDetailScreen.sentFrom"
|
||||
label="tranDetailScreen_sentFrom"
|
||||
value={transaction.sentFrom}
|
||||
/>
|
||||
)}
|
||||
<TranItem
|
||||
label="tranDetailScreen.type"
|
||||
label="tranDetailScreen_type"
|
||||
value={transaction.type as string}
|
||||
/>
|
||||
<TranItem
|
||||
label="tranDetailScreen.fee"
|
||||
label="tranDetailScreen_fee"
|
||||
value={transaction.fee}
|
||||
unit={transaction.unit}
|
||||
isCurrency={true}
|
||||
/>
|
||||
<TranItem
|
||||
label="tranDetailScreen.status"
|
||||
label="tranDetailScreen_status"
|
||||
value={transaction.status as string}
|
||||
/>
|
||||
{transaction.status === TransactionStatus.COMPLETED && (
|
||||
<TranItem
|
||||
label="tranDetailScreen.balanceAfter"
|
||||
label="tranDetailScreen_balanceAfter"
|
||||
value={transaction.balanceAfter || 0}
|
||||
unit={transaction.unit}
|
||||
isCurrency={true}
|
||||
/>
|
||||
)}
|
||||
<TranItem
|
||||
label="tranDetailScreen.createdAt"
|
||||
label="tranDetailScreen_createdAt"
|
||||
value={(transaction.createdAt as Date).toLocaleString()}
|
||||
/>
|
||||
{transaction.paymentId && (
|
||||
<TranItem
|
||||
label="tranDetailScreen.paymentId"
|
||||
label="tranDetailScreen_paymentId"
|
||||
value={transaction.paymentId as string}
|
||||
/>
|
||||
)}
|
||||
<TranItem label="tranDetailScreen.id" value={`${transaction.id}`} />
|
||||
<TranItem label="tranDetailScreen_id" value={`${transaction.id}`} />
|
||||
</>
|
||||
}
|
||||
/>
|
||||
<Card
|
||||
labelTx='transactionCommon.receivedTo'
|
||||
labelTx='transactionCommon_receivedTo'
|
||||
style={$dataCard}
|
||||
ContentComponent={
|
||||
mint ? (
|
||||
@@ -1098,13 +1098,13 @@ const ReceiveOfflineInfoBlock = function (props: {
|
||||
<ResultModalInfo
|
||||
icon="faCheckCircle"
|
||||
iconColor={colors.palette.success200}
|
||||
title={translate('common.success')}
|
||||
title={translate('commonSuccess')}
|
||||
message={resultModalInfo?.message}
|
||||
/>
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx='common.close'
|
||||
tx='commonClose'
|
||||
onPress={onGoBack}
|
||||
/>
|
||||
</View>
|
||||
@@ -1116,13 +1116,13 @@ const ReceiveOfflineInfoBlock = function (props: {
|
||||
<ResultModalInfo
|
||||
icon="faTriangleExclamation"
|
||||
iconColor={colors.palette.angry500}
|
||||
title={translate('transactionCommon.receiveFailed')}
|
||||
title={translate('transactionCommon_receiveFailed')}
|
||||
message={resultModalInfo?.message as string}
|
||||
/>
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx='common.close'
|
||||
tx='commonClose'
|
||||
onPress={onGoBack}
|
||||
/>
|
||||
</View>
|
||||
@@ -1236,7 +1236,7 @@ const SendInfoBlock = function (props: {
|
||||
ContentComponent={
|
||||
<>
|
||||
<TranItem
|
||||
label="tranDetailScreen.amount"
|
||||
label="tranDetailScreen_amount"
|
||||
value={transaction.amount}
|
||||
unit={transaction.unit}
|
||||
isCurrency={true}
|
||||
@@ -1250,16 +1250,16 @@ const SendInfoBlock = function (props: {
|
||||
)}
|
||||
{transaction.sentTo && (
|
||||
<TranItem
|
||||
label="tranDetailScreen.sentTo"
|
||||
label="tranDetailScreen_sentTo"
|
||||
value={transaction.sentTo}
|
||||
/>
|
||||
)}
|
||||
<TranItem
|
||||
label="tranDetailScreen.type"
|
||||
label="tranDetailScreen_type"
|
||||
value={transaction.type as string}
|
||||
/>
|
||||
<TranItem
|
||||
label="tranDetailScreen.fee"
|
||||
label="tranDetailScreen_fee"
|
||||
value={transaction.fee}
|
||||
unit={transaction.unit}
|
||||
isCurrency={true}
|
||||
@@ -1268,40 +1268,40 @@ const SendInfoBlock = function (props: {
|
||||
<View
|
||||
style={{flexDirection: 'row', justifyContent: 'space-between'}}>
|
||||
<TranItem
|
||||
label="tranDetailScreen.status"
|
||||
label="tranDetailScreen_status"
|
||||
value={transaction.status as string}
|
||||
/>
|
||||
<Button
|
||||
style={{marginVertical: spacing.small}}
|
||||
preset="secondary"
|
||||
tx="tranDetailScreen.revert"
|
||||
tx="tranDetailScreen_revert"
|
||||
onPress={onRevertPendingSend}
|
||||
/>
|
||||
</View>
|
||||
) : (
|
||||
<TranItem
|
||||
label="tranDetailScreen.status"
|
||||
label="tranDetailScreen_status"
|
||||
value={transaction.status as string}
|
||||
/>
|
||||
)}
|
||||
{transaction.status !== TransactionStatus.ERROR && (
|
||||
<TranItem
|
||||
label="tranDetailScreen.balanceAfter"
|
||||
label="tranDetailScreen_balanceAfter"
|
||||
value={transaction.balanceAfter || 0}
|
||||
unit={transaction.unit}
|
||||
isCurrency={true}
|
||||
/>
|
||||
)}
|
||||
<TranItem
|
||||
label="tranDetailScreen.createdAt"
|
||||
label="tranDetailScreen_createdAt"
|
||||
value={(transaction.createdAt as Date).toLocaleString()}
|
||||
/>
|
||||
<TranItem label="tranDetailScreen.id" value={`${transaction.id}`} />
|
||||
<TranItem label="tranDetailScreen_id" value={`${transaction.id}`} />
|
||||
</>
|
||||
}
|
||||
/>
|
||||
<Card
|
||||
labelTx='tranDetailScreen.sentFrom'
|
||||
labelTx='tranDetailScreen_sentFrom'
|
||||
style={$dataCard}
|
||||
ContentComponent={
|
||||
mint ? (
|
||||
@@ -1330,7 +1330,7 @@ const SendInfoBlock = function (props: {
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx={'common.close'}
|
||||
tx={'commonClose'}
|
||||
onPress={toggleResultModal}
|
||||
/>
|
||||
</View>
|
||||
@@ -1347,7 +1347,7 @@ const SendInfoBlock = function (props: {
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx='common.close'
|
||||
tx='commonClose'
|
||||
onPress={toggleResultModal}
|
||||
/>
|
||||
</View>
|
||||
@@ -1472,7 +1472,7 @@ const TopupInfoBlock = function (props: {
|
||||
ContentComponent={
|
||||
<>
|
||||
<TranItem
|
||||
label="tranDetailScreen.amount"
|
||||
label="tranDetailScreen_amount"
|
||||
value={transaction.amount}
|
||||
unit={transaction.unit}
|
||||
isCurrency={true}
|
||||
@@ -1486,16 +1486,16 @@ const TopupInfoBlock = function (props: {
|
||||
)}
|
||||
{transaction.sentFrom && (
|
||||
<TranItem
|
||||
label="tranDetailScreen.sentFrom"
|
||||
label="tranDetailScreen_sentFrom"
|
||||
value={transaction.sentFrom}
|
||||
/>
|
||||
)}
|
||||
<TranItem
|
||||
label="tranDetailScreen.type"
|
||||
label="tranDetailScreen_type"
|
||||
value={transaction.type as string}
|
||||
/>
|
||||
<TranItem
|
||||
label="tranDetailScreen.fee"
|
||||
label="tranDetailScreen_fee"
|
||||
value={transaction.fee}
|
||||
unit={transaction.unit}
|
||||
isCurrency={true}
|
||||
@@ -1504,47 +1504,47 @@ const TopupInfoBlock = function (props: {
|
||||
<View
|
||||
style={{flexDirection: 'row', justifyContent: 'space-between'}}>
|
||||
<TranItem
|
||||
label="tranDetailScreen.status"
|
||||
label="tranDetailScreen_status"
|
||||
value={transaction.status as string}
|
||||
/>
|
||||
<Button
|
||||
style={{marginTop: spacing.medium}}
|
||||
preset="secondary"
|
||||
tx="tranDetailScreen.retryToComplete"
|
||||
tx="tranDetailScreen_retryToComplete"
|
||||
onPress={onRetryToHandlePendingTopup}
|
||||
/>
|
||||
</View>
|
||||
) : (
|
||||
<TranItem
|
||||
label="tranDetailScreen.status"
|
||||
label="tranDetailScreen_status"
|
||||
value={transaction.status as string}
|
||||
/>
|
||||
)}
|
||||
{transaction.status === TransactionStatus.COMPLETED && (
|
||||
<TranItem
|
||||
label="tranDetailScreen.balanceAfter"
|
||||
label="tranDetailScreen_balanceAfter"
|
||||
value={transaction.balanceAfter || 0}
|
||||
unit={transaction.unit}
|
||||
isCurrency={true}
|
||||
/>
|
||||
)}
|
||||
<TranItem
|
||||
label="tranDetailScreen.createdAt"
|
||||
label="tranDetailScreen_createdAt"
|
||||
value={(transaction.createdAt as Date).toLocaleString()}
|
||||
/>
|
||||
{transaction.expiresAt && transaction.status !== TransactionStatus.COMPLETED && (
|
||||
<TranItem
|
||||
label="tranDetailScreen.expiresAt"
|
||||
label="tranDetailScreen_expiresAt"
|
||||
value={(new Date(transaction.expiresAt!)).toLocaleString()}
|
||||
/>
|
||||
)}
|
||||
{transaction.paymentId && (
|
||||
<TranItem
|
||||
label="tranDetailScreen.paymentId"
|
||||
label="tranDetailScreen_paymentId"
|
||||
value={transaction.paymentId as string}
|
||||
/>
|
||||
)}
|
||||
<TranItem label="tranDetailScreen.id" value={`${transaction.id}`} />
|
||||
<TranItem label="tranDetailScreen_id" value={`${transaction.id}`} />
|
||||
</>
|
||||
}
|
||||
/>
|
||||
@@ -1552,14 +1552,14 @@ const TopupInfoBlock = function (props: {
|
||||
<View style={{marginBottom: spacing.small}}>
|
||||
<QRCodeBlock
|
||||
qrCodeData={transaction.paymentRequest}
|
||||
title={translate("tranDetailScreen.invoice")}
|
||||
title={translate("tranDetailScreen_invoice")}
|
||||
type='Bolt11Invoice'
|
||||
size={spacing.screenWidth * 0.8}
|
||||
/>
|
||||
</View>
|
||||
)}
|
||||
<Card
|
||||
labelTx='tranDetailScreen.topupTo'
|
||||
labelTx='tranDetailScreen_topupTo'
|
||||
style={$dataCard}
|
||||
ContentComponent={
|
||||
mint ? (
|
||||
@@ -1582,13 +1582,13 @@ const TopupInfoBlock = function (props: {
|
||||
<ResultModalInfo
|
||||
icon="faCheckCircle"
|
||||
iconColor={colors.palette.success200}
|
||||
title={translate("tranDetailScreen.modalSuccess")}
|
||||
title={translate("tranDetailScreen_modalSuccess")}
|
||||
message={resultModalInfo?.message}
|
||||
/>
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx='common.close'
|
||||
tx='commonClose'
|
||||
onPress={onGoBack}
|
||||
/>
|
||||
</View>
|
||||
@@ -1599,13 +1599,13 @@ const TopupInfoBlock = function (props: {
|
||||
<ResultModalInfo
|
||||
icon="faTriangleExclamation"
|
||||
iconColor={colors.palette.accent400}
|
||||
title={translate("tranDetailScreen.invoiceNotPaid")}
|
||||
title={translate("tranDetailScreen_invoiceNotPaid")}
|
||||
message={resultModalInfo?.message}
|
||||
/>
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx={'common.close'}
|
||||
tx={'commonClose'}
|
||||
onPress={toggleResultModal}
|
||||
/>
|
||||
</View>
|
||||
@@ -1616,13 +1616,13 @@ const TopupInfoBlock = function (props: {
|
||||
<ResultModalInfo
|
||||
icon="faTriangleExclamation"
|
||||
iconColor={colors.palette.accent400}
|
||||
title={translate("tranDetailScreen.invoiceExpired")}
|
||||
title={translate("tranDetailScreen_invoiceExpired")}
|
||||
message={resultModalInfo?.message}
|
||||
/>
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx='common.close'
|
||||
tx='commonClose'
|
||||
onPress={toggleResultModal}
|
||||
/>
|
||||
</View>
|
||||
@@ -1633,13 +1633,13 @@ const TopupInfoBlock = function (props: {
|
||||
<ResultModalInfo
|
||||
icon="faTriangleExclamation"
|
||||
iconColor={colors.palette.angry500}
|
||||
title={translate("tranDetailScreen.topupError")}
|
||||
title={translate("tranDetailScreen_topupError")}
|
||||
message={resultModalInfo?.message}
|
||||
/>
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx='common.close'
|
||||
tx='commonClose'
|
||||
onPress={toggleResultModal}
|
||||
/>
|
||||
</View>
|
||||
@@ -1760,7 +1760,7 @@ const TransferInfoBlock = function (props: {
|
||||
style={{flexDirection: 'row', justifyContent: 'space-between'}}
|
||||
>
|
||||
<TranItem
|
||||
label="tranDetailScreen.amount"
|
||||
label="tranDetailScreen_amount"
|
||||
value={transaction.amount}
|
||||
unit={transaction.unit}
|
||||
isCurrency={true}
|
||||
@@ -1768,13 +1768,13 @@ const TransferInfoBlock = function (props: {
|
||||
/>
|
||||
<Button
|
||||
style={{marginTop: spacing.medium}}
|
||||
tx="transactionCommon.payNow"
|
||||
tx="transactionCommon_payNow"
|
||||
onPress={onPayDraftTransfer}
|
||||
/>
|
||||
</View>
|
||||
):(
|
||||
<TranItem
|
||||
label="tranDetailScreen.amount"
|
||||
label="tranDetailScreen_amount"
|
||||
value={transaction.amount}
|
||||
unit={transaction.unit}
|
||||
isCurrency={true}
|
||||
@@ -1783,23 +1783,23 @@ const TransferInfoBlock = function (props: {
|
||||
)}
|
||||
{transaction.memo && (
|
||||
<TranItem
|
||||
label="tranDetailScreen.memoFromInvoice"
|
||||
label="tranDetailScreen_memoFromInvoice"
|
||||
value={transaction.memo as string}
|
||||
/>
|
||||
)}
|
||||
{transaction.sentTo && (
|
||||
<TranItem
|
||||
label="tranDetailScreen.sentTo"
|
||||
label="tranDetailScreen_sentTo"
|
||||
value={transaction.sentTo}
|
||||
/>
|
||||
)}
|
||||
<TranItem
|
||||
label="tranDetailScreen.type"
|
||||
label="tranDetailScreen_type"
|
||||
value={transaction.type as string}
|
||||
/>
|
||||
{transaction.status === TransactionStatus.COMPLETED && (
|
||||
<TranItem
|
||||
label="tranDetailScreen.fee"
|
||||
label="tranDetailScreen_fee"
|
||||
value={transaction.fee}
|
||||
unit={transaction.unit}
|
||||
isCurrency={true}
|
||||
@@ -1810,52 +1810,52 @@ const TransferInfoBlock = function (props: {
|
||||
style={{flexDirection: 'row', justifyContent: 'space-between'}}
|
||||
>
|
||||
<TranItem
|
||||
label="tranDetailScreen.status"
|
||||
label="tranDetailScreen_status"
|
||||
value={transaction.status as string}
|
||||
/>
|
||||
<Button
|
||||
style={{marginTop: spacing.medium}}
|
||||
preset="secondary"
|
||||
text="Revert"
|
||||
tx="tranDetailScreen_revert"
|
||||
onPress={onRevertPreparedTransfer}
|
||||
/>
|
||||
</View>
|
||||
):(
|
||||
<TranItem
|
||||
label="tranDetailScreen.status"
|
||||
label="tranDetailScreen_status"
|
||||
value={transaction.status as string}
|
||||
/>
|
||||
)}
|
||||
{transaction.status === TransactionStatus.COMPLETED && (
|
||||
<TranItem
|
||||
label="tranDetailScreen.balanceAfter"
|
||||
label="tranDetailScreen_balanceAfter"
|
||||
value={transaction.balanceAfter || 0}
|
||||
unit={transaction.unit}
|
||||
isCurrency={true}
|
||||
/>
|
||||
)}
|
||||
<TranItem
|
||||
label="tranDetailScreen.createdAt"
|
||||
label="tranDetailScreen_createdAt"
|
||||
value={(transaction.createdAt as Date).toLocaleString()}
|
||||
/>
|
||||
{transaction.expiresAt && transaction.status !== TransactionStatus.COMPLETED && (
|
||||
<TranItem
|
||||
label="tranDetailScreen.expiresAt"
|
||||
label="tranDetailScreen_expiresAt"
|
||||
value={(new Date(transaction.expiresAt!)).toLocaleString()}
|
||||
/>
|
||||
)}
|
||||
{transaction.paymentId && (
|
||||
<TranItem
|
||||
label="tranDetailScreen.paymentId"
|
||||
label="tranDetailScreen_paymentId"
|
||||
value={transaction.paymentId as string}
|
||||
/>
|
||||
)}
|
||||
<TranItem label="tranDetailScreen.id" value={`${transaction.id}`} />
|
||||
<TranItem label="tranDetailScreen_id" value={`${transaction.id}`} />
|
||||
</>
|
||||
}
|
||||
/>
|
||||
<Card
|
||||
labelTx='transactionCommon.paidFrom'
|
||||
labelTx='transactionCommon_paidFrom'
|
||||
style={$dataCard}
|
||||
ContentComponent={
|
||||
mint ? (
|
||||
@@ -1871,7 +1871,7 @@ const TransferInfoBlock = function (props: {
|
||||
/>
|
||||
{transaction.proof && (
|
||||
<Card
|
||||
labelTx='tranDetailScreen.proof'
|
||||
labelTx='tranDetailScreen_proof'
|
||||
style={$dataCard}
|
||||
ContentComponent={
|
||||
<ListItem
|
||||
@@ -1881,7 +1881,7 @@ const TransferInfoBlock = function (props: {
|
||||
<View style={$rightContainer}>
|
||||
<Button
|
||||
onPress={copyProof}
|
||||
text={translate("common.copy")}
|
||||
text={translate("commonCopy")}
|
||||
preset="secondary"
|
||||
/>
|
||||
</View>
|
||||
@@ -1905,7 +1905,7 @@ const TransferInfoBlock = function (props: {
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx={'common.close'}
|
||||
tx={'commonClose'}
|
||||
onPress={toggleResultModal}
|
||||
/>
|
||||
</View>
|
||||
@@ -1922,7 +1922,7 @@ const TransferInfoBlock = function (props: {
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx='common.close'
|
||||
tx='commonClose'
|
||||
onPress={toggleResultModal}
|
||||
/>
|
||||
</View>
|
||||
|
||||
@@ -245,7 +245,7 @@ export const TranHistoryScreen = observer(function TranHistoryScreen({ route }:
|
||||
return (
|
||||
<Screen contentContainerStyle={$screen}>
|
||||
<Animated.View style={[animatedHeader, $headerContainer, {backgroundColor: headerBg}]}>
|
||||
<Text preset="heading" text="History" style={{color: headerTitle}} />
|
||||
<Text preset="heading" tx="tranHistoryScreen_title" style={{color: headerTitle}} />
|
||||
</Animated.View>
|
||||
|
||||
<View style={$contentContainer}>
|
||||
@@ -255,11 +255,11 @@ export const TranHistoryScreen = observer(function TranHistoryScreen({ route }:
|
||||
<>
|
||||
<ListItem
|
||||
text={showPendingOnly
|
||||
? translate("tranHistory.showingPaginationPending", {
|
||||
? translate("tranHistory_showingPaginationPending", {
|
||||
amount: transactionsStore.pendingHistoryCount,
|
||||
total: pendingDbCount
|
||||
})
|
||||
: translate("tranHistory.showingPaginationTotal", {
|
||||
: translate("tranHistory_showingPaginationTotal", {
|
||||
amount: transactionsStore.historyCount,
|
||||
total: totalDbCount
|
||||
})
|
||||
@@ -277,7 +277,7 @@ export const TranHistoryScreen = observer(function TranHistoryScreen({ route }:
|
||||
onPress={() => false}
|
||||
/>
|
||||
<ListItem
|
||||
text={translate("tranHistory.pendingParam", {
|
||||
text={translate("tranHistory_pendingParam", {
|
||||
param: pendingDbCount
|
||||
})}
|
||||
LeftComponent={
|
||||
@@ -323,12 +323,12 @@ export const TranHistoryScreen = observer(function TranHistoryScreen({ route }:
|
||||
{sections.length > 0 && (
|
||||
<View style={{alignItems: 'center'}}>
|
||||
{!showPendingOnly && isAll || showPendingOnly && pendingIsAll ? (
|
||||
<Text tx="tranHistory.listIsComplete" size="xs" />
|
||||
<Text tx="tranHistory_listIsComplete" size="xs" />
|
||||
) : (
|
||||
<Button
|
||||
preset="secondary"
|
||||
onPress={addTransactionsToList}
|
||||
tx="tranHistory.viewMore"
|
||||
tx="tranHistory_viewMore"
|
||||
style={{minHeight: 25, paddingVertical: spacing.tiny}}
|
||||
textStyle={{fontSize: 14}}
|
||||
/>
|
||||
@@ -346,7 +346,7 @@ export const TranHistoryScreen = observer(function TranHistoryScreen({ route }:
|
||||
ContentComponent={
|
||||
<ListItem
|
||||
leftIcon='faBan'
|
||||
tx={"tranHistory.noTransToShow"}
|
||||
tx={"tranHistory_noTransToShow"}
|
||||
/>
|
||||
}
|
||||
style={$card}
|
||||
@@ -362,8 +362,8 @@ export const TranHistoryScreen = observer(function TranHistoryScreen({ route }:
|
||||
ContentComponent={
|
||||
<>
|
||||
<ListItem
|
||||
tx="tranHistory.deleteExpired"
|
||||
subText={translate("tranHistory.deleteExpiredDesc", {
|
||||
tx="tranHistory_deleteExpired"
|
||||
subText={translate("tranHistory_deleteExpiredDesc", {
|
||||
count: expiredDbCount
|
||||
})}
|
||||
leftIcon='faRotate'
|
||||
@@ -371,8 +371,8 @@ export const TranHistoryScreen = observer(function TranHistoryScreen({ route }:
|
||||
bottomSeparator={true}
|
||||
/>
|
||||
<ListItem
|
||||
tx="tranHistory.deleteErrored"
|
||||
subText={translate("tranHistory.deleteErroredDesc", {
|
||||
tx="tranHistory_deleteErrored"
|
||||
subText={translate("tranHistory_deleteErroredDesc", {
|
||||
count: erroredDbCount
|
||||
})}
|
||||
leftIcon='faBug'
|
||||
@@ -380,8 +380,8 @@ export const TranHistoryScreen = observer(function TranHistoryScreen({ route }:
|
||||
bottomSeparator={true}
|
||||
/>
|
||||
<ListItem
|
||||
tx="tranHistory.deleteReverted"
|
||||
subText={translate("tranHistory.deleteRevertedDesc", {
|
||||
tx="tranHistory_deleteReverted"
|
||||
subText={translate("tranHistory_deleteRevertedDesc", {
|
||||
count: revertedDbCount
|
||||
})}
|
||||
leftIcon='faBan'
|
||||
|
||||
@@ -57,49 +57,49 @@ export const TransactionListItem = observer(function (props: TransactionListProp
|
||||
case TransactionType.RECEIVE:
|
||||
if (tx.sentFrom) {
|
||||
if (!tx.memo || tx.memo.includes('Sent from Minibits')) {
|
||||
return translate('transactionCommon.from', {sender: getProfileName(tx.sentFrom)})
|
||||
return translate('transactionCommon_from', {sender: getProfileName(tx.sentFrom)})
|
||||
}
|
||||
} else {
|
||||
return tx.memo ? tx.memo : translate('transactionCommon.youReceived')
|
||||
return tx.memo ? tx.memo : translate('transactionCommon_youReceived')
|
||||
}
|
||||
case TransactionType.RECEIVE_BY_PAYMENT_REQUEST:
|
||||
if (tx.sentFrom) {
|
||||
if (!tx.memo || tx.memo.includes('Sent from Minibits')) {
|
||||
return translate('transactionCommon.from', {sender: getProfileName(tx.sentFrom)})
|
||||
return translate('transactionCommon_from', {sender: getProfileName(tx.sentFrom)})
|
||||
}
|
||||
} else {
|
||||
return tx.memo ? tx.memo : translate('transactionCommon.youReceived')
|
||||
return tx.memo ? tx.memo : translate('transactionCommon_youReceived')
|
||||
}
|
||||
case TransactionType.RECEIVE_OFFLINE:
|
||||
if (tx.sentFrom) {
|
||||
if (!tx.memo || tx.memo.includes('Sent from Minibits')) {
|
||||
return translate('transactionCommon.from', {sender: getProfileName(tx.sentFrom)})
|
||||
return translate('transactionCommon_from', {sender: getProfileName(tx.sentFrom)})
|
||||
}
|
||||
} else {
|
||||
return tx.memo ? tx.memo : translate('transactionCommon.youReceived')
|
||||
return tx.memo ? tx.memo : translate('transactionCommon_youReceived')
|
||||
}
|
||||
case TransactionType.SEND:
|
||||
return (tx.memo
|
||||
? tx.memo
|
||||
: tx.sentTo
|
||||
? translate('transactionCommon.sentTo', {receiver: getProfileName(tx.sentTo)})
|
||||
: translate('transactionCommon.youSent'))
|
||||
? translate('transactionCommon_sentTo', {receiver: getProfileName(tx.sentTo)})
|
||||
: translate('transactionCommon_youSent'))
|
||||
case TransactionType.TOPUP:
|
||||
return (tx.memo
|
||||
? tx.memo
|
||||
: tx.sentFrom
|
||||
? translate('transactionCommon.receivedFrom', {sender: getProfileName(tx.sentFrom)})
|
||||
: translate('transactionCommon.youReceived'))
|
||||
? translate('transactionCommon_receivedFrom', {sender: getProfileName(tx.sentFrom)})
|
||||
: translate('transactionCommon_youReceived'))
|
||||
case TransactionType.TRANSFER:
|
||||
return (tx.memo && tx.memo !== 'LNbits'
|
||||
? tx.memo
|
||||
: tx.sentTo
|
||||
? tx.status === TransactionStatus.COMPLETED ?
|
||||
translate('transactionCommon.paidTo', {receiver: getProfileName(tx.sentTo)})
|
||||
: translate('transactionCommon.payTo', {receiver: getProfileName(tx.sentTo)})
|
||||
: translate('transactionCommon.youPaid'))
|
||||
translate('transactionCommon_paidTo', {receiver: getProfileName(tx.sentTo)})
|
||||
: translate('transactionCommon_payTo', {receiver: getProfileName(tx.sentTo)})
|
||||
: translate('transactionCommon_youPaid'))
|
||||
default:
|
||||
return translate('transactionCommon.unknown')
|
||||
return translate('transactionCommon_unknown')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,40 +114,40 @@ export const TransactionListItem = observer(function (props: TransactionListProp
|
||||
case TransactionStatus.COMPLETED:
|
||||
if(tx.fee && tx.fee > 0) {
|
||||
if(isTimeAgoVisible) {
|
||||
return timeAgo + 'Fee ' + tx.fee
|
||||
return timeAgo + translate('transactionCommon_fee') + ' ' + tx.fee
|
||||
} else {
|
||||
return 'Fee ' + tx.fee
|
||||
return translate('transactionCommon_fee') + ' ' + tx.fee
|
||||
}
|
||||
|
||||
} else {
|
||||
if(isTimeAgoVisible) {
|
||||
return distance
|
||||
} else {
|
||||
return translate('transactionCommon.status.completed')
|
||||
return translate('transactionCommon_status_completed')
|
||||
}
|
||||
}
|
||||
case TransactionStatus.RECOVERED:
|
||||
return timeAgo + translate('transactionCommon.status.recovered')
|
||||
return timeAgo + translate('transactionCommon_status_recovered')
|
||||
case TransactionStatus.DRAFT:
|
||||
return timeAgo + translate('transactionCommon.status.draft')
|
||||
return timeAgo + translate('transactionCommon_status_draft')
|
||||
case TransactionStatus.ERROR:
|
||||
return timeAgo + translate('transactionCommon.status.error')
|
||||
return timeAgo + translate('transactionCommon_status_error')
|
||||
case TransactionStatus.PENDING:
|
||||
return timeAgo + translate('transactionCommon.status.pending')
|
||||
return timeAgo + translate('transactionCommon_status_pending')
|
||||
case TransactionStatus.PREPARED:
|
||||
return timeAgo + translate('transactionCommon.status.prepared')
|
||||
return timeAgo + translate('transactionCommon_status_prepared')
|
||||
case TransactionStatus.PREPARED_OFFLINE:
|
||||
if (isInternetReachable) {
|
||||
return timeAgo + translate('transactionCommon.tapToRedeem')
|
||||
return timeAgo + translate('transactionCommon_tapToRedeem')
|
||||
} else {
|
||||
return timeAgo + translate('transactionCommon.redeemOnline')
|
||||
return timeAgo + translate('transactionCommon_redeemOnline')
|
||||
}
|
||||
case TransactionStatus.REVERTED:
|
||||
return timeAgo + translate('transactionCommon.status.reverted')
|
||||
return timeAgo + translate('transactionCommon_status_reverted')
|
||||
case TransactionStatus.BLOCKED:
|
||||
return timeAgo + translate('transactionCommon.status.blocked')
|
||||
return timeAgo + translate('transactionCommon_status_blocked')
|
||||
case TransactionStatus.EXPIRED:
|
||||
return timeAgo + translate('transactionCommon.status.expired')
|
||||
return timeAgo + translate('transactionCommon_status_expired')
|
||||
default:
|
||||
return timeAgo
|
||||
}
|
||||
|
||||
@@ -330,7 +330,7 @@ useEffect(() => {
|
||||
let availableBalances = proofsStore.getMintBalancesWithEnoughBalance(totalAmount, unitRef.current)
|
||||
|
||||
if (availableBalances.length === 0) {
|
||||
setInfo(translate("transferScreen.insufficientFunds", {
|
||||
setInfo(translate("transferScreen_insufficientFunds", {
|
||||
currency: getCurrency(unitRef.current).code,
|
||||
amount: amountToTransfer
|
||||
}))
|
||||
@@ -404,7 +404,7 @@ useEffect(() => {
|
||||
} else {
|
||||
setResultModalInfo({
|
||||
status,
|
||||
title: error.params?.message ? error.message : translate('payCommon.failed'),
|
||||
title: error.params?.message ? error.message : translate('payCommon_failed'),
|
||||
message: error.params?.message || error.message,
|
||||
})
|
||||
}
|
||||
@@ -416,7 +416,7 @@ useEffect(() => {
|
||||
|
||||
setResultModalInfo({
|
||||
status,
|
||||
message: `Donation for ${donationForName} has been successfully paid and your wallet address has been updated. Thank you!`,
|
||||
message: translate('transferScreen_donationSuccessMessage', {donationForName}),
|
||||
})
|
||||
|
||||
} else {
|
||||
@@ -507,7 +507,7 @@ const onRequestLnurlInvoice = async function () {
|
||||
const amountUnit = round(toNumber(amountToTransfer) * precision, 0)
|
||||
|
||||
if (!amountUnit || amountUnit === 0) {
|
||||
setInfo(translate('payCommon.amountZeroOrNegative'))
|
||||
setInfo(translate('payCommon_amountZeroOrNegative'))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -527,7 +527,7 @@ const onRequestLnurlInvoice = async function () {
|
||||
}
|
||||
|
||||
if (lnurlPayParams.minSendable && amountSats < lnurlPayParams.minSendable / 1000) {
|
||||
setInfo(translate('payCommon.minimumPay', {
|
||||
setInfo(translate('payCommon_minimumPay', {
|
||||
amount: roundUp(lnurlPayParams.minSendable / 1000, 0),
|
||||
currency: CurrencyCode.SAT
|
||||
}))
|
||||
@@ -535,7 +535,7 @@ const onRequestLnurlInvoice = async function () {
|
||||
}
|
||||
|
||||
if (lnurlPayParams.maxSendable && amountSats > lnurlPayParams.maxSendable / 1000) {
|
||||
setInfo(translate("payCommon.maximumPay", {
|
||||
setInfo(translate("payCommon_maximumPay", {
|
||||
amount: roundDown(lnurlPayParams.maxSendable / 1000, 0),
|
||||
currency: CurrencyCode.SAT
|
||||
}))
|
||||
@@ -543,7 +543,7 @@ const onRequestLnurlInvoice = async function () {
|
||||
}
|
||||
|
||||
if (lnurlPayParams.payerData) {
|
||||
setInfo(translate("transferScreen.LUD18unsupported"))
|
||||
setInfo(translate("transferScreen_LUD18unsupported"))
|
||||
}
|
||||
|
||||
setIsLoading(true)
|
||||
@@ -594,11 +594,11 @@ const onEncodedInvoice = async function (encoded: string) {
|
||||
const expiresAt = addSeconds(new Date(timestamp as number * 1000), expiry as number)
|
||||
|
||||
if (!amount || amount === 0) {
|
||||
setInfo(translate('payCommon.amountZeroOrNegative'))
|
||||
setInfo(translate('payCommon_amountZeroOrNegative'))
|
||||
return;
|
||||
}
|
||||
|
||||
if(!isInternetReachable) setInfo(translate('common.offlinePretty'));
|
||||
if(!isInternetReachable) setInfo(translate('commonOfflinePretty'));
|
||||
|
||||
setIsAmountEditable(false)
|
||||
setEncodedInvoice(encoded)
|
||||
@@ -622,7 +622,7 @@ const onEncodedInvoice = async function (encoded: string) {
|
||||
|
||||
if (!balanceToTransferFrom) {
|
||||
log.warn('Not enough balance')
|
||||
setInfo(translate("transferScreen.noMintWithBalance", { unit: unitRef.current }))
|
||||
setInfo(translate("transferScreen_noMintWithBalance", { unit: unitRef.current }))
|
||||
setIsNotEnoughFunds(true)
|
||||
return
|
||||
}
|
||||
@@ -643,7 +643,7 @@ const transfer = async function () {
|
||||
}
|
||||
|
||||
if (!mintBalanceToTransferFrom) {
|
||||
setInfo(translate("transferScreen.selectMintFrom"))
|
||||
setInfo(translate("transferScreen_selectMintFrom"))
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -778,7 +778,7 @@ const amountInputColor = useThemeColor('amountInput')
|
||||
)}
|
||||
<Text
|
||||
size="xs"
|
||||
tx="payCommon.amountToPayLabel"
|
||||
tx="payCommon_amountToPayLabel"
|
||||
style={{
|
||||
color: amountInputColor,
|
||||
textAlign: 'center',
|
||||
@@ -800,7 +800,7 @@ const amountInputColor = useThemeColor('amountInput')
|
||||
lnurlPayParams?.address ||
|
||||
memo ||
|
||||
lnurlPayParams?.domain ||
|
||||
translate('common.noDescPlaceholder')
|
||||
translate('commonNoDescPlaceholder')
|
||||
}
|
||||
subText={lnurlDescription}
|
||||
LeftComponent={
|
||||
@@ -846,7 +846,7 @@ const amountInputColor = useThemeColor('amountInput')
|
||||
<View style={$bottomContainer}>
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
tx="transferScreen.requestInvoice"
|
||||
tx="transferScreen_requestInvoice"
|
||||
onPress={onRequestLnurlInvoice}
|
||||
/>
|
||||
</View>
|
||||
@@ -856,7 +856,7 @@ const amountInputColor = useThemeColor('amountInput')
|
||||
<View style={$bottomContainer}>
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
tx="common.close"
|
||||
tx="commonClose"
|
||||
onPress={gotoWallet}
|
||||
preset="secondary"
|
||||
/>
|
||||
@@ -869,8 +869,8 @@ const amountInputColor = useThemeColor('amountInput')
|
||||
mintBalances={availableMintBalances}
|
||||
selectedMintBalance={mintBalanceToTransferFrom}
|
||||
unit={unitRef.current}
|
||||
title={translate('payCommon.payFrom')}
|
||||
confirmTitle={translate('payCommon.payNow')}
|
||||
title={translate('payCommon_payFrom')}
|
||||
confirmTitle={translate('payCommon_payNow')}
|
||||
onMintBalanceSelect={onMintBalanceSelect}
|
||||
onCancel={gotoWallet}
|
||||
onMintBalanceConfirm={transfer}
|
||||
@@ -882,7 +882,7 @@ const amountInputColor = useThemeColor('amountInput')
|
||||
ContentComponent={
|
||||
<>
|
||||
<TranItem
|
||||
label="tranDetailScreen.trasferredTo"
|
||||
label="tranDetailScreen_trasferredTo"
|
||||
isFirst={true}
|
||||
value={
|
||||
mintsStore.findByUrl(transaction.mint)
|
||||
@@ -891,18 +891,18 @@ const amountInputColor = useThemeColor('amountInput')
|
||||
/>
|
||||
{transaction?.memo && (
|
||||
<TranItem
|
||||
label="tranDetailScreen.memoFromInvoice"
|
||||
label="tranDetailScreen_memoFromInvoice"
|
||||
value={transaction.memo as string}
|
||||
/>
|
||||
)}
|
||||
<TranItem
|
||||
label="transactionCommon.feePaid"
|
||||
label="transactionCommon_feePaid"
|
||||
value={transaction.fee || 0}
|
||||
unit={unitRef.current}
|
||||
isCurrency={true}
|
||||
/>
|
||||
<TranItem
|
||||
label="tranDetailScreen.status"
|
||||
label="tranDetailScreen_status"
|
||||
value={transaction.status as string}
|
||||
/>
|
||||
</>
|
||||
@@ -914,7 +914,7 @@ const amountInputColor = useThemeColor('amountInput')
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx={'common.close'}
|
||||
tx={'commonClose'}
|
||||
onPress={gotoWallet}
|
||||
/>
|
||||
</View>
|
||||
@@ -931,13 +931,13 @@ const amountInputColor = useThemeColor('amountInput')
|
||||
<ResultModalInfo
|
||||
icon="faCheckCircle"
|
||||
iconColor={colors.palette.success200}
|
||||
title={translate('payCommon.completed')}
|
||||
title={translate('payCommon_completed')}
|
||||
message={resultModalInfo?.message}
|
||||
/>
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx={'common.close'}
|
||||
tx={'commonClose'}
|
||||
onPress={() => {
|
||||
if (isInvoiceDonation) {
|
||||
gotoContacts()
|
||||
@@ -955,13 +955,13 @@ const amountInputColor = useThemeColor('amountInput')
|
||||
<ResultModalInfo
|
||||
icon="faRotate"
|
||||
iconColor={colors.palette.accent300}
|
||||
title={translate('transactionCommon.reverted')}
|
||||
title={translate('transactionCommon_reverted')}
|
||||
message={resultModalInfo?.message}
|
||||
/>
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx={'common.close'}
|
||||
tx={'commonClose'}
|
||||
onPress={toggleResultModal}
|
||||
/>
|
||||
</View>
|
||||
@@ -974,7 +974,7 @@ const amountInputColor = useThemeColor('amountInput')
|
||||
icon="faTriangleExclamation"
|
||||
iconColor={colors.palette.angry500}
|
||||
title={
|
||||
resultModalInfo?.title || translate('payCommon.failed')
|
||||
resultModalInfo?.title || translate('payCommon_failed')
|
||||
}
|
||||
message={resultModalInfo?.message}
|
||||
/>
|
||||
@@ -994,7 +994,7 @@ const amountInputColor = useThemeColor('amountInput')
|
||||
) : (
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx={'common.close'}
|
||||
tx={'commonClose'}
|
||||
onPress={toggleResultModal}
|
||||
/>
|
||||
)}
|
||||
@@ -1007,13 +1007,13 @@ const amountInputColor = useThemeColor('amountInput')
|
||||
<ResultModalInfo
|
||||
icon="faTriangleExclamation"
|
||||
iconColor={colors.palette.iconYellow300}
|
||||
title={translate('payCommon.isPending')}
|
||||
title={translate('payCommon_isPending')}
|
||||
message={resultModalInfo?.message}
|
||||
/>
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
preset="secondary"
|
||||
tx={'common.close'}
|
||||
tx={'commonClose'}
|
||||
onPress={gotoWallet}
|
||||
/>
|
||||
</View>
|
||||
|
||||
@@ -97,7 +97,7 @@ export const UpdateScreen = observer(function UpdateScreen({ route }: Props) {
|
||||
})
|
||||
|
||||
if (!updateInfo) {
|
||||
throw new AppError(Err.NETWORK_ERROR, 'Could not retrieve update information')
|
||||
throw new AppError(Err.NETWORK_ERROR, translate('updateScreen_couldNotRetrieveUpdate'))
|
||||
}
|
||||
|
||||
await HotUpdater.updateBundle(updateInfo.id, updateInfo.fileUrl)
|
||||
@@ -141,7 +141,7 @@ export const UpdateScreen = observer(function UpdateScreen({ route }: Props) {
|
||||
return (
|
||||
<Screen contentContainerStyle={$screen} preset='fixed'>
|
||||
<View style={[$headerContainer, {backgroundColor: headerBg}]}>
|
||||
<Text preset="heading" tx="updateScreen.updateManagerTitle" style={{color: headerTitle}} />
|
||||
<Text preset="heading" tx="updateScreen_updateManagerTitle" style={{color: headerTitle}} />
|
||||
</View>
|
||||
<ScrollView style={$contentContainer}>
|
||||
<Card
|
||||
@@ -151,23 +151,23 @@ export const UpdateScreen = observer(function UpdateScreen({ route }: Props) {
|
||||
{isUpdateAvailable && (
|
||||
<>
|
||||
<ListItem
|
||||
tx='updateScreen.updateAvailable'
|
||||
subTx='updateScreen.updateAvailableDesc'
|
||||
tx='updateScreen_updateAvailable'
|
||||
subTx='updateScreen_updateAvailableDesc'
|
||||
leftIcon='faWandMagicSparkles'
|
||||
leftIconColor={colors.palette.iconMagenta200}
|
||||
leftIconInverse={true}
|
||||
style={$item}
|
||||
/>
|
||||
<ListItem
|
||||
tx='updateScreen.updateNew'
|
||||
subText={updateDescription || translate("updateScreen.defaultUpdateDesc")}
|
||||
tx='updateScreen_updateNew'
|
||||
subText={updateDescription || translate("updateScreen_defaultUpdateDesc")}
|
||||
leftIcon='faInfoCircle'
|
||||
leftIconColor={colors.palette.neutral500}
|
||||
topSeparator={true}
|
||||
style={$item}
|
||||
/>
|
||||
{/*<ListItem
|
||||
tx='updateScreen.updateSize'
|
||||
tx='updateScreen_updateSize'
|
||||
subText={updateSize || '1.0MB'}
|
||||
leftIcon='faDownload'
|
||||
leftIconColor={colors.palette.neutral500}
|
||||
@@ -178,8 +178,8 @@ export const UpdateScreen = observer(function UpdateScreen({ route }: Props) {
|
||||
)}
|
||||
{isNativeUpdateAvailable && (
|
||||
<ListItem
|
||||
tx='updateScreen.updateAvailable'
|
||||
subTx={'updateScreen.nativeUpdateAvailableDesc'}
|
||||
tx='updateScreen_updateAvailable'
|
||||
subTx={'updateScreen_nativeUpdateAvailableDesc'}
|
||||
leftIcon='faWandMagicSparkles'
|
||||
leftIconColor={colors.palette.iconMagenta200}
|
||||
leftIconInverse={true}
|
||||
@@ -187,8 +187,8 @@ export const UpdateScreen = observer(function UpdateScreen({ route }: Props) {
|
||||
/>)}
|
||||
{(!isUpdateAvailable && !isNativeUpdateAvailable) && (
|
||||
<ListItem
|
||||
tx='updateScreen.updateNotAvailable'
|
||||
subTx={'updateScreen.updateNotAvailableDesc'}
|
||||
tx='updateScreen_updateNotAvailable'
|
||||
subTx={'updateScreen_updateNotAvailableDesc'}
|
||||
leftIcon='faInfoCircle'
|
||||
leftIconColor={colors.palette.neutral500}
|
||||
style={$item}
|
||||
@@ -201,7 +201,7 @@ export const UpdateScreen = observer(function UpdateScreen({ route }: Props) {
|
||||
{isUpdateAvailable && (
|
||||
<Button
|
||||
onPress={handleUpdate}
|
||||
tx='updateScreen.updateNow'
|
||||
tx='updateScreen_updateNow'
|
||||
style={{alignSelf: 'center', marginTop: spacing.medium}}
|
||||
/>
|
||||
)}
|
||||
@@ -209,12 +209,12 @@ export const UpdateScreen = observer(function UpdateScreen({ route }: Props) {
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
onPress={gotoPlayStore}
|
||||
tx='updateScreen.gotoPlayStore'
|
||||
tx='updateScreen_gotoPlayStore'
|
||||
style={{marginTop: spacing.medium, marginRight: spacing.small}}
|
||||
/>
|
||||
<Button
|
||||
onPress={gotoGithub}
|
||||
tx="updateScreen.apkOnGithub"
|
||||
tx="updateScreen_apkOnGithub"
|
||||
preset='secondary'
|
||||
style={{marginTop: spacing.medium}}
|
||||
/>
|
||||
@@ -233,7 +233,7 @@ export const UpdateScreen = observer(function UpdateScreen({ route }: Props) {
|
||||
icon='faDownload'
|
||||
iconColor={colors.palette.accent400}
|
||||
title={`${Math.round(progress * 100)}%`}
|
||||
message='Update is in progress...'
|
||||
message={translate('updateScreen_updateInProgress')}
|
||||
/>
|
||||
}
|
||||
onBackButtonPress={toggleUpdateModal}
|
||||
|
||||
@@ -32,8 +32,8 @@ export const FeeBadge = function (props: {
|
||||
<Text
|
||||
text={
|
||||
props.finalFee
|
||||
? translate('walletScreen.feeBadge.final', {fee: formatCurrency(props.finalFee, props.currencyCode), code: props.currencyCode})
|
||||
: translate('walletScreen.feeBadge.upto', {fee: formatCurrency(props.estimatedFee, props.currencyCode), code: props.currencyCode})
|
||||
? translate('walletScreen_feeBadge_final', {fee: formatCurrency(props.finalFee, props.currencyCode), code: props.currencyCode})
|
||||
: translate('walletScreen_feeBadge_upto', {fee: formatCurrency(props.estimatedFee, props.currencyCode), code: props.currencyCode})
|
||||
}
|
||||
style={[
|
||||
{
|
||||
|
||||
@@ -114,7 +114,7 @@ export const QRCodeBlock = function (props: {
|
||||
500,
|
||||
)
|
||||
} else if (result.action === Share.dismissedAction) {
|
||||
infoMessage(translate('share.cancelled'))
|
||||
infoMessage(translate('share_cancelled'))
|
||||
}
|
||||
} catch (e: any) {
|
||||
handleQrError(e)
|
||||
@@ -181,7 +181,7 @@ export const QRCodeBlock = function (props: {
|
||||
style={{backgroundColor: 'white', paddingBottom: spacing.small}}
|
||||
ContentComponent={qrError ? (
|
||||
<ListItem
|
||||
text={translate("qr.fail")}
|
||||
text={translate("qr_fail")}
|
||||
subText={qrError ? qrError.message : ''}
|
||||
leftIcon='faTriangleExclamation'
|
||||
containerStyle={{marginVertical: spacing.large}}
|
||||
@@ -220,7 +220,7 @@ export const QRCodeBlock = function (props: {
|
||||
FooterComponent={
|
||||
<View style={$buttonContainer}>
|
||||
<Button
|
||||
text="Share"
|
||||
tx="commonShare"
|
||||
preset="tertiary"
|
||||
onPress={onShareToApp}
|
||||
LeftAccessory={() => <Icon icon='faShareNodes' size={spacing.small} color={colors.light.text} />}
|
||||
@@ -233,7 +233,7 @@ export const QRCodeBlock = function (props: {
|
||||
/>
|
||||
<Button
|
||||
preset="tertiary"
|
||||
text="Copy"
|
||||
tx="commonCopy"
|
||||
onPress={onCopy}
|
||||
LeftAccessory={() => <Icon icon='faCopy' size={spacing.small} color={colors.light.text} />}
|
||||
textStyle={{color: colors.light.text, fontSize: 14}}
|
||||
@@ -246,7 +246,7 @@ export const QRCodeBlock = function (props: {
|
||||
{type === 'EncodedV4Token' && keysetFormat === 'hex' && !isAnimating && (
|
||||
<Button
|
||||
preset="tertiary"
|
||||
text={`${encodedV3Token ? 'New' : 'Old'}`}
|
||||
tx={encodedV3Token ? "qrCodeNewFormatButton" : "qrCodeOldFormatButton"}
|
||||
onPress={switchTokenEncoding}
|
||||
LeftAccessory={() => <Icon icon='faMoneyBill1' size={spacing.small} color={colors.light.text}/>}
|
||||
textStyle={{color: colors.light.text, fontSize: 14}}
|
||||
@@ -260,7 +260,7 @@ export const QRCodeBlock = function (props: {
|
||||
{type === 'EncodedV4Token' && !isQRCodeError && (
|
||||
<Button
|
||||
preset="tertiary"
|
||||
text={`${isAnimating ? 'Static' : 'Animate'}`}
|
||||
tx={isAnimating ? "qrCodeStaticButton" : "qrCodeAnimateButton"}
|
||||
onPress={toggleQRcodeAnimation}
|
||||
LeftAccessory={() => <Icon icon='faQrcode' size={spacing.small} color={colors.light.text} />}
|
||||
textStyle={{color: colors.light.text, fontSize: 14}}
|
||||
|
||||
@@ -9,6 +9,7 @@ import {OwnName} from './Contacts/OwnName'
|
||||
import {useStores} from '../models'
|
||||
import {useHeader} from '../utils/useHeader'
|
||||
import { StaticScreenProps, useNavigation } from '@react-navigation/native'
|
||||
import {translate} from '../i18n'
|
||||
|
||||
type Props = StaticScreenProps<undefined>
|
||||
|
||||
@@ -35,8 +36,8 @@ export const WalletNameScreen = observer(function WalletNameScreen({ route }: Pr
|
||||
|
||||
const [index, setIndex] = useState(0)
|
||||
const [routes] = useState([
|
||||
{ key: 'first', title: 'Own name' },
|
||||
{ key: 'second', title: 'Random name' },
|
||||
{ key: 'first', title: translate('walletNameScreen_ownNameTab') },
|
||||
{ key: 'second', title: translate('walletNameScreen_randomNameTab') },
|
||||
])
|
||||
|
||||
const headerBg = useThemeColor('header')
|
||||
|
||||
@@ -367,7 +367,7 @@ export const WalletScreen = observer(function WalletScreen({ route }: Props) {
|
||||
log.trace('newMintUrl', newMintUrl)
|
||||
|
||||
if (mintsStore.alreadyExists(newMintUrl)) {
|
||||
const msg = translate('walletScreen.mintExists')
|
||||
const msg = translate('walletScreen_mintExists')
|
||||
log.info(msg)
|
||||
setInfo(msg)
|
||||
return
|
||||
@@ -527,7 +527,7 @@ export const WalletScreen = observer(function WalletScreen({ route }: Props) {
|
||||
<ListItem
|
||||
leftIcon='faArrowTurnDown'
|
||||
leftIconColor={colors.palette.green400}
|
||||
text='Start by funding your wallet'
|
||||
tx='walletScreen_startByFunding'
|
||||
textStyle={{fontSize: moderateScale(14)}}
|
||||
RightComponent={
|
||||
<View style={$rightContainer}>
|
||||
@@ -583,7 +583,7 @@ export const WalletScreen = observer(function WalletScreen({ route }: Props) {
|
||||
if (!isInternetReachable) {
|
||||
return (
|
||||
<Text
|
||||
tx="common.offline"
|
||||
tx="commonOffline"
|
||||
style={$warning}
|
||||
size="xxs"
|
||||
/>
|
||||
@@ -665,7 +665,7 @@ export const WalletScreen = observer(function WalletScreen({ route }: Props) {
|
||||
HeadingComponent={<Text text={item.name} size='xs'/>}
|
||||
ContentComponent={
|
||||
<>
|
||||
<Text text='Spent today' size='xxs' preset='formHelper' style={{color: label, overflow: 'hidden'}}/>
|
||||
<Text tx='walletScreen_spentToday' size='xxs' preset='formHelper' style={{color: label, overflow: 'hidden'}}/>
|
||||
<CurrencyAmount
|
||||
amount={item.dailyLimit - item.remainingDailyLimit}
|
||||
currencyCode={CurrencyCode.SAT}
|
||||
@@ -703,7 +703,7 @@ export const WalletScreen = observer(function WalletScreen({ route }: Props) {
|
||||
style={[{backgroundColor: mainButtonColor, borderWidth: 1, borderColor: screenBg}, $buttonSend]}
|
||||
textStyle={{marginRight: spacing.tiny}}
|
||||
preset='secondary'
|
||||
tx='payCommon.send'
|
||||
tx='payCommon_send'
|
||||
/>
|
||||
<Button
|
||||
RightAccessory={() => (
|
||||
@@ -729,7 +729,7 @@ export const WalletScreen = observer(function WalletScreen({ route }: Props) {
|
||||
/>
|
||||
)}
|
||||
onPress={toggleReceiveModal}
|
||||
tx='payCommon.receive'
|
||||
tx='payCommon_receive'
|
||||
style={[{backgroundColor: mainButtonColor, borderWidth: 1, borderColor: screenBg}, $buttonReceive]}
|
||||
textStyle={{marginLeft: spacing.tiny}}
|
||||
preset='secondary'
|
||||
@@ -753,8 +753,8 @@ export const WalletScreen = observer(function WalletScreen({ route }: Props) {
|
||||
/>
|
||||
</View>
|
||||
}
|
||||
tx="updateModal.title"
|
||||
subTx="updateModal.desc"
|
||||
tx="updateModal_title"
|
||||
subTx="updateModal_desc"
|
||||
onPress={gotoUpdate}
|
||||
/>
|
||||
}
|
||||
@@ -783,15 +783,15 @@ export const WalletScreen = observer(function WalletScreen({ route }: Props) {
|
||||
<>
|
||||
<ListItem
|
||||
leftIcon='faMoneyBill1'
|
||||
tx="walletScreen.sendEcash"
|
||||
subTx="walletScreen.sendEcashDesc"
|
||||
tx="walletScreen_sendEcash"
|
||||
subTx="walletScreen_sendEcashDesc"
|
||||
onPress={gotoSend}
|
||||
bottomSeparator={true}
|
||||
/>
|
||||
<ListItem
|
||||
leftIcon='faBolt'
|
||||
tx="walletScreen.payWithLightning"
|
||||
subTx="walletScreen.payWithLightningDesc"
|
||||
tx="walletScreen_payWithLightning"
|
||||
subTx="walletScreen_payWithLightningDesc"
|
||||
onPress={() => gotoLightningPay()}
|
||||
/>
|
||||
</>
|
||||
@@ -806,15 +806,15 @@ export const WalletScreen = observer(function WalletScreen({ route }: Props) {
|
||||
<>
|
||||
<ListItem
|
||||
leftIcon='faMoneyBill1'
|
||||
tx="walletScreen.receiveEcash"
|
||||
subTx="walletScreen.receiveEcashDesc"
|
||||
tx="walletScreen_receiveEcash"
|
||||
subTx="walletScreen_receiveEcashDesc"
|
||||
onPress={gotoTokenReceive}
|
||||
bottomSeparator={true}
|
||||
/>
|
||||
<ListItem
|
||||
leftIcon='faBolt'
|
||||
tx='walletScreen.topupWithLightning'
|
||||
subTx="walletScreen.topupWithLightningDesc"
|
||||
tx='walletScreen_topupWithLightning'
|
||||
subTx="walletScreen_topupWithLightningDesc"
|
||||
onPress={() => gotoTopup()}
|
||||
/>
|
||||
</>
|
||||
@@ -898,7 +898,7 @@ const MintsByUnitSummary = observer(function (props: {
|
||||
}, [])
|
||||
|
||||
const {mintsByUnit} = props
|
||||
const mintsCountText = `and ${mintsByUnit.mints.length - 1} other${mintsByUnit.mints.length - 1 > 1 ? 's' : ''}`
|
||||
const mintsCountText = translate('walletScreen_andOtherMints', {count: mintsByUnit.mints.length - 1})
|
||||
|
||||
return (
|
||||
<View style={{flexDirection: 'row', alignItems: 'center'}}>
|
||||
@@ -994,7 +994,7 @@ const MintsByUnitList = observer(function (props: {
|
||||
{selectedMintUrl === mint.mintUrl && (
|
||||
<View style={{flexDirection: 'row', marginBottom: spacing.small, justifyContent: 'flex-start'}}>
|
||||
<Button
|
||||
tx="walletScreen.topup"
|
||||
tx="walletScreen_topup"
|
||||
LeftAccessory={() => (
|
||||
<Icon
|
||||
icon='faPlus'
|
||||
@@ -1012,7 +1012,7 @@ const MintsByUnitList = observer(function (props: {
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
tx="walletScreen.pay"
|
||||
tx="walletScreen_pay"
|
||||
LeftAccessory={() => (
|
||||
<Icon
|
||||
icon='faBolt'
|
||||
@@ -1030,7 +1030,7 @@ const MintsByUnitList = observer(function (props: {
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
tx="wallerScreen.mintButton"
|
||||
tx="wallerScreen_mintButton"
|
||||
LeftAccessory={() => (
|
||||
<View style={{marginHorizontal: spacing.extraSmall}}>
|
||||
<SvgXml
|
||||
|
||||
@@ -39,36 +39,36 @@ const AnimatedPagerView = Animated.createAnimatedComponent(PagerView)
|
||||
const PAGES = [
|
||||
{
|
||||
key: 1,
|
||||
heading: 'welcomeScreen.page1.heading',
|
||||
intro: 'welcomeScreen.page1.intro',
|
||||
heading: 'welcomeScreen_page1_heading',
|
||||
intro: 'welcomeScreen_page1_intro',
|
||||
bullets: [
|
||||
{id: '1', tx: 'welcomeScreen.page1.bullet1'},
|
||||
{id: '2', tx: 'welcomeScreen.page1.bullet2'},
|
||||
{id: '3', tx: 'welcomeScreen.page1.bullet3'},
|
||||
{id: '1', tx: 'welcomeScreen_page1_bullet1'},
|
||||
{id: '2', tx: 'welcomeScreen_page1_bullet2'},
|
||||
{id: '3', tx: 'welcomeScreen_page1_bullet3'},
|
||||
],
|
||||
final: 'welcomeScreen.page1.final'
|
||||
final: 'welcomeScreen_page1_final'
|
||||
},
|
||||
{
|
||||
key: 2,
|
||||
heading: 'welcomeScreen.page2.heading',
|
||||
intro: 'welcomeScreen.page2.intro',
|
||||
heading: 'welcomeScreen_page2_heading',
|
||||
intro: 'welcomeScreen_page2_intro',
|
||||
bullets: [
|
||||
{id: '1', tx: 'welcomeScreen.page2.bullet1'},
|
||||
{id: '2', tx: 'welcomeScreen.page2.bullet2'},
|
||||
{id: '3', tx: 'welcomeScreen.page2.bullet3'},
|
||||
{id: '1', tx: 'welcomeScreen_page2_bullet1'},
|
||||
{id: '2', tx: 'welcomeScreen_page2_bullet2'},
|
||||
{id: '3', tx: 'welcomeScreen_page2_bullet3'},
|
||||
],
|
||||
final: 'welcomeScreen.page2.final'
|
||||
final: 'welcomeScreen_page2_final'
|
||||
},
|
||||
{
|
||||
key: 3,
|
||||
heading: 'welcomeScreen.page3.heading',
|
||||
intro: 'welcomeScreen.page3.intro',
|
||||
heading: 'welcomeScreen_page3_heading',
|
||||
intro: 'welcomeScreen_page3_intro',
|
||||
bullets: [
|
||||
{id: '1', tx: 'welcomeScreen.page3.bullet1'},
|
||||
{id: '2', tx: 'welcomeScreen.page3.bullet2'},
|
||||
{id: '3', tx: 'welcomeScreen.page3.bullet3'},
|
||||
{id: '1', tx: 'welcomeScreen_page3_bullet1'},
|
||||
{id: '2', tx: 'welcomeScreen_page3_bullet2'},
|
||||
{id: '3', tx: 'welcomeScreen_page3_bullet3'},
|
||||
],
|
||||
final: 'welcomeScreen.page3.final'
|
||||
final: 'welcomeScreen_page3_final'
|
||||
}
|
||||
]
|
||||
|
||||
@@ -101,18 +101,18 @@ export const WelcomeScreen = function ({ route }: Props) {
|
||||
const gotoWallet = async function () {
|
||||
try {
|
||||
if(!isInternetReachable) {
|
||||
setInfo('Please make sure you are online to set up the new wallet.')
|
||||
setInfo(translate('welcomeScreen_offlineWarning'))
|
||||
return
|
||||
}
|
||||
|
||||
setIsLoading(true)
|
||||
|
||||
if(!await KeyChain.hasWalletKeys()) {
|
||||
setStatusMessage('Creating wallet keys...')
|
||||
setStatusMessage(translate('welcomeScreen_creatingKeys'))
|
||||
|
||||
const keys = KeyChain.generateWalletKeys()
|
||||
|
||||
setStatusMessage('Creating wallet profile...')
|
||||
setStatusMessage(translate('welcomeScreen_creatingProfile'))
|
||||
|
||||
await walletProfileStore.create(
|
||||
keys.NOSTR.publicKey,
|
||||
@@ -251,12 +251,12 @@ export const WelcomeScreen = function ({ route }: Props) {
|
||||
<Button
|
||||
onPress={gotoWallet}
|
||||
preset='secondary'
|
||||
tx="welcomeScreen.lastPageConfirmButton"
|
||||
tx="welcomeScreen_lastPageConfirmButton"
|
||||
/>
|
||||
<Button
|
||||
onPress={gotoRecovery}
|
||||
preset='tertiary'
|
||||
tx="welcomeScreen.lastPageRecoverLostWalletButton"
|
||||
tx="welcomeScreen_lastPageRecoverLostWalletButton"
|
||||
LeftAccessory={() => {return<Icon icon='faHeartPulse'/>}}
|
||||
style={{marginTop: spacing.medium}}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user