Skip to content

Commit

Permalink
small misc improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-zwets committed Jun 1, 2024
1 parent 3f97afb commit 2643880
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 16 deletions.
1 change: 1 addition & 0 deletions public/trash.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/components/ContractFunction.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState, useEffect } from 'react'
import { Contract, AbiFunction, Argument, Network, Recipient, SignatureTemplate, ElectrumNetworkProvider, Utxo } from 'cashscript'
import { Contract, AbiFunction, Argument, Network, Recipient, SignatureTemplate, Utxo } from 'cashscript'
import { Form, InputGroup, Button, Card } from 'react-bootstrap'
import { readAsType, ExplorerString, Wallet, NamedUtxo } from './shared'

Expand Down Expand Up @@ -229,7 +229,7 @@ const ContractFunction: React.FC<Props> = ({ contract, abi, network, wallets, co
</InputGroup>
</div>
<Form style={{ marginTop: '5px', marginBottom: '5px', display: "inline-block" }}>
<Form.Check
<Form.Check
type="switch"
id={"outputHasFT" + abi?.name + "index" + index}
label="add tokens to output"
Expand Down
21 changes: 8 additions & 13 deletions src/components/Wallets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,7 @@ const WalletInfo: React.FC<Props> = ({network, wallets, setWallets}) => {
className="inputName"
placeholder="name"
/>
<Button
style={{padding: "0px 6px"}}
onClick={() => removeWallet(index)}
variant="danger"
size="sm">
x
</Button>
<img src='./trash.svg' onClick={() => removeWallet(index)} style={{padding: "0px 6px", width: "fit-content", cursor:"pointer"}}/>
</Card.Header>
<Card.Body>
<Card.Text><strong>Pubkey hex:</strong></Card.Text>
Expand All @@ -166,12 +160,13 @@ const WalletInfo: React.FC<Props> = ({network, wallets, setWallets}) => {
<Card.Text><strong>Hex:</strong></Card.Text>
<CopyText>{wallet.privKeyHex}</CopyText>
</details>
<details>
<summary>Show utxos</summary>
<div>
<InfoUtxos utxos={wallet.utxos}/>
</div>
</details>
{wallet.utxos.length ?
(<details>
<summary>Show utxos</summary>
<div>
<InfoUtxos utxos={wallet.utxos}/>
</div>
</details>) : null}
</Card.Body>
</Card>
))
Expand Down
2 changes: 1 addition & 1 deletion src/components/shared/CopyText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const CopyText: React.FC<Props> = ({ children }) => {
style={{ cursor: 'pointer' }}
>
{children}
{ copied && <Badge style={{ marginLeft: '0.5rem', padding: "5px 10px" }} pill variant="success">Copied!</Badge> }
{ copied && <Badge style={{ marginLeft: '0.5rem', padding: "5px 10px" }} pill bg="success">Copied!</Badge> }
</Card.Text>
</>
);
Expand Down

0 comments on commit 2643880

Please sign in to comment.