-
Notifications
You must be signed in to change notification settings - Fork 15
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
Showing
8 changed files
with
376 additions
and
208 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
152 changes: 0 additions & 152 deletions
152
compliant-reward-distribution/frontend/src/components/AdminCreateItem.tsx
This file was deleted.
Oops, something went wrong.
49 changes: 49 additions & 0 deletions
49
compliant-reward-distribution/frontend/src/components/ConnectWallet.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,49 @@ | ||
import { Button } from 'react-bootstrap'; | ||
import { BrowserWalletProvider, WalletConnectProvider, WalletProvider } from '../../wallet-connection'; | ||
|
||
interface Props { | ||
account: string | undefined; | ||
connectProvider: (provider: WalletProvider) => void; | ||
} | ||
|
||
export function ConnectWallet(props: Props) { | ||
const { account, connectProvider } = props; | ||
|
||
return ( | ||
<div className="centered"> | ||
<div className="card"> | ||
<h2 className="centered"> Connect your wallet</h2> | ||
<Button | ||
variant="primary" | ||
onClick={async () => connectProvider(await BrowserWalletProvider.getInstance())} | ||
> | ||
Browser wallet | ||
</Button> | ||
<br /> | ||
<Button | ||
variant="primary" | ||
onClick={async () => connectProvider(await WalletConnectProvider.getInstance())} | ||
> | ||
Android CryptoX Wallet | ||
</Button> | ||
<br /> | ||
<Button | ||
variant="primary" | ||
disabled={true} | ||
onClick={async () => connectProvider(await WalletConnectProvider.getInstance())} | ||
> | ||
iOS CryptoX Wallet [Coming Soon] | ||
</Button> | ||
<br /> | ||
{account && ( | ||
<> | ||
<div className="centered">Connected Account:</div> | ||
<Button variant="info" id="accountAddress" disabled={true} hidden={account === undefined}> | ||
{account ? account : 'No Account Connected'} | ||
</Button> | ||
</> | ||
)} | ||
</div> | ||
</div> | ||
); | ||
} |
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.