From f5637f85a16ced56968cd9b6216507df773fd775 Mon Sep 17 00:00:00 2001 From: bartosz-lipinski <264380+bartosz-lipinski@users.noreply.github.com> Date: Thu, 26 Nov 2020 20:18:08 -0600 Subject: [PATCH] feat: new program id --- src/constants/ids.tsx | 5 +++++ src/contexts/connection.tsx | 8 ++++---- src/views/dashboard/index.tsx | 11 ++++------- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/constants/ids.tsx b/src/constants/ids.tsx index 0f37eb9..d5a6765 100644 --- a/src/constants/ids.tsx +++ b/src/constants/ids.tsx @@ -13,6 +13,11 @@ export let LENDING_PROGRAM_ID = new PublicKey( export const setProgramIds = (envName: string) => { // Add dynamic program ids + if(envName === 'mainnet-beta') { + LENDING_PROGRAM_ID = new PublicKey('2KfJP7pZ6QSpXa26RmsN6kKVQteDEdQmizLSvuyryeiW'); + } + + }; export const programIds = () => { diff --git a/src/contexts/connection.tsx b/src/contexts/connection.tsx index 8778473..90eaf0a 100644 --- a/src/contexts/connection.tsx +++ b/src/contexts/connection.tsx @@ -20,14 +20,14 @@ export type ENV = | "lending"; export const ENDPOINTS = [ - { - name: "lending" as ENV, - endpoint: "https://tln.solana.com", - }, { name: "mainnet-beta" as ENV, endpoint: "https://solana-api.projectserum.com/", }, + { + name: "lending" as ENV, + endpoint: "https://tln.solana.com", + }, { name: "testnet" as ENV, endpoint: clusterApiUrl("testnet") }, { name: "devnet" as ENV, endpoint: clusterApiUrl("devnet") }, { name: "localnet" as ENV, endpoint: "http://127.0.0.1:8899" }, diff --git a/src/views/dashboard/index.tsx b/src/views/dashboard/index.tsx index f27ccac..a98dbef 100644 --- a/src/views/dashboard/index.tsx +++ b/src/views/dashboard/index.tsx @@ -11,34 +11,31 @@ export const DashboardView = () => { return (
-
+ {userDeposits.length > 0 && (
{LABELS.DASHBOARD_TITLE_DEPOSITS} - {userDeposits.length > 0 && (
{LABELS.TABLE_TITLE_DEPOSIT_BALANCE}
{LABELS.TABLE_TITLE_LOAN_BALANCE}
{LABELS.TABLE_TITLE_APY}
{LABELS.TABLE_TITLE_ACTION}
- )} {userDeposits.map((deposit) => ( ))} -
-
+
)} + {userObligations.length > 0 && (
{LABELS.DASHBOARD_TITLE_LOANS} - {userObligations.length > 0 && (
{LABELS.TABLE_TITLE_ASSET}
{LABELS.TABLE_TITLE_LOAN_BALANCE}
{LABELS.TABLE_TITLE_APY}
{LABELS.TABLE_TITLE_ACTION}
- )} {userObligations.map((item) => { return ; })}
+ )}
); };