Skip to content

Commit

Permalink
Merge pull request #487 from powerhouse-inc/fix-urlBranchMap-makerdao
Browse files Browse the repository at this point in the history
fix: urlBranchMap
  • Loading branch information
gpuente authored Aug 12, 2024
2 parents 8530b9d + e96dd26 commit 151fc74
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/hooks/useLoadInitialData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export const useLoadInitialData = () => {

async function checkLatestVersion() {
const result = await isLatestVersion();
if (result === null) return;
if (!result) {
toast(<ReloadConnectToast />, {
type: 'connect-warning',
Expand Down
13 changes: 9 additions & 4 deletions src/hooks/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ export const isElectron = window.navigator.userAgent.includes('Electron');
export const isMac = window.navigator.appVersion.includes('Mac');

const urlBranchMap: Record<string, string> = {
'alpha/makerdao': 'deployments/staging/makerdao',
'alpha/arbitrum': 'arb-ltip',
'alpha/powerhouse': 'staging',
'staging/makerdao': 'deployments/staging/makerdao',
'staging/arbitrum': 'arb-ltip',
'staging/powerhouse': 'staging',
makerdao: 'deployments/makerdao',
arbitrum: 'deployments/arbitrum',
arbgrants: 'deployments/arbitrum',
Expand Down Expand Up @@ -40,5 +40,10 @@ const fetchLatestVersion = async () => {

export const isLatestVersion = async () => {
const deployed = await fetchLatestVersion();
return !deployed || deployed === currentVersion;

if (deployed) {
return deployed === currentVersion;
}

return null;
};

0 comments on commit 151fc74

Please sign in to comment.