Skip to content

Commit

Permalink
fix(extension): #207: change zeros to undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
VanishMax committed Oct 17, 2024
1 parent d085ff3 commit 29ff515
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const useCacheClear = () => {
setLoading(true);

void (async function () {
await setFullSyncHeight(0);
await setFullSyncHeight(undefined);
await chrome.runtime.sendMessage(ServicesMessage.ClearCache);
navigate(PopupPath.INDEX);
})();
Expand Down
2 changes: 1 addition & 1 deletion apps/extension/src/state/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface NetworkSlice {
chainId?: string;
setGRPCEndpoint: (endpoint: string) => Promise<void>;
setChainId: (chainId: string) => void;
setFullSyncHeight: (value: number) => Promise<void>;
setFullSyncHeight: (value?: number) => Promise<void>;
}

export const createNetworkSlice =
Expand Down
2 changes: 1 addition & 1 deletion apps/extension/src/state/persist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const customPersistImpl: Persist = f => (set, get, store) => {
state.connectedSites.knownSites = knownSites;
state.defaultFrontend.url = frontendUrl;
state.numeraires.selectedNumeraires = numeraires;
state.network.fullSyncHeight = fullSyncHeight ?? 0;
state.network.fullSyncHeight = fullSyncHeight;
}),
);

Expand Down

0 comments on commit 29ff515

Please sign in to comment.