mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-09 21:48:04 -05:00
[INJIMOB-2018] add vc download success banner (#1646)
[INJIMOB-1852] fix caching logic, to use cache if the device is offline Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com>
This commit is contained in:
@@ -15,6 +15,7 @@ import {
|
||||
sendImpressionEvent,
|
||||
} from './telemetry/TelemetryUtils';
|
||||
import {TelemetryConstants} from './telemetry/TelemetryConstants';
|
||||
import NetInfo, {NetInfoState} from '@react-native-community/netinfo';
|
||||
|
||||
export const API_URLS: ApiUrls = {
|
||||
trustedVerifiersList: {
|
||||
@@ -257,9 +258,10 @@ async function generateCacheAPIFunctionWithAPIPreference(
|
||||
}`);
|
||||
|
||||
console.log(error);
|
||||
|
||||
const response = await getItem(cacheKey, null, '');
|
||||
|
||||
var response=null;
|
||||
if(!(await NetInfo.fetch()).isConnected){
|
||||
response = await getItem(cacheKey, null, '');
|
||||
}
|
||||
if (response) {
|
||||
return response;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user