diff --git a/components/instructions/programs/mangoV4.tsx b/components/instructions/programs/mangoV4.tsx index d1f559276a..07169cdc5c 100644 --- a/components/instructions/programs/mangoV4.tsx +++ b/components/instructions/programs/mangoV4.tsx @@ -238,7 +238,6 @@ const instructions = () => ({ ]) const oracleData = await decodePriceFromOracleAi( - oracle, oracleAi!, connection, proposedOracle.type @@ -668,12 +667,36 @@ const instructions = () => ({ ], getDataUI: async ( connection: Connection, - data: Uint8Array - //accounts: AccountMetaData[] + data: Uint8Array, + accounts: AccountMetaData[] ) => { - const info = await displayArgs(connection, data) + const oracle = accounts[6].pubkey + + const [info, proposedOracle, oracleAi] = await Promise.all([ + displayArgs(connection, data), + getOracle(connection, oracle), + connection.getAccountInfo(oracle), + ]) + + const oracleData = await decodePriceFromOracleAi( + oracleAi!, + connection, + proposedOracle.type + ) try { - return