-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Disable Claim CSOV option when none available. Closes #392 (#393) * Master to dev (#403) * Table for vested SOV asset. Closes #391 * Reduces table width #391 * Fix/401 double claiming (#402) * Disable Claim CSOV option when none available. Closes #392 (#393) * Fixes #401 - prevents multiple txs being sent when claiming tokens Co-authored-by: soulBit <[email protected]> Co-authored-by: soulBit <[email protected]> * #395 banner and dialog for claiming origin SOV tokens * Feat/395 redeem origin sov (#406) * Fixes claiming bug * #395 banner and dialog for claiming origin SOV tokens * Revert "Feat/395 redeem origin sov (#406)" (#407) This reverts commit d97d228. * changed contract signatures for claiming origin sov tokens #395 * reworked how origin claiming works #395 * New strings and translate to PT-BR (#411) * New strings and translate to PT-BR * Minor change * Update src/locales/pt_br/translation.json * temp contracts for testing #395 * new contracts for sov claim #395 * removes address field from sov redeeming dialog #395 * new registry for origin claiming #395 * new contracts #395 * staking contract #395 * Master (#423) * Fixes claiming bug * Added changelog * Issue #389 - Change connected wallet blue circle with address blockie (#409) * add address blockie * remove regeneration of address blockie Co-authored-by: optisman <[email protected]> * Minor changes PT-BR (#428) * Minor change PT-BR (#431) * Minor change PT-BR * Update src/locales/pt_br/translation.json * Minor change * Update src/locales/pt_br/translation.json * changed testnet contract for origin vesting registry #395 * changed testnet contract for origin claim #395 * new nodes #395 * changed nodes * changed origin SOV price to 9736 satoshis #395 * new contracts #395 * fast btc rework #418 (#425) * fast btc rework #418 * fastbtc history table #418 * Updated fast btc #418 * updated smart contracts #395 * mainnet contracts for origin claim #395 Co-authored-by: soulBit <[email protected]> Co-authored-by: bitcoinuser <[email protected]> Co-authored-by: optisman <[email protected]>
- Loading branch information
1 parent
a12614a
commit f154904
Showing
33 changed files
with
2,510 additions
and
161 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
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** */ | ||
.qrCodeWrapper { | ||
|
||
} | ||
|
||
.qrCodeTitle { | ||
font-size: 18px; | ||
margin-bottom: 10px; | ||
font-weight: 400; | ||
line-height: 22px; | ||
} | ||
|
||
.qrCodeContainer { | ||
background-color: #ffffff; | ||
border-radius: 10px; | ||
text-align: center; | ||
margin-bottom: 20px; | ||
} | ||
|
||
.addressWrapper { | ||
background-color: #222222; | ||
padding: 12px 20px; | ||
border: 1px solid #575757; | ||
border-radius: 8px; | ||
cursor: pointer; | ||
} |
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,69 @@ | ||
import React from 'react'; | ||
import { Text } from '@blueprintjs/core'; | ||
import QRCode from 'qrcode.react'; | ||
import { CopyToClipboard } from 'react-copy-to-clipboard'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { toastSuccess } from 'utils/toaster'; | ||
import { translations } from 'locales/i18n'; | ||
import styles from './index.module.css'; | ||
|
||
interface Props { | ||
address: string; | ||
hideClickToCopy?: boolean; | ||
} | ||
|
||
export function AddressQrCode({ address, hideClickToCopy }: Props) { | ||
const { t } = useTranslation(); | ||
return ( | ||
<> | ||
<div className={styles.qrCodeContainer}> | ||
<QRCode | ||
value={address} | ||
renderAs="svg" | ||
bgColor="var(--white)" | ||
fgColor="var(--primary)" | ||
includeMargin={true} | ||
className="rounded w-75 h-75" | ||
/> | ||
</div> | ||
{!hideClickToCopy && ( | ||
<CopyToClipboard | ||
text={address} | ||
onCopy={() => | ||
toastSuccess(<>{t(translations.onCopy.address)}</>, 'copy') | ||
} | ||
> | ||
<div className={styles.addressWrapper}> | ||
<div className="d-flex flex-row justify-content-between align-items-center w-100"> | ||
<div className="flex-shrink-1 flex-grow-0 overflow-hidden"> | ||
<Text ellipsize>{address}</Text> | ||
</div> | ||
<div className="flex-shrink-0 flex-grow-0 ml-3"> | ||
<svg | ||
id="content_copy-24px" | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="20" | ||
height="20" | ||
viewBox="0 0 20 20" | ||
> | ||
<path | ||
id="Path_11" | ||
data-name="Path 11" | ||
d="M0,0H20V20H0Z" | ||
fill="none" | ||
/> | ||
<path | ||
id="Path_12" | ||
data-name="Path 12" | ||
d="M13.053,1H3.579A1.613,1.613,0,0,0,2,2.636V14.091H3.579V2.636h9.474Zm2.368,3.273H6.737A1.613,1.613,0,0,0,5.158,5.909V17.364A1.613,1.613,0,0,0,6.737,19h8.684A1.613,1.613,0,0,0,17,17.364V5.909A1.613,1.613,0,0,0,15.421,4.273Zm0,13.091H6.737V5.909h8.684Z" | ||
fill="#2274a5" | ||
/> | ||
</svg> | ||
</div> | ||
</div> | ||
</div> | ||
</CopyToClipboard> | ||
)} | ||
</> | ||
); | ||
} |
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
25 changes: 25 additions & 0 deletions
25
src/app/containers/FastBtcDialog/components/AddressButton.tsx
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,25 @@ | ||
import React from 'react'; | ||
import { Button } from '@blueprintjs/core'; | ||
|
||
interface Props { | ||
loading: boolean; | ||
ready: boolean; | ||
onClick: () => void; | ||
} | ||
|
||
export function AddressButton({ loading, ready, onClick }: Props) { | ||
return ( | ||
<> | ||
<div className="justify-content-center items-center d-flex flex-row"> | ||
<Button | ||
minimal | ||
className="text-gold button-round font-size-lg mx-auto" | ||
text="Generate deposit address" | ||
loading={loading} | ||
disabled={loading || !ready} | ||
onClick={onClick} | ||
/> | ||
</div> | ||
</> | ||
); | ||
} |
64 changes: 64 additions & 0 deletions
64
src/app/containers/FastBtcDialog/components/MainScreen.tsx
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,64 @@ | ||
import React, { Dispatch } from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { FastBtcDialogState, Step } from '../types'; | ||
import { actions } from '../slice'; | ||
import styles from '../index.module.css'; | ||
import { translations } from '../../../../locales/i18n'; | ||
import { AddressButton } from './AddressButton'; | ||
import { AddressQrCode } from '../../../components/Form/AddressQrCode'; | ||
import { toNumberFormat } from '../../../../utils/display-text/format'; | ||
|
||
interface MainScreenProps { | ||
state: FastBtcDialogState; | ||
dispatch: Dispatch<any>; | ||
} | ||
|
||
export function MainScreen({ state, dispatch }: MainScreenProps) { | ||
const { t } = useTranslation(); | ||
return ( | ||
<> | ||
<h2 className={styles.title}>{t(translations.fastBtcDialog.title)}</h2> | ||
<div className={styles.subtitle}> | ||
{t(translations.fastBtcDialog.subtitle)} | ||
</div> | ||
|
||
<div> | ||
<div className={styles.limitsTitle}> | ||
{t(translations.fastBtcDialog.limits.title)} | ||
</div> | ||
<div className={styles.limitsValue}> | ||
•{' '} | ||
{t(translations.fastBtcDialog.limits.min, { | ||
amount: toNumberFormat(state.limits.min, 4), | ||
})} | ||
<br />•{' '} | ||
{t(translations.fastBtcDialog.limits.max, { | ||
amount: toNumberFormat(state.limits.max, 4), | ||
})} | ||
</div> | ||
</div> | ||
|
||
<div> | ||
<div className={styles.instructionsTitle}> | ||
{t(translations.fastBtcDialog.instructions.title)} | ||
</div> | ||
<div className={styles.instructionsValue}> | ||
• {t(translations.fastBtcDialog.instructions.point1)} | ||
<br />• {t(translations.fastBtcDialog.instructions.point2)} | ||
<br />• {t(translations.fastBtcDialog.instructions.point3)} | ||
</div> | ||
</div> | ||
|
||
{state.step === Step.WALLET && ( | ||
<AddressQrCode address={state.deposit.address} /> | ||
)} | ||
{state.step === Step.MAIN && ( | ||
<AddressButton | ||
loading={state.deposit.loading} | ||
ready={state.ready} | ||
onClick={() => dispatch(actions.generateDepositAddress())} | ||
/> | ||
)} | ||
</> | ||
); | ||
} |
Oops, something went wrong.
f154904
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: