Run prettier on production branch and pre-commit (#419)
* Run Prettier * Enable CI checks for production branch, add prettier to pre-commit hook
This commit is contained in:
parent
503356378e
commit
61a3f4e1c4
|
@ -7,7 +7,7 @@ on:
|
|||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
branches: [main, production]
|
||||
|
||||
# Option to configure as a scheduled action to monitor for drift in code
|
||||
# schedule:
|
||||
|
|
|
@ -7,7 +7,7 @@ on:
|
|||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
branches: [main, production]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
|
|
@ -7,7 +7,7 @@ on:
|
|||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
branches: [main, production]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
yarn lint-all
|
||||
yarn lint-all && yarn prettier --check .
|
||||
|
|
|
@ -62,11 +62,11 @@ export default function useFees(): {
|
|||
? mangoGroup.refMngoRequired.toNumber() /
|
||||
Math.pow(10, mngoConfig.baseDecimals)
|
||||
: null
|
||||
// @ts-ignore
|
||||
const refMngoTier2Factor = mangoGroup.refMngoTier2Factor == 0 ? 1 : mangoGroup.refMngoTier2Factor
|
||||
const refMngoTier2Factor =
|
||||
// @ts-ignore
|
||||
mangoGroup.refMngoTier2Factor == 0 ? 1 : mangoGroup.refMngoTier2Factor
|
||||
const mngoRequiredTier2 = mngoConfig
|
||||
|
||||
? mangoGroup.refMngoRequired.toNumber() * refMngoTier2Factor /
|
||||
? (mangoGroup.refMngoRequired.toNumber() * refMngoTier2Factor) /
|
||||
Math.pow(10, mngoConfig.baseDecimals)
|
||||
: null
|
||||
|
||||
|
@ -81,8 +81,14 @@ export default function useFees(): {
|
|||
|
||||
const hasReferrer = useMangoStore.getState().referrerPk
|
||||
|
||||
if (typeof mngoRequiredTier1 === 'number' && mngoBalance >= mngoRequiredTier1) {
|
||||
if(typeof mngoRequiredTier2 === 'number' && mngoBalance >= mngoRequiredTier2) {
|
||||
if (
|
||||
typeof mngoRequiredTier1 === 'number' &&
|
||||
mngoBalance >= mngoRequiredTier1
|
||||
) {
|
||||
if (
|
||||
typeof mngoRequiredTier2 === 'number' &&
|
||||
mngoBalance >= mngoRequiredTier2
|
||||
) {
|
||||
discount = refSurchargeTier2
|
||||
} else {
|
||||
discount = refSurchargeTier1
|
||||
|
|
|
@ -33,8 +33,12 @@ export async function getStaticProps({ locale }) {
|
|||
export default function Fees() {
|
||||
const { t } = useTranslation('common')
|
||||
const { totalSrm, totalMsrm, rates } = useSrmAccount()
|
||||
const { takerFeeBeforeDiscount, takerFeeWithTier1Discount, takerFeeWithTier2Discount, makerFee } =
|
||||
useFees()
|
||||
const {
|
||||
takerFeeBeforeDiscount,
|
||||
takerFeeWithTier1Discount,
|
||||
takerFeeWithTier2Discount,
|
||||
makerFee,
|
||||
} = useFees()
|
||||
const { connected } = useWallet()
|
||||
const [showDeposit, setShowDeposit] = useState(false)
|
||||
const [showWithdraw, setShowWithdraw] = useState(false)
|
||||
|
|
|
@ -40,7 +40,10 @@ import {
|
|||
} from '../components/SettingsModal'
|
||||
import { MSRM_DECIMALS } from '@project-serum/serum/lib/token-instructions'
|
||||
import { decodeBook } from '../hooks/useHydrateStore'
|
||||
import { IExecutionLineAdapter, IOrderLineAdapter } from '../public/charting_library/charting_library'
|
||||
import {
|
||||
IExecutionLineAdapter,
|
||||
IOrderLineAdapter,
|
||||
} from '../public/charting_library/charting_library'
|
||||
import { Wallet } from '@solana/wallet-adapter-react'
|
||||
import { coingeckoIds, fetchNftsFromHolaplexIndexer } from 'utils/tokens'
|
||||
import bs58 from 'bs58'
|
||||
|
|
Loading…
Reference in New Issue