-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wrapper: remove Agent v5 override (#430)
- Loading branch information
Showing
2 changed files
with
6 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,8 @@ | ||
import { addressesEqual } from '../../utils' | ||
|
||
const MAINNET_AGENT_REPO = '0x52AC38791EF1561b172Ca89d7115F178d058E57b' | ||
const MAINNET_UNLISTED_AGENT_V5 = '0x3A93C17FC82CC33420d1809dDA9Fb715cc89dd37' | ||
|
||
// This function is used to override how an app version should be loaded based on the base contract | ||
// address (codeAddress). | ||
// It may be useful in situations like: | ||
// - Resolving an unpublished app version to the latest published version | ||
// - Resolving an old app version to the latest published version (e.g. to force a frontend upgrade) | ||
export function shouldOverrideAppWithLatestVersion (repoAddress, codeAddress) { | ||
if ( | ||
addressesEqual(repoAddress, MAINNET_AGENT_REPO) && | ||
addressesEqual(codeAddress, MAINNET_UNLISTED_AGENT_V5) | ||
) { | ||
// Unlisted mainnet Agent v5 with NFT hotfix | ||
// See https://github.com/aragon/deployments/issues/176 | ||
return true | ||
} | ||
|
||
return false | ||
} |