Skip to content

Commit

Permalink
Merge pull request #315 from reflexer-labs/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
mstfash authored May 14, 2022
2 parents a56e006 + 4aad435 commit a4da518
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 20 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ jobs:
if: ${{ needs.bump_version.outputs.new_tag != null }}
env:
SOURCE_DIR: 'build'
AWS_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET_PRODUCTION }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
REACT_APP_GRAPH_API_URLS: ${{ secrets.REACT_APP_GRAPH_API_URLS_PRODUCTION }}
REACT_APP_NETWORK_ID: ${{ secrets.REACT_APP_NETWORK_ID_PRODUCTION }}
REACT_APP_NETWORK_URL: ${{ secrets.REACT_APP_NETWORK_URL_PRODUCTION }}
Expand All @@ -59,10 +55,13 @@ jobs:
- name: Build the IPFS bundle
run: yarn build

- name: Deploy to AWS
uses: jakejarvis/s3-sync-action@v0.5.0
- name: Deploy to Github Pages 🚀
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
args: --acl public-read --follow-symlinks --delete
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: build # The folder the action should deploy.
CLEAN: true # Automatically remove deleted files from the deploy branch

- name: Pin to IPFS
id: upload
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"easy-peasy": "^3.3.1",
"ethers": "^5.4.6",
"geb.js": "^1.1.37",
"gh-pages": "^4.0.0",
"i18next": "^19.7.0",
"jazzicon": "^1.5.0",
"jdenticon": "^3.0.1",
Expand Down
6 changes: 3 additions & 3 deletions src/components/AuctionsOperations/AuctionsPayment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,16 @@ const AuctionsPayment = () => {
}

const maxBid = (): string => {
const sellAmountBN = sellAmount
? BigNumber.from(toFixedString(sellAmount, 'RAD'))
: BigNumber.from('0')
const buyAmountBN = buyAmount
? auctionType === 'STAKED_TOKEN'
? parseRadToWad(buyAmount)
: BigNumber.from(toFixedString(buyAmount, 'WAD'))
: BigNumber.from('0')
const bidIncreaseBN = BigNumber.from(toFixedString(bidIncrease, 'WAD'))
if (auctionType === 'DEBT') {
const sellAmountBN = sellAmount
? BigNumber.from(toFixedString(sellAmount, 'WAD'))
: BigNumber.from('0')
if (bids.length === 0) {
if (isOngoingAuction) {
// We need to bid 3% less than the current best bid
Expand Down
7 changes: 2 additions & 5 deletions src/components/SafeStats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,7 @@ const SafeStats = ({
const collateralInUSD = useTokenBalanceInUSD('ETH', collateral as string)
const totalDebtInUSD = useTokenBalanceInUSD('RAI', totalDebt as string)

const liquidationPenalty = getRatePercentage(
singleSafe?.liquidationPenalty || '1',
0
)
const liquidationPenalty = '18-20'

const raiPrice = singleSafe
? formatNumber(singleSafe.currentRedemptionPrice, 3)
Expand Down Expand Up @@ -284,7 +281,7 @@ const SafeStats = ({
<InfoIcon data-tip={t('liquidation_penalty_tip')}>
<Info size="16" />
</InfoIcon>
<SideTitle>Liquidation Penalty</SideTitle>
<SideTitle>Total Liquidation Penalty</SideTitle>
<SideValue>{`${liquidationPenalty}%`}</SideValue>
</Side>

Expand Down
6 changes: 2 additions & 4 deletions src/hooks/useSafe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,7 @@ export function useSafeInfo(type: SafeTypes = 'create') {
return '0.00'
}, [leftInput, liquidationData, singleSafe, type])

const liquidationPenaltyPercentage = useMemo(() => {
return getRatePercentage(liquidationData.liquidationPenalty, 0)
}, [liquidationData])
const liquidationPenaltyPercentage = '18-20'

const stabilityFeePercentage = useMemo(() => {
return liquidationData.totalAnnualizedStabilityFee
Expand Down Expand Up @@ -203,7 +201,7 @@ export function useSafeInfo(type: SafeTypes = 'create') {
],
info: [
{
label: 'Liquidation Penalty',
label: 'Total Liquidation Penalty',
value: liquidationPenaltyPercentage + '%',
tip: t('liquidation_penalty_tip'),
},
Expand Down
2 changes: 1 addition & 1 deletion src/utils/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"my_stake_tip": "This is the percentage of the earned rewards which can be claimed immediately. The remainder is locked until the end of the campaign. Once the campaign ends, the remained will be unlocked linearly until {{date}}",
"annual_redemption_tip": "Rate at which RAI is devalued or revalued over 1 year.",
"liquidation_price_tip": "ETH price under which this Safe can get liquidated ( Liquidation Ratio: {{lr}} ). ⚠️ The liquidation price varies with the redemption price.",
"liquidation_penalty_tip": "This is a fee you pay in case your Safe gets liquidated. The fee is added on top of your Safe's debt during liquidation, resulting in more Safe collateral being sold.",
"liquidation_penalty_tip": "Liquidations ask for 10% more RAI than you have minted in your Safe and apply a 8-10% discount on the latest ETH oracle price in order to incentivize bidding.",
"app": "App",
"fullyUnlocked": "You can claim all your FLX rewards right after you earn them.",
"proxy_wallet_text": "Your wallet is connected! Now, let's create your Reflexer Account",
Expand Down

0 comments on commit a4da518

Please sign in to comment.