Skip to content

Commit

Permalink
Merge pull request #581 from Peersyst/dev
Browse files Browse the repository at this point in the history
v1.8.3
  • Loading branch information
AdriaCarrera authored Jan 31, 2025
2 parents 33b7522 + 4141f6e commit 1072478
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 28 deletions.
3 changes: 1 addition & 2 deletions app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
name: "NEAR Mobile",
slug: "NEARMobileWallet",
owner: "peersyst",
version: "1.8.2",
version: "1.8.3",
orientation: "portrait",
icon: "./assets/images/near-icon.png",
scheme: "near-mobile-wallet",
Expand Down Expand Up @@ -62,7 +62,6 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
android: {
compileSdkVersion: 34,
targetSdkVersion: 34,
buildToolsVersion: "34.0.0",
},
},
],
Expand Down
2 changes: 1 addition & 1 deletion src/asset/image/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export { default as hot } from "./tokens/hot.png";
export { default as ht } from "./tokens/ht.png";
export { default as intel } from "./tokens/intel.png";
export { default as jump } from "./tokens/jump.png";
export { default as kat } from "./tokens/kat2.png";
export { default as kat } from "./tokens/kat.png";
export { default as linear } from "./tokens/linear.png";
export { default as link } from "./tokens/link.png";
export { default as lol } from "./tokens/lol.png";
Expand Down
File renamed without changes
Binary file modified src/asset/image/tokens/xref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 9 additions & 9 deletions src/module/token/component/display/TokenIcon/SupportedTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export const SUPPORTED_TOKENS_IMAGES = {
CUCUMBER: cucumber,
cUSD: cusd,
DAI: dai,
DARAI: darai,
Darai: darai,
DBIO: dbio,
DEIP: deip,
DISC: disc,
Expand All @@ -155,7 +155,7 @@ export const SUPPORTED_TOKENS_IMAGES = {
LINK: link,
LOL: lol,
LONK: lonk,
MARMAJ: marmaj,
marmaj: marmaj,
mpDAO: mpdao,
MYRIA: myria,
NDC: ndc,
Expand All @@ -168,19 +168,19 @@ export const SUPPORTED_TOKENS_IMAGES = {
NERSIG: nersig,
nKOK: nkok,
nUSDO: nusdo,
noCHILL: nochill,
noChill: nochill,
NOEAR: noear,
OCT: oct,
OIN: oin,
OTTO: otto,
PARAS: paras,
PNEAR: pnear,
pNEAR: pnear,
PUMPKG: pumpkg,
PULSE: pulse,
PXT: pxt,
RadeoNEAR: radeonear,
rort: rort,
ref: ref,
REF: ref,
Redacted: redacted,
sFRAX: sfrax,
SIN: sin,
Expand All @@ -197,8 +197,8 @@ export const SUPPORTED_TOKENS_IMAGES = {
TRI: tri,
UMINT: umint,
USDC: usdc,
USDCE: usdce,
USDT: usdt,
"USDC.e": usdce,
USDt: usdt,
"USDT.e": usdte,
USM: usm,
USN: usn,
Expand All @@ -207,9 +207,9 @@ export const SUPPORTED_TOKENS_IMAGES = {
VEGANFRIENDS: veganfriends,
WBTC: wbtc,
WETH: weth,
wnear: wnear,
wNEAR: wnear,
wojak: wojak,
WOO: woo,
xref: xref,
xREF: xref,
ZML: zml,
};
23 changes: 7 additions & 16 deletions src/query/RefetchHandler/hooks/useRefetchHandler.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { addEventListener } from "@react-native-community/netinfo";
import { useEffect, useCallback } from "react";
import { NetInfoState, useNetInfo } from "@react-native-community/netinfo";
import { useEffect, useCallback, useRef } from "react";
import useGetBalance from "module/wallet/query/useGetBalance";
import useGetActions from "module/transaction/query/useGetActions";
import { useAppState } from "@react-native-community/hooks";
Expand All @@ -10,6 +10,8 @@ export function useRefetchHandler(): void {
const { refetch: refetchBalance } = useGetBalance();
const { refetch: refetchActions } = useGetActions();
const appState = useAppState();
const onlineState = useNetInfo();
const latestOnlineStateRef = useRef<NetInfoState>();

const handleRefetch = useCallback(async () => {
try {
Expand All @@ -19,20 +21,9 @@ export function useRefetchHandler(): void {
}, [refetchActions, refetchBalance, queryEnabled]);

useEffect(() => {
const unsubscribe = addEventListener(async (state) => {
if (state.isConnected) {
await handleRefetch();
}
});

return () => {
unsubscribe();
};
}, [handleRefetch]);

useEffect(() => {
if (appState === "active") {
if (appState === "active" && !latestOnlineStateRef.current?.isConnected && onlineState.isConnected) {
latestOnlineStateRef.current = onlineState;
handleRefetch();
}
}, [appState, handleRefetch]);
}, [appState, onlineState, handleRefetch]);
}

0 comments on commit 1072478

Please sign in to comment.