Skip to content

Commit

Permalink
feat: update new pool
Browse files Browse the repository at this point in the history
  • Loading branch information
pancake-swap committed Nov 7, 2020
1 parent 02f0b76 commit 44c2266
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 12 deletions.
File renamed without changes
Binary file removed public/images/tokens/category-nar.png
Binary file not shown.
Binary file removed public/images/tokens/category-nya.png
Binary file not shown.
Binary file removed public/images/tokens/category-stax.png
Binary file not shown.
3 changes: 2 additions & 1 deletion src/hooks/useAllStakedValue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const useAllStakedValue = () => {
const sushi = useSushi()
const farms = getFarms(sushi)
const masterChefContract = getMasterChefContract(sushi)

const wethContact = getWethContract(sushi)
const block = useBlock()

Expand All @@ -53,7 +54,7 @@ const useAllStakedValue = () => {
lpContract,
tokenContract,
pid,
tokenSymbol
tokenSymbol,
),
),
)
Expand Down
4 changes: 2 additions & 2 deletions src/sushi/lib/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ export const supportedPools = [
56: '0xe64f5cb844946c1f102bd25bbd87a5ab4ae89fbe',
},
name: 'ROOBEE STAKING',
symbol: 'ROOBEE-CAKE FLIP',
symbol: 'bROOBEE-CAKE FLIP',
tokenSymbol: 'bROOBEE',
icon: '🥞',
multiplier: '0.2X',
Expand Down Expand Up @@ -991,7 +991,7 @@ export const forShowPools = [
},
{
pid: 38,
symbol: 'ROOBEE-CAKE',
symbol: 'bROOBEE-CAKE',
tokenSymbol: 'bROOBEE',
multiplier: '0.2X',
isCommunity: true,
Expand Down
8 changes: 1 addition & 7 deletions src/sushi/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ export const getTotalStaked = async (sushi, sousChefContract) => {
const sushiBalance = await sushi2.methods
.balanceOf(sousChefContract.options.address)
.call()
console.log(sushiBalance)
return syrupBalance > sushiBalance ? syrupBalance : sushiBalance
}

Expand Down Expand Up @@ -184,7 +183,6 @@ export const stake = async (masterChefContract, pid, amount, account) => {
)
.send({ from: account })
.on('transactionHash', (tx) => {
console.log(tx)
return tx.transactionHash
})
}
Expand Down Expand Up @@ -217,7 +215,6 @@ export const unstake = async (masterChefContract, pid, amount, account) => {
)
.send({ from: account })
.on('transactionHash', (tx) => {
console.log(tx)
return tx.transactionHash
})
}
Expand Down Expand Up @@ -249,7 +246,6 @@ export const sousUnstake = async (sousChefContract, amount, account) => {
.withdraw(new BigNumber(amount).times(new BigNumber(10).pow(18)).toString())
.send({ from: account })
.on('transactionHash', (tx) => {
console.log(tx)
return tx.transactionHash
})
}
Expand All @@ -263,7 +259,6 @@ export const sousEmegencyUnstake = async (
.emergencyWithdraw()
.send({ from: account })
.on('transactionHash', (tx) => {
console.log(tx)
return tx.transactionHash
})
}
Expand Down Expand Up @@ -310,7 +305,7 @@ export const getSousStaked = async (sousChefContract, account) => {
const { amount } = await sousChefContract.methods.userInfo(account).call()
return new BigNumber(amount)
} catch (err) {
console.log(err)
console.err(err)
return new BigNumber(0)
}
}
Expand Down Expand Up @@ -339,7 +334,6 @@ export const redeem = async (masterChefContract, account) => {
.exit()
.send({ from: account })
.on('transactionHash', (tx) => {
console.log(tx)
return tx.transactionHash
})
} else {
Expand Down
11 changes: 9 additions & 2 deletions src/views/Farms/components/FarmCards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const FarmCards: React.FC<FarmCardsProps> = ({ removed }) => {
: farms.filter((farm) => farm.pid !== 0 && farm.multiplier === '0X')
const bnbPrice = useBnbPrice()

// temp fix
// temp fix
const staxBalance = useTokenBalance2(
'0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82',
'0x7cd05f8b960ba071fdf69c750c0e5a57c8366500',
Expand All @@ -78,6 +78,10 @@ const FarmCards: React.FC<FarmCardsProps> = ({ removed }) => {
'0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82',
'0x2730bf486d658838464a4ef077880998d944252d',
)
const bROOBEEBalance = useTokenBalance2(
'0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82',
'0x970858016C963b780E06f7DCfdEf8e809919BcE8',
)

const rows = realFarms.reduce<FarmWithStakedValue[][]>((accum, farm) => {
const stakedValueItem = stakedValueById[farm.pid]
Expand Down Expand Up @@ -110,7 +114,10 @@ const FarmCards: React.FC<FarmCardsProps> = ({ removed }) => {
apy = calculateCommunityApy(narBalance)
} else if (farm.tokenSymbol === 'NYA') {
apy = calculateCommunityApy(nyaBalance)
} else if (farm.tokenSymbol === 'HARD') {
} else if (farm.tokenSymbol === 'bROOBEE') {
apy = calculateCommunityApy(bROOBEEBalance)
}
else if (farm.tokenSymbol === 'HARD') {
// TODO: Refactor APY for dual farm
const cakeApy =
stakedValueItem &&
Expand Down

0 comments on commit 44c2266

Please sign in to comment.