diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 000000000..a829ccb1f
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,78 @@
+# Contributor Covenant Code of Conduct
+
+This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as
+contributors and maintainers pledge to making participation in our project and
+our community a harassment-free experience for everyone, regardless of age, body
+size, disability, ethnicity, sex characteristics, gender identity and expression,
+level of experience, education, socio-economic status, nationality, personal
+appearance, race, religion, or sexual identity and orientation.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment
+include:
+
+* Using welcoming and inclusive language
+* Being respectful of differing viewpoints and experiences
+* Gracefully accepting constructive criticism
+* Focusing on what is best for the community
+* Showing empathy towards other community members
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery and unwelcome sexual attention or
+ advances
+* Trolling, insulting/derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or electronic
+ address, without explicit permission
+* Other conduct which could reasonably be considered inappropriate in a
+ professional setting
+
+## Our Responsibilities
+
+Project maintainers are responsible for clarifying the standards of acceptable
+behavior and are expected to take appropriate and fair corrective action in
+response to any instances of unacceptable behavior.
+
+Project maintainers have the right and responsibility to remove, edit, or
+reject comments, commits, code, wiki edits, issues, and other contributions
+that are not aligned to this Code of Conduct, or to ban temporarily or
+permanently any contributor for other behaviors that they deem inappropriate,
+threatening, offensive, or harmful.
+
+## Scope
+
+This Code of Conduct applies both within project spaces and in public spaces
+when an individual is representing the project or its community. Examples of
+representing a project or community include using an official project e-mail
+address, posting via an official social media account, or acting as an appointed
+representative at an online or offline event. Representation of a project may be
+further defined and clarified by project maintainers.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be
+reported by contacting the project team at community@sovryn.app. All
+complaints will be reviewed and investigated and will result in a response that
+is deemed necessary and appropriate to the circumstances. The project team is
+obligated to maintain confidentiality with regard to the reporter of an incident.
+Further details of specific enforcement policies may be posted separately.
+
+Project maintainers who do not follow or enforce the Code of Conduct in good
+faith may face temporary or permanent repercussions as determined by other
+members of the project's leadership.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
+available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
+
+[homepage]: https://www.contributor-covenant.org
+
+For answers to common questions about this code of conduct, see
+https://www.contributor-covenant.org/faq
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 000000000..5bf29ad7d
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,45 @@
+## Contributing
+
+
+
+
+
+### Bug Reports
+
+To encourage active collaboration, Sovryn strongly encourages pull requests, not just bug reports. "Bug reports" may also be sent in the form of a pull request containing a failing test.
+
+However, if you file a bug report, your issue should contain a title and a clear description of the issue. You should also include as much relevant information as possible. The goal of a bug report is to make it easy for yourself - and others - to replicate the bug and develop a fix.
+
+Remember, bug reports are created in the hope that others with the same problem will be able to collaborate with you on solving it. Do not expect that the bug report will automatically see any activity or that others will jump to fix it. Creating a bug report serves to help yourself and others start on the path of fixing the problem. If you want to chip in, you can help out by fixing any bugs listed in our [issue trackers](https://github.com/issues?q=is%3Aopen+is%3Aissue+label%3Abug+user%3Adistributedcollective).
+
+### Support Questions
+
+Sovryn's GitHub issue trackers are not intended to provide help or support. Instead, use one of the following channels:
+
+- [Discord](https://discord.gg/J22WS6z)
+- [Gitbook Tutorials](https://sovryn-1.gitbook.io/sovryn)
+- [Sovryn Blog](https://sovryn.app/blog/)
+
+### Core Development Discussion
+
+You may propose new features or improvements of existing dapp behavior in the Sovryn Ideas issue board. If you propose a new feature, please be willing to implement at least some of the code that would be needed to complete the feature.
+
+Informal discussion regarding bugs, new features, and implementation of existing features takes place in the #sorcery channel of the Sovryn Discord server.
+
+### Which Branch?
+
+**All** bug fixes should be sent to the latest stable (master) branch. Bug fixes should never be sent to the development branch unless they fix features that exist only in the upcoming release.
+
+**Minor** features that are fully backward compatible with the current release may be sent to the latest stable branch.
+
+**Major** new features should always be sent to the development branch, which contains the upcoming release.
+
+If you are unsure if your feature qualifies as a major or minor, please ask Victor Creed in the #sorcery channel of the Sovryn Discord server.
+
+### Working With UI
+
+All UI designs used for this repository should be available publically in [Google Drive folder as Adobe XD files](https://drive.google.com/drive/folders/1e_VljWpANJe0o4VmIkKU5Ewo56l9iMaM?usp=sharing)
+
+## Security Vulnerabilities
+
+If you discover a security vulnerability within DApp, please send an e-mail to Victor Creed via creed-victor@protonmail.com. All security vulnerabilities will be promptly addressed.
diff --git a/README.md b/README.md
index 91b67e654..656cdf76b 100644
--- a/README.md
+++ b/README.md
@@ -62,6 +62,10 @@ Informal discussion regarding bugs, new features, and implementation of existing
If you are unsure if your feature qualifies as a major or minor, please ask Victor Creed in the #sorcery channel of the Sovryn Discord server.
+### Working With UI
+
+All UI designs used for this repository should be available publically in [Google Drive folder as Adobe XD files](https://drive.google.com/drive/folders/1e_VljWpANJe0o4VmIkKU5Ewo56l9iMaM?usp=sharing)
+
## Security Vulnerabilities
If you discover a security vulnerability within DApp, please send an e-mail to Victor Creed via creed-victor@protonmail.com. All security vulnerabilities will be promptly addressed.
diff --git a/src/app/components/BorrowInterestRate/index.tsx b/src/app/components/BorrowInterestRate/index.tsx
index c318ee136..65de3a608 100644
--- a/src/app/components/BorrowInterestRate/index.tsx
+++ b/src/app/components/BorrowInterestRate/index.tsx
@@ -3,12 +3,8 @@
* BorrowInterestRate
*
*/
-import React, { useEffect, useState } from 'react';
-import { bignumber } from 'mathjs';
-import { Asset } from 'types/asset';
+import React from 'react';
import { weiToFixed } from 'utils/blockchain/math-helpers';
-import { useLending_nextBorrowInterestRate } from 'app/hooks/trading/useLending_nextBorrowInterestRate';
-import { usePriceFeeds_QueryRate } from 'app/hooks/price-feeds/useQueryRate';
import { LoadableValue } from '../LoadableValue';
import { FieldGroup } from '../FieldGroup';
import { DummyField } from '../DummyField';
@@ -16,59 +12,17 @@ import { useTranslation } from 'react-i18next';
import { translations } from '../../../locales/i18n';
interface Props {
- asset: Asset;
- collateral: Asset;
- leverage: number;
- weiAmount: string;
+ value: string;
+ loading: boolean;
labelColor: string;
}
-export function BorrowInterestRate(props: Props) {
+export function BorrowInterestRate({ value, loading, labelColor }: Props) {
const { t } = useTranslation();
- const { value: result } = usePriceFeeds_QueryRate(
- props.collateral,
- props.asset,
- );
-
- const [totalDeposit, setTotalDeposit] = useState('0');
- const [borrowAmount, setBorrowAmount] = useState(totalDeposit);
-
- // Calculate loan tokens we depositing.
- useEffect(() => {
- let _totalDeposit = '0'; // loanTo
- // let totalDeposit = props.loanTokenSent;
-
- if (props.weiAmount !== '0') {
- // props.collateralTokenSent != '0'
- if (result.rate !== '0') {
- _totalDeposit = bignumber(props.weiAmount)
- .mul(result.rate)
- .div(result.precision)
- .add(_totalDeposit)
- .toFixed(0);
- }
- }
- setTotalDeposit(_totalDeposit);
- // eslint-disable-next-line
- }, [JSON.stringify(result), props]);
-
- useEffect(() => {
- setBorrowAmount(
- bignumber(totalDeposit)
- .mul(props.leverage - 1)
- .toFixed(0),
- );
- }, [totalDeposit, props.leverage]);
-
- const { value, loading } = useLending_nextBorrowInterestRate(
- props.asset,
- borrowAmount,
- );
-
return (
void;
+ inputFocus?: boolean;
}
export function FormSelect(props: Props) {
@@ -46,6 +48,9 @@ export function FormSelect(props: Props) {
({ open: open }))`
+ display: flex;
+ flex-direction: column;
+ justify-content: flex-start;
+ background: black;
+ transform: ${({ open }) => (open ? 'translateX(0)' : 'translateX(-100%)')};
+ height: 100%;
+ text-align: left;
+ padding: 4rem 2rem 2rem;
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ transition: transform 0.3s ease-in-out;
+ z-index: 9;
+ width: 100%;
+ li {
+ list-style-type: none;
+ }
+ a {
+ font-size: 1.2rem;
+ text-transform: uppercase;
+ padding: 1.5rem 0;
+ font-weight: bold;
+ letter-spacing: 0.5rem;
+ color: white;
+ text-decoration: none;
+ transition: color 0.3s linear;
+ text-align: center;
+ }
+ `;
+ const StyledBurger = styled.button.attrs(_ => ({ open: open }))`
+ position: absolute;
+ top: 1.3rem;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+ width: 2rem;
+ height: 2rem;
+ background: transparent;
+ border: none;
+ cursor: pointer;
+ padding: 0;
+ z-index: 10;
+ &:focus {
+ outline: none;
+ }
+
+ div {
+ width: 2rem;
+ height: 0.25rem;
+ background: white;
+ border-radius: 10px;
+ transition: all 0.3s linear;
+ position: relative;
+ transform-origin: 1px;
+ :first-child {
+ transform: ${({ open }) => (open ? 'rotate(45deg)' : 'rotate(0)')};
+ }
+ :nth-child(2) {
+ opacity: ${({ open }) => (open ? '0' : '1')};
+ transform: ${({ open }) =>
+ open ? 'translateX(20px)' : 'translateX(0)'};
+ }
+ :nth-child(3) {
+ transform: ${({ open }) => (open ? 'rotate(-45deg)' : 'rotate(0)')};
+ }
+ }
+ `;
+ const Menu = ({ open, setOpen }) => {
+ return {menuItems};
+ };
+ const Burger = ({ open, setOpen }) => {
+ return (
+ setOpen(!open)}>
+
+
+
+
+ );
+ };
const pages = [
{ to: '/', title: t(translations.mainMenu.trade), exact: true },
{ to: '/lend', title: t(translations.mainMenu.lend) },
{ to: '/liquidity', title: t(translations.mainMenu.liquidity) },
{ to: '/wallet', title: t(translations.mainMenu.wallet) },
- t(translations.mainMenu.stats),
+ { to: '/stats', title: t(translations.mainMenu.stats) },
{
to: 'https://sovryn-1.gitbook.io/sovryn/',
title: t(translations.mainMenu.faqs),
},
];
-
const menuItems = pages.map((item, index) => {
let link: {
to: string;
@@ -42,14 +124,6 @@ export function Header() {
onClick?: () => void;
} = item as any;
- if (typeof item === 'string') {
- link = {
- to: `/${item.toLowerCase()}`,
- title: item,
- exact: false,
- };
- }
-
if (link.to.startsWith('http')) {
return (