Skip to content

Commit

Permalink
adding ipfs alias to the release workflow, fix min RAI amount per saf…
Browse files Browse the repository at this point in the history
…e fetch method
  • Loading branch information
mstfash committed Aug 18, 2022
1 parent a6419e1 commit f2a3469
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,14 @@ jobs:
The latest release is always accessible via our alias to the Cloudflare at [app.reflexer.finance](https://app.reflexer.finance).
You can also access the Reflexer app directly from an IPFS gateway.
You can also access the Reflexer app directly from an IPFS the Cloudflare IPFS gateway at [ipfs.reflexer.finance](https://ipfs.reflexer.finance).
**BEWARE**: The Reflexer app uses [`localStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) to remember your settings, such as transactions hashes.
**You should always use an IPFS gateway that enforces origin separation**, or our alias to the latest release
**You should always use an IPFS gateway that enforces origin separation**, or our ipfs alias to the latest release
IPFS gateways:
- https://${{ steps.convert_cidv0.outputs.cidv1 }}.ipfs.dweb.link/
- https://${{ steps.convert-cidv0.outputs.cidv1 }}.ipfs.cf-ipfs.com/
- [ipfs://${{ steps.upload.outputs.hash }}/](ipfs://${{ steps.upload.outputs.hash }}/)
${{ needs.bump_version.outputs.changelog }}
35 changes: 16 additions & 19 deletions src/components/StepsContent.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import React, { useEffect, useState } from 'react'
import React, { useEffect, useMemo, useState } from 'react'
import { AlertCircle, Circle, X } from 'react-feather'
import { useTranslation } from 'react-i18next'
import styled from 'styled-components'
import _ from '../utils/lodash'
import { useStoreState } from '../store'
import Button from './Button'
import { formatNumber } from '../utils/helper'
import { useActiveWeb3React } from '../hooks'
import { utils } from 'geb.js'
import { parseRad } from '../utils/gebManager'
import { geb } from '../utils/constants'
import { geb as gebNode } from '../utils/constants'
import Loader from './Loader'
import useGeb from 'src/hooks/useGeb'

interface Props {
title: string
Expand All @@ -33,28 +32,26 @@ const StepsContent = ({
isLoading,
id,
}: Props) => {
const geb = useGeb()
const { t } = useTranslation()
const { account } = useActiveWeb3React()
const [debtFloor, setDebtFloor] = useState('')
const { safeModel: safeState } = useStoreState((state) => state)

const [isOpen, setIsOpen] = useState(true)

const debtFloorVal = _.get(safeState, 'liquidationData.debtFloor', '0')

useEffect(() => {
async function getDebtFloor() {
const res = await geb.contracts.safeEngine.collateralTypes(
utils.ETH_A
)
setDebtFloor(parseRad(res.debtFloor))
}
const gebCall = useMemo(() => {
if (account) {
setDebtFloor(debtFloorVal)
} else {
getDebtFloor()
return geb
}
}, [account, debtFloorVal])
return gebNode
}, [account, geb])

useEffect(() => {
if (!gebCall) return
gebCall.contracts.safeEngine
.collateralTypes(utils.ETH_A)
.then((res) => setDebtFloor(parseRad(res.debtFloor)))
.catch((e) => console.log(e))
}, [gebCall])

const handleOpenState = () => setIsOpen(!isOpen)

Expand Down

0 comments on commit f2a3469

Please sign in to comment.