Skip to content

Commit a196aa6

Browse files
authored
#286 - (version/0.16.0)
1 parent 59d0e99 commit a196aa6

10 files changed

+1560
-1779
lines changed

app.config.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default {
99
'ios',
1010
'android',
1111
],
12-
version: '0.15.0',
12+
version: '0.16.0',
1313
orientation: 'portrait',
1414
updates: {
1515
enabled: true,
@@ -38,7 +38,7 @@ export default {
3838
usesNonExemptEncryption: false,
3939
},
4040
bundleIdentifier: IS_DEV ? 'abacus.fireflyiii.ios.app.dev' : 'abacus.ios.app',
41-
buildNumber: '0.15.0',
41+
buildNumber: '0.16.0',
4242
},
4343
android: {
4444
icon: './src/images/icon-abacus.png',
@@ -56,7 +56,7 @@ export default {
5656
},
5757
playStoreUrl: 'https://play.google.com/store/apps/details?id=abacus.fireflyiii.android.app',
5858
package: IS_DEV ? 'abacus.fireflyiii.android.app.dev' : 'abacus.fireflyiii.android.app',
59-
versionCode: 23,
59+
versionCode: 24,
6060
},
6161
scheme: 'abacusfiiiapp',
6262
githubUrl: 'https://github.com/victorbalssa/abacus',
@@ -69,6 +69,8 @@ export default {
6969
},
7070
},
7171
plugins: [
72+
'expo-asset',
73+
'expo-secure-store',
7274
'expo-localization',
7375
'./plugins/withAndroidStyles',
7476
'./plugins/withAndroidManifest',

package-lock.json

+1,494-1,729
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+38-38
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "abacus",
3-
"version": "0.15.0",
3+
"version": "0.16.0",
44
"private": true,
55
"homepage": "https://github.com/victorbalssa/abacus",
66
"scripts": {
@@ -18,57 +18,57 @@
1818
]
1919
},
2020
"dependencies": {
21-
"@expo/config-plugins": "~7.8.0",
22-
"@expo/metro-runtime": "~3.1.3",
21+
"@expo/config-plugins": "~8.0.0",
22+
"@expo/metro-runtime": "~3.2.1",
2323
"@expo/vector-icons": "^14.0.0",
24-
"@react-native-async-storage/async-storage": "1.21.0",
25-
"@react-native-community/datetimepicker": "7.6.1",
24+
"@react-native-async-storage/async-storage": "1.23.1",
25+
"@react-native-community/datetimepicker": "8.0.1",
2626
"@react-navigation/bottom-tabs": "6.5.14",
2727
"@react-navigation/native": "6.1.12",
2828
"@react-navigation/native-stack": "6.9.20",
2929
"@rematch/core": "^2.2.0",
3030
"@rematch/loading": "^2.1.2",
3131
"@rematch/persist": "^2.1.2",
32-
"@shopify/react-native-skia": "0.1.221",
32+
"@shopify/react-native-skia": "1.2.3",
3333
"axios": "1.6.7",
3434
"babel-polyfill": "^6.26.0",
3535
"base-64": "^1.0.0",
3636
"bootstrap": "^4.4.1",
37-
"expo": "~50.0.17",
38-
"expo-application": "~5.8.4",
39-
"expo-asset": "~9.0.2",
40-
"expo-auth-session": "~5.4.0",
41-
"expo-blur": "~12.9.2",
42-
"expo-clipboard": "~5.0.1",
43-
"expo-crypto": "~12.8.1",
44-
"expo-dev-client": "~3.3.11",
45-
"expo-device": "~5.9.4",
46-
"expo-font": "~11.10.2",
47-
"expo-haptics": "~12.8.1",
48-
"expo-linear-gradient": "~12.7.2",
49-
"expo-linking": "~6.2.2",
50-
"expo-local-authentication": "~13.8.0",
51-
"expo-localization": "~14.8.4",
52-
"expo-random": "~13.6.0",
53-
"expo-secure-store": "~12.8.1",
54-
"expo-status-bar": "~1.11.1",
55-
"expo-store-review": "~6.8.3",
56-
"expo-system-ui": "~2.9.4",
57-
"expo-updates": "~0.24.12",
37+
"expo": "^51.0.8",
38+
"expo-application": "~5.9.1",
39+
"expo-asset": "~10.0.6",
40+
"expo-auth-session": "~5.5.2",
41+
"expo-blur": "~13.0.2",
42+
"expo-clipboard": "~6.0.3",
43+
"expo-crypto": "~13.0.2",
44+
"expo-dev-client": "~4.0.14",
45+
"expo-device": "~6.0.2",
46+
"expo-font": "~12.0.5",
47+
"expo-haptics": "~13.0.1",
48+
"expo-linear-gradient": "~13.0.2",
49+
"expo-linking": "~6.3.1",
50+
"expo-local-authentication": "~14.0.1",
51+
"expo-localization": "~15.0.3",
52+
"expo-random": "~14.0.1",
53+
"expo-secure-store": "~13.0.1",
54+
"expo-status-bar": "~1.12.1",
55+
"expo-store-review": "~7.0.2",
56+
"expo-system-ui": "~3.0.4",
57+
"expo-updates": "~0.25.14",
5858
"globally": "^0.0.0",
5959
"i18n-js": "^4.1.1",
6060
"lodash": "^4.17.21",
6161
"moment": "^2.29.4",
6262
"react": "18.2.0",
6363
"react-dom": "18.2.0",
6464
"react-helmet": "^5.2.1",
65-
"react-native": "0.73.6",
66-
"react-native-gesture-handler": "~2.14.0",
67-
"react-native-pager-view": "6.2.3",
68-
"react-native-reanimated": "~3.6.2",
69-
"react-native-safe-area-context": "4.8.2",
70-
"react-native-screens": "~3.29.0",
71-
"react-native-svg": "14.1.0",
65+
"react-native": "0.74.1",
66+
"react-native-gesture-handler": "~2.16.1",
67+
"react-native-pager-view": "6.3.0",
68+
"react-native-reanimated": "~3.10.1",
69+
"react-native-safe-area-context": "4.10.1",
70+
"react-native-screens": "3.31.1",
71+
"react-native-svg": "15.2.0",
7272
"react-native-swipe-list-view": "^3.2.9",
7373
"react-redux": "9.1.0",
7474
"redux": "5.0.1",
@@ -79,14 +79,14 @@
7979
"victory-native": "^36.9.1"
8080
},
8181
"devDependencies": {
82-
"@babel/core": "^7.23.2",
82+
"@babel/core": "^7.24.0",
8383
"@types/jest": "^29.5.8",
8484
"@types/lodash": "^4.14.197",
8585
"@types/node": "^20.9.0",
86-
"@types/react": "~18.2.45",
86+
"@types/react": "~18.2.79",
8787
"@typescript-eslint/eslint-plugin": "^5.30.0",
8888
"@typescript-eslint/parser": "^5.62.0",
89-
"babel-preset-expo": "^10.0.0",
89+
"babel-preset-expo": "~11.0.0",
9090
"detox": "20.18.1",
9191
"dotenv": "^16.3.1",
9292
"eslint": "^7.32.0",
@@ -95,7 +95,7 @@
9595
"eslint-plugin-jest": "^27.2.3",
9696
"eslint-plugin-jsx-a11y": "^6.8.0",
9797
"eslint-plugin-react": "^7.33.1",
98-
"jest-expo": "~50.0.4",
98+
"jest-expo": "~51.0.2",
9999
"node-sass": "9.0.0",
100100
"ts-jest": "29.1.2",
101101
"ts-node": "10.9.1",

src/components/Forms/TransactionSplitForm.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ export default function TransactionSplitForm({
319319
onSelectAutocomplete={(autocomplete) => setTransaction({
320320
...formData,
321321
sourceName: autocomplete.name,
322+
sourceId: autocomplete.id,
322323
currencyCode: autocomplete.currencyCode,
323324
currencySymbol: autocomplete.currencySymbol,
324325
})}
@@ -340,6 +341,7 @@ export default function TransactionSplitForm({
340341
onSelectAutocomplete={(autocomplete) => setTransaction({
341342
...formData,
342343
destinationName: autocomplete.name,
344+
destinationId: autocomplete.id,
343345
})}
344346
InputRightElement={deleteBtn(['destinationName'])}
345347
routeApi="accounts"
@@ -439,7 +441,9 @@ export default function TransactionSplitForm({
439441
setTransaction({
440442
date: new Date(),
441443
sourceName: '',
444+
sourceId: null,
442445
destinationName: '',
446+
destinationId: null,
443447
description: '',
444448
amount: '',
445449
type: 'withdrawal',

src/components/Screens/ConfigurationScreen.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export default function ConfigurationScreen({ navigation }: ScreenType) {
9595
CommonActions.reset({
9696
index: 0,
9797
routes: [
98-
{ name: 'credentials' },
98+
{ name: 'credentials', params: { noRedirect: true } },
9999
],
100100
}),
101101
);

src/components/Screens/CredentialsScreen.tsx

+7-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { ScreenType } from '../../types/screen';
2222
import { RootDispatch, RootState } from '../../store';
2323
import AButton from '../UI/ALibrary/AButton';
2424

25-
export default function CredentialsScreen({ navigation }: ScreenType) {
25+
export default function CredentialsScreen({ navigation, route }: ScreenType) {
2626
const { colors } = useThemeColors();
2727
const { name: routeName } = useRoute();
2828
const useBiometricAuth = useSelector((state: RootState) => state.configuration.useBiometricAuth);
@@ -67,7 +67,12 @@ export default function CredentialsScreen({ navigation }: ScreenType) {
6767
}
6868

6969
setAuthenticated(true);
70-
if (c.length === 1 && routeName === 'credentials') {
70+
const {
71+
params: {
72+
noRedirect = false,
73+
} = {},
74+
} = route;
75+
if (c.length === 1 && routeName === 'credentials' && !noRedirect) {
7176
await loginWithCredential(c[0]);
7277
}
7378
})();

src/components/UI/ErrorWidget.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default function ErrorWidget() {
1919
CommonActions.reset({
2020
index: 0,
2121
routes: [
22-
{ name: 'credentials' },
22+
{ name: 'credentials', params: { noRedirect: true } },
2323
],
2424
}),
2525
);
@@ -37,7 +37,7 @@ export default function ErrorWidget() {
3737
showToast(translate('transaction_form_success_title'), translate('transaction_form_success_description'), 'success');
3838
}
3939

40-
if (error && (error as AxiosError).response?.status && (error as AxiosError).response?.status === 404 && !isFirstRun.current) {
40+
if (error && (error as AxiosError).response?.status && [401, 403].includes((error as AxiosError).response?.status) && !isFirstRun.current) {
4141
goToCredentials();
4242
}
4343

src/models/accounts.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -133,19 +133,19 @@ export default createModel<RootModel>()({
133133
if (currentCode) {
134134
const [
135135
{ data: accounts },
136-
{ data: frontPageAccounts },
136+
{ data: frontpageAccounts },
137137
] = await Promise.all([
138138
dispatch.configuration.apiFetch({ url: `/api/v1/currencies/${currentCode}/accounts?${displayAllAccounts ? '' : 'type=asset'}&date=${end}` }) as Promise<{ data: AccountType[] }>,
139-
dispatch.configuration.apiFetch({ url: '/api/v2/preferences/frontPageAccounts' }) as Promise<{ data: PreferenceType }>,
139+
dispatch.configuration.apiFetch({ url: '/api/v1/preferences/frontpageAccounts' }) as Promise<{ data: PreferenceType }>,
140140
]);
141141

142142
const filteredAccounts = accounts
143143
.filter((a: AccountType) => a.attributes.active)
144144
.sort((a, b) => (b.attributes.order < a.attributes.order ? 1 : -1));
145145

146-
if (frontPageAccounts) {
146+
if (frontpageAccounts) {
147147
accounts.forEach((a: AccountType, index) => {
148-
accounts[index].display = frontPageAccounts.attributes.data.includes(parseInt(a.id, 10));
148+
accounts[index].display = frontpageAccounts.attributes.data.includes(parseInt(a.id, 10));
149149
});
150150
}
151151

src/models/transactions.ts

+4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ export type TransactionSplitType = {
1717
currencyDecimalPlaces?: number,
1818
date: string | Date,
1919
sourceName: string,
20+
sourceId: number,
2021
destinationName: string,
22+
destinationId: number,
2123
tags: string[],
2224
notes: string,
2325
foreignAmount: string,
@@ -327,7 +329,9 @@ export default createModel<RootModel>()({
327329
description: transaction.description,
328330
date: transaction.date,
329331
source_name: transaction.sourceName,
332+
source_id: transaction.sourceId,
330333
destination_name: transaction.destinationName,
334+
destination_id: transaction.destinationId,
331335
category_id: transaction.categoryName === '' ? undefined : transaction.categoryId,
332336
category_name: transaction.categoryName,
333337
budget_id: transaction.budgetId,

src/types/screen.ts

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export interface ScreenType {
2222
};
2323
id?: string;
2424
forceRefresh?: boolean | undefined;
25+
noRedirect?: boolean;
2526
filterType?: string;
2627
selectFilter?: (filter: string) => void;
2728
}

0 commit comments

Comments
 (0)