Merge pull request #339 from blockworks-foundation/lou/stub-oracle-enable
enable spot trading on stub oracle markets
This commit is contained in:
commit
4cc2ab5df8
|
@ -1,4 +1,5 @@
|
|||
import {
|
||||
OracleProvider,
|
||||
PerpMarket,
|
||||
PerpOrderSide,
|
||||
PerpOrderType,
|
||||
|
@ -377,10 +378,11 @@ const AdvancedTradeForm = () => {
|
|||
return selectedMarket.oracleLastUpdatedSlot !== 0
|
||||
} else if (selectedMarket instanceof Serum3Market) {
|
||||
return (
|
||||
baseBank?.oracleLastUpdatedSlot !== 0 &&
|
||||
(quoteBank?.name == 'USDC'
|
||||
? true
|
||||
: quoteBank?.oracleLastUpdatedSlot !== 0)
|
||||
baseBank?.oracleProvider == OracleProvider.Stub ||
|
||||
(baseBank?.oracleLastUpdatedSlot !== 0 &&
|
||||
(quoteBank?.name == 'USDC'
|
||||
? true
|
||||
: quoteBank?.oracleLastUpdatedSlot !== 0))
|
||||
)
|
||||
}
|
||||
}, [baseBank, quoteBank, selectedMarket])
|
||||
|
|
Loading…
Reference in New Issue