Skip to content

Commit

Permalink
Merge pull request #21934 from bernhardoj/fix/21189-view-bills-not-wo…
Browse files Browse the repository at this point in the history
…rking
  • Loading branch information
cead22 authored Jul 3, 2023
2 parents 3322b88 + 47fffd3 commit 087c7e9
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions src/libs/actions/Link.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,13 @@ function openOldDotLink(url) {
}

// If shortLivedAuthToken is not accessible, fallback to opening the link without the token.
// eslint-disable-next-line rulesdir/no-api-side-effects-method
API.makeRequestWithSideEffects('OpenOldDotLink', {}, {})
.then((response) => {
buildOldDotURL(url, response.shortLivedAuthToken).then((oldDotUrl) => {
Linking.openURL(oldDotUrl);
});
})
.catch(() => {
buildOldDotURL(url).then((oldDotUrl) => {
Linking.openURL(oldDotUrl);
});
});
asyncOpenURL(
// eslint-disable-next-line rulesdir/no-api-side-effects-method
API.makeRequestWithSideEffects('OpenOldDotLink', {}, {})
.then((response) => buildOldDotURL(url, response.shortLivedAuthToken))
.catch(() => buildOldDotURL(url)),
(oldDotURL) => oldDotURL,
);
}

/**
Expand Down

0 comments on commit 087c7e9

Please sign in to comment.