Skip to content

Commit

Permalink
Merge pull request #140 from reflexer-labs/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
mstfash authored Mar 19, 2021
2 parents 43b736c + 3af9c75 commit 5b7c586
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
5 changes: 4 additions & 1 deletion src/components/SafeOperations/SafeBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,10 @@ const SafeBody = ({ isChecked }: Props) => {
accumulatedRate
)

const liquidationPenaltyPercentage = getRatePercentage(liquidationPenalty)
const liquidationPenaltyPercentage = getRatePercentage(
liquidationPenalty,
0
)
const liquidationPrice = getLiquidationPrice(
totalCollateral,
totalDebt,
Expand Down
9 changes: 8 additions & 1 deletion src/containers/OnBoarding/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const OnBoarding = ({ ...props }) => {
/>
</HeaderContainer>
{(account && !safeState.safeCreated) || !isOwner ? (
<BtnContainer>
<BtnContainer className="top-up">
<Button
disabled={connectWalletState.isWrongNetwork}
onClick={() =>
Expand Down Expand Up @@ -161,6 +161,13 @@ const BtnContainer = styled.div`
min-width: 100px;
padding: 4px 12px;
}
${({ theme }) => theme.mediaWidth.upToSmall`
position: static;
margin-bottom:20px;
&.top-up {
display:none;
}
`}
`

const BtnInner = styled.div`
Expand Down
4 changes: 2 additions & 2 deletions src/utils/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const getEtherscanLink = (
}
}
}
// console.log('test for deployment')

export const amountToFiat = (balance: number, fiatPrice: number) => {
return (balance * fiatPrice).toFixed(4)
}
Expand All @@ -59,7 +59,7 @@ export const formatNumber = (value: string, digits = 4, round = false) => {
if (!value) {
return '0'
}
const n = Number(value.slice(0, 6))
const n = Number(value)
if (Number.isInteger(n) || value.length < 5) {
return n
}
Expand Down
4 changes: 2 additions & 2 deletions src/utils/queries/safe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ systemState(id: "current") {
}`

export const getUserSafesListQuery = (address: string) => `{
safes(where: { owner: "${address}", proxy_not: null, safeId_not: null }) {
safes(where: { owner: "${address}", proxy_contains: "0x", safeId_not: null }) {
safeId
safeHandler
collateral
Expand All @@ -47,7 +47,7 @@ export const getUserSafesListQuery = (address: string) => `{
}`

export const getSafeByIdQuery = (safeId: string, address: string) => `{
safes(where: { safeId: "${safeId}" , proxy_not: null, safeId_not: null}) {
safes(where: { safeId: "${safeId}" , proxy_contains: "0x", safeId_not: null}) {
safeId
collateral
createdAt
Expand Down

0 comments on commit 5b7c586

Please sign in to comment.