forked from purefinance/pure.finance
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6b2a9fa
commit 7d84a36
Showing
58 changed files
with
1,427 additions
and
335 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# NEXT_PUBLIC_CHAIN_ID=743111 # Change this in the patch file | ||
NEXT_PUBLIC_DEFAULT_COLLECTION_ID=0 | ||
NEXT_PUBLIC_NODE_URL=http://localhost:8545 | ||
# NEXT_PUBLIC_ANALYTICS_ID= | ||
NEXT_PUBLIC_CHAIN_ID=743111 | ||
NEXT_PUBLIC_NODE_URL=https://testnet.rpc.hemi.network/rpc | ||
BASE_NODE_URL=https://testnet.rpc.hemi.network/rpc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { useTranslations } from 'next-intl' | ||
|
||
import TokenContainer from './svg/TokenContainer' | ||
|
||
const Balance = ({ balance, showMax, setMax }) => { | ||
const t = useTranslations() | ||
|
||
return ( | ||
<div className="flex gap-1 items-center"> | ||
<span className="text-slate-500">{t('balance')}:</span> | ||
<label className="text-black text-sm">{balance}</label> | ||
{showMax && ( | ||
<label className="text-orange-950 ml-1 cursor-pointer" onClick={setMax}> | ||
MAX | ||
</label> | ||
)} | ||
</div> | ||
) | ||
} | ||
|
||
const Token = ({ token }) => ( | ||
<div className="flex gap-2 items-center"> | ||
<TokenContainer name={token} /> | ||
<label className="text-black text-base">{token}</label> | ||
</div> | ||
) | ||
|
||
const InputBalance = ({ | ||
className = '', | ||
title, | ||
token, | ||
balance, | ||
showMax, | ||
setMax, | ||
...props | ||
}) => ( | ||
<div className={`w-full bg-slate-50 px-6 py-6 rounded-xl ${className}`}> | ||
{title && ( | ||
<label className="text-md text-slate-500 block mb-2.5">{title}</label> | ||
)} | ||
<div className="flex items-center text-right"> | ||
<input | ||
className="bg-slate-50 placeholder-black w-full text-black text-4xl focus:outline-none" | ||
{...props} | ||
/> | ||
<div className="flex flex-col gap-2 items-end"> | ||
{token && <Token token={token} />} | ||
{balance && ( | ||
<Balance balance={balance} setMax={setMax} showMax={showMax} /> | ||
)} | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
|
||
export default InputBalance |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
import { fromUnit } from '../utils' | ||
|
||
// Shows a simple token amount like '0.00125 WETH' inside a `div`. | ||
const TokenAmount = function ({ amount, decimals = 18, symbol }) { | ||
return ( | ||
<span className="tabular-nums">{`${fromUnit( | ||
amount, | ||
decimals | ||
)} ${symbol}`}</span> | ||
) | ||
} | ||
const TokenAmount = ({ amount, decimals = 18, symbol }) => ( | ||
<span className="tabular-nums">{`${fromUnit( | ||
amount, | ||
decimals | ||
)} ${symbol}`}</span> | ||
) | ||
|
||
export default TokenAmount |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.