small fixes
This commit is contained in:
parent
ccad1015f3
commit
e256ed4754
|
@ -153,8 +153,8 @@ export default function MarginBalances() {
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{selectedMangoGroupConfig.tokens.map(({ symbol, mint_key }) => {
|
||||
const tokenIndex = selectedMangoGroup.getTokenIndex(mint_key)
|
||||
{selectedMangoGroupConfig.tokens.map(({ symbol, mintKey }) => {
|
||||
const tokenIndex = selectedMangoGroup.getTokenIndex(mintKey)
|
||||
return (
|
||||
<tr key={symbol} className={`text-th-fgd-1`}>
|
||||
<td className={`flex items-center py-2`}>
|
||||
|
|
|
@ -32,7 +32,7 @@ const MarketSelect = () => {
|
|||
}
|
||||
`}
|
||||
onClick={() => handleChange(s.baseSymbol, 'perp')}
|
||||
key={s.key.toBase58()}
|
||||
key={s.publicKey.toBase58()}
|
||||
>
|
||||
{s.name}
|
||||
</div>
|
||||
|
@ -48,7 +48,7 @@ const MarketSelect = () => {
|
|||
}
|
||||
`}
|
||||
onClick={() => handleChange(s.baseSymbol, 'spot')}
|
||||
key={s.key.toBase58()}
|
||||
key={s.publicKey.toBase58()}
|
||||
>
|
||||
{s.name}
|
||||
</div>
|
||||
|
|
|
@ -30,7 +30,7 @@ const NewAccount: FunctionComponent<NewAccountProps> = ({
|
|||
onAccountCreation,
|
||||
}) => {
|
||||
const groupConfig = useMangoGroupConfig()
|
||||
// const tokenMints = useMemo(() => groupConfig.tokens.map(t => t.mint_key.toBase58()), [groupConfig]);
|
||||
// const tokenMints = useMemo(() => groupConfig.tokens.map(t => t.mintKey.toBase58()), [groupConfig]);
|
||||
const [inputAmount, setInputAmount] = useState(0)
|
||||
const [submitting, setSubmitting] = useState(false)
|
||||
const [invalidAmountMessage, setInvalidAmountMessage] = useState('')
|
||||
|
|
|
@ -38,7 +38,7 @@ const useHydrateStore = () => {
|
|||
if (marketConfig.kind === 'spot') {
|
||||
Market.load(
|
||||
connection,
|
||||
marketConfig.key,
|
||||
marketConfig.publicKey,
|
||||
{},
|
||||
groupConfig.serumProgramId
|
||||
)
|
||||
|
@ -62,7 +62,7 @@ const useHydrateStore = () => {
|
|||
})
|
||||
})
|
||||
} else {
|
||||
mangoClient.getPerpMarket(marketConfig.key).then(async (market) => {
|
||||
mangoClient.getPerpMarket(marketConfig.publicKey).then(async (market) => {
|
||||
const bidInfo = await connection.getAccountInfo(market.bids)
|
||||
const askInfo = await connection.getAccountInfo(market.asks)
|
||||
|
||||
|
|
|
@ -242,10 +242,10 @@ export async function decodeAndLoadMarkets(
|
|||
|
||||
console.log('decoded accs===', decodedAcc)
|
||||
const baseToken = groupConfig.tokens.find((token) =>
|
||||
token.mint_key.equals(decodedAcc.baseMint)
|
||||
token.mintKey.equals(decodedAcc.baseMint)
|
||||
)
|
||||
const quoteToken = groupConfig.tokens.find((token) =>
|
||||
token.mint_key.equals(decodedAcc.quoteMint)
|
||||
token.mintKey.equals(decodedAcc.quoteMint)
|
||||
)
|
||||
|
||||
const baseMintDecimals = baseToken.decimals
|
||||
|
|
Loading…
Reference in New Issue