diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e3e2024c..45a3fa55 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 }} @@ -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 diff --git a/package.json b/package.json index 50090a7b..5c754666 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/components/AuctionsOperations/AuctionsPayment.tsx b/src/components/AuctionsOperations/AuctionsPayment.tsx index a2e2f431..a5fa0d33 100644 --- a/src/components/AuctionsOperations/AuctionsPayment.tsx +++ b/src/components/AuctionsOperations/AuctionsPayment.tsx @@ -97,9 +97,6 @@ const AuctionsPayment = () => { } const maxBid = (): string => { - const sellAmountBN = sellAmount - ? BigNumber.from(toFixedString(sellAmount, 'RAD')) - : BigNumber.from('0') const buyAmountBN = buyAmount ? auctionType === 'STAKED_TOKEN' ? parseRadToWad(buyAmount) @@ -107,6 +104,9 @@ const AuctionsPayment = () => { : 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 diff --git a/src/components/SafeStats.tsx b/src/components/SafeStats.tsx index 0ef27eb0..deb875b5 100644 --- a/src/components/SafeStats.tsx +++ b/src/components/SafeStats.tsx @@ -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) @@ -284,7 +281,7 @@ const SafeStats = ({ - Liquidation Penalty + Total Liquidation Penalty {`${liquidationPenalty}%`} diff --git a/src/hooks/useSafe.ts b/src/hooks/useSafe.ts index 92a90742..8340c0e8 100644 --- a/src/hooks/useSafe.ts +++ b/src/hooks/useSafe.ts @@ -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 @@ -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'), }, diff --git a/src/utils/i18n/en.json b/src/utils/i18n/en.json index fb71c86d..f5fde040 100644 --- a/src/utils/i18n/en.json +++ b/src/utils/i18n/en.json @@ -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",