From 0b7f00adaaf9adf9d01196677d6a018b5b22b93f Mon Sep 17 00:00:00 2001 From: Kevin Heavey <24635973+kevinheavey@users.noreply.github.com> Date: Tue, 14 Jun 2022 09:18:58 +0100 Subject: [PATCH] Add foresight mainnet (#747) * add fore mainnet token mint * update foresight-sdk dep * add foresight mainnet treasury * update yarn.lock * add mainnet details for foresight dao * take out bad comma * update foresight token accounts filter --- components/instructions/tools.tsx | 4 +++- package.json | 2 +- public/realms/mainnet-beta.json | 9 +++++++++ utils/Foresight/index.tsx | 10 +++++++--- yarn.lock | 8 ++++---- 5 files changed, 24 insertions(+), 9 deletions(-) diff --git a/components/instructions/tools.tsx b/components/instructions/tools.tsx index e6cb49089c..7ade16c213 100644 --- a/components/instructions/tools.tsx +++ b/components/instructions/tools.tsx @@ -66,8 +66,10 @@ export const ACCOUNT_NAMES = { 'Mango v3 BTC-PERP Incentive Vault', '7Gm5zF6FNJpyhqdwKcEdMQw3r5YzitYUGVDKYMPT1cMy': 'Mango V3 Admin Key', MangoCzJ36AjZyKwVj3VnYU4GTonjfVEnJmvvWaxLac: 'MNGO Token Mint', - H7uqouPsJkeEiLpCEoC1qYVVquDrZan6ZfdPK2gS44zm: 'FORE Token Mint', + H7uqouPsJkeEiLpCEoC1qYVVquDrZan6ZfdPK2gS44zm: 'FORE Devnet Token Mint', + '4ahVJVavHM8DZCtjX6YuKSTFx6KJwRPmVCJtjdQYdUU7': 'FORE Mainnet Token Mint', [foresightGov.DEVNET_TREASURY.toBase58()]: 'Foresight Devnet Governance', + [foresightGov.MAINNET_TREASURY.toBase58()]: 'Foresight Mainnet Governance', EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v: 'USDC Token Mint', MyHd6a7HWKTMeJMHBkrbMq4hZwZxwn9x7dxXcopQ4Wd: 'OMH Token', diff --git a/package.json b/package.json index 928b01cea2..fdc97786ed 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "@emotion/react": "^11.9.0", "@emotion/styled": "^11.8.1", "@friktion-labs/friktion-sdk": "^1.1.118", - "@foresight-tmp/foresight-sdk": "^0.1.44", + "@foresight-tmp/foresight-sdk": "^0.1.45", "@headlessui/react": "^1.5.0", "@heroicons/react": "^1.0.1", "@marinade.finance/marinade-ts-sdk": "^2.0.9", diff --git a/public/realms/mainnet-beta.json b/public/realms/mainnet-beta.json index ddfb4990d7..8de60c7a1b 100644 --- a/public/realms/mainnet-beta.json +++ b/public/realms/mainnet-beta.json @@ -788,5 +788,14 @@ "website": "https://samoyedcoin.com", "twitter": "@Samo_DAO", "ogImage": "/realms/SamoDAO/SamoDAO.png" + }, + { + "symbol": "FORE", + "displayName": "Foresight DAO", + "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", + "realmId": "CZatgrcvaDN9ib1sQeSCJWUnBXc899ydTB9vfAHHBVfP", + "ogImage": "https://www.foresight.exchange/logo.png", + "website": "https://www.foresight.exchange/", + "twitter": "@foresightmkt" } ] diff --git a/utils/Foresight/index.tsx b/utils/Foresight/index.tsx index 9b683d3380..01d8a099aa 100644 --- a/utils/Foresight/index.tsx +++ b/utils/Foresight/index.tsx @@ -36,9 +36,13 @@ type SetFormErrors = Dispatch> export function getFilteredTokenAccounts(): AssetAccount[] { const { governedTokenAccountsWithoutNfts } = useGovernanceAssets() - return governedTokenAccountsWithoutNfts.filter((x) => - x.extensions.transferAddress?.equals(foresightGov.DEVNET_TREASURY) - ) + return governedTokenAccountsWithoutNfts.filter((x) => { + const transferAddress = x.extensions.transferAddress + return ( + transferAddress?.equals(foresightGov.DEVNET_TREASURY) || + transferAddress?.equals(foresightGov.MAINNET_TREASURY) + ) + }) } type HandleSetForm = ({ diff --git a/yarn.lock b/yarn.lock index 9b344c9caa..402364fedd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -886,10 +886,10 @@ lodash.isundefined "^3.0.1" lodash.uniq "^4.5.0" -"@foresight-tmp/foresight-sdk@^0.1.44": - version "0.1.44" - resolved "https://registry.yarnpkg.com/@foresight-tmp/foresight-sdk/-/foresight-sdk-0.1.44.tgz#b7fee32272a9f16fd12e93da1bcbba532bb90183" - integrity sha512-MMBGcfKIwcRrllih2IaOEdnSZuE0fYrNQcSJBAuwxG6ORknKShYHPqp2cRq5NEnNZS90I0AMzhpdDXv+N/302g== +"@foresight-tmp/foresight-sdk@^0.1.45": + version "0.1.46" + resolved "https://registry.yarnpkg.com/@foresight-tmp/foresight-sdk/-/foresight-sdk-0.1.46.tgz#f928dde22f424cfd438f8c9116d5ce84f5b56864" + integrity sha512-fqYnT+OrRDe84OWoDGow4KB5KYX/sRP+jg0Ylz0ExdNqoewK8gLmmAg6AvPc+B9ItAhcDhEBf0H/cGG6HpIQdw== dependencies: "@project-serum/anchor" "^0.23.0" "@project-serum/serum" "0.13.64"