Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
polarker committed Aug 24, 2023
1 parent 51eb760 commit bef861b
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 19 deletions.
9 changes: 8 additions & 1 deletion src/components/Misc/MyTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,14 @@ interface MyTableProps {
data: { [key: string]: string | React.ReactNode }
}

function MyTable({ w, px, py, data, horizontalSpacing, verticalSpacing }: MyTableProps) {
function MyTable({
w,
px,
py,
data,
horizontalSpacing,
verticalSpacing,
}: MyTableProps) {
const rows = Object.entries(data).map(([key, value]) => (
<tr key={key}>
<td width={'30%'}>
Expand Down
14 changes: 6 additions & 8 deletions src/components/Multisig/BuildMultisigTx.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ import { IconAt, IconCheck } from '@tabler/icons-react'
import { useCallback, useEffect, useMemo, useState } from 'react'
import MyBox from '../Misc/MyBox'
import { FORM_INDEX, useForm } from '@mantine/form'
import {
convertAlphAmountWithDecimals,
isBase58,
node,
} from '@alephium/web3'
import { convertAlphAmountWithDecimals, isBase58, node } from '@alephium/web3'
import {
buildMultisigTx,
defaultNewMultisigTx,
Expand Down Expand Up @@ -289,7 +285,7 @@ function BuildMultisigTx() {
Copy and share the transaction to signers
</Text>
<Input.Description ta="left" size="md">
Signers should paste the transaction on the page {' '}
Signers should paste the transaction on the page{' '}
<Anchor
href={`/alephium-toolkit/#/multisig/sign-tx`}
target="_blank"
Expand Down Expand Up @@ -375,8 +371,10 @@ function BuildMultisigTx() {
)}
</Group>
{txSubmitted && (
<Stack mt="lg" mx="2rem">
<Text fw={400} fz="1.5rem" ta="center">Transaction Submitted</Text>
<Stack mt="lg" mx="2rem">
<Text fw={400} fz="1.5rem" ta="center">
Transaction Submitted
</Text>
<Anchor
href={`${explorerUrl}/tx/${submitTxResult?.txId}`}
target="_blank"
Expand Down
2 changes: 1 addition & 1 deletion src/components/Multisig/ImportMultisig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function ImportMultisig() {
<Text ta="left" fw="700" size="xl">
Multisig Configuration
</Text>
<Input.Description ta="left" size='md'>
<Input.Description ta="left" size="md">
You can import the multisig configuration shared by the creator of the
multisig address.
</Input.Description>
Expand Down
29 changes: 20 additions & 9 deletions src/components/Multisig/SignMultisigTx.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
import { Anchor, Box, Button, Group, Input, Mark, Text, Textarea } from '@mantine/core'
import {
Anchor,
Box,
Button,
Group,
Input,
Mark,
Text,
Textarea,
} from '@mantine/core'
import { useCallback, useState } from 'react'
import { useWallet } from '@alephium/web3-react'
import { MultisigConfig, getAllMultisigConfig, signMultisigTx } from './shared'
Expand Down Expand Up @@ -92,7 +101,7 @@ function SignMultisigTx() {
input: {
color: 'gray',
opacity: 0.9,
}
},
}}
/>
{error ? (
Expand All @@ -101,11 +110,13 @@ function SignMultisigTx() {
</Text>
) : loadingConfig || !unsignedTx ? null : (
<Box mt="xl">
<Text ta="left" fw="700" mb="lg">Transaction Details</Text>
<Text ta="left" fw="700" mb="lg">
Transaction Details
</Text>
<MyTable
px={0}
py={0}
verticalSpacing={'sm'}
px={0}
py={0}
verticalSpacing={'sm'}
data={{
Multisig: multisigConfig ? (
<Anchor
Expand All @@ -117,9 +128,9 @@ function SignMultisigTx() {
) : (
<Mark color="red">unknown</Mark>
),
Recipient: "Coming soon",
"ALPH Amount": "Coming soon",
"Tx Hash": <CopyTextarea value={'Coming soon'} />,
Recipient: 'Coming soon',
'ALPH Amount': 'Coming soon',
'Tx Hash': <CopyTextarea value={'Coming soon'} />,
}}
/>
</Box>
Expand Down

0 comments on commit bef861b

Please sign in to comment.