Skip to content

Commit 087c7e9

Browse files
authored
Merge pull request #21934 from bernhardoj/fix/21189-view-bills-not-working
2 parents 3322b88 + 47fffd3 commit 087c7e9

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

src/libs/actions/Link.js

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,13 @@ function openOldDotLink(url) {
6666
}
6767

6868
// If shortLivedAuthToken is not accessible, fallback to opening the link without the token.
69-
// eslint-disable-next-line rulesdir/no-api-side-effects-method
70-
API.makeRequestWithSideEffects('OpenOldDotLink', {}, {})
71-
.then((response) => {
72-
buildOldDotURL(url, response.shortLivedAuthToken).then((oldDotUrl) => {
73-
Linking.openURL(oldDotUrl);
74-
});
75-
})
76-
.catch(() => {
77-
buildOldDotURL(url).then((oldDotUrl) => {
78-
Linking.openURL(oldDotUrl);
79-
});
80-
});
69+
asyncOpenURL(
70+
// eslint-disable-next-line rulesdir/no-api-side-effects-method
71+
API.makeRequestWithSideEffects('OpenOldDotLink', {}, {})
72+
.then((response) => buildOldDotURL(url, response.shortLivedAuthToken))
73+
.catch(() => buildOldDotURL(url)),
74+
(oldDotURL) => oldDotURL,
75+
);
8176
}
8277

8378
/**

0 commit comments

Comments
 (0)