Skip to content

Commit

Permalink
Fix text sizes on operations page
Browse files Browse the repository at this point in the history
  • Loading branch information
serjonya-trili committed Oct 23, 2023
1 parent 92cec0c commit 09e62a9
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 19 deletions.
43 changes: 43 additions & 0 deletions code.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
const { InMemorySigner } = require("@taquito/signer");
const { TezosToolkit } = require("@taquito/taquito");
const Tezos = new TezosToolkit("https://mainnet.ecadinfra.com/");
const mnemonic =
"guess ribbon prefer armed tongue monster orange insect bubble fatal print party oven betray scrap awkward harbor prevent skate drama upgrade wise bulb true";

const derivationPaths = ["44'/1729'/?'/0'", "44'/1729'/?'/0'/0'"];
const curves = ["ed25519"];

(async () => {
const signer = await InMemorySigner.fromSecretKey(
"edskRxVKTCt2grojTa74LhrQQ1H6szrwmBdWnbEfFGDng9HGcCSNnwCwZWqVf7Tk4q3qDJqx4xFRJMRqPoKu7BuKbfrjSRTv93"
);

console.log(
"expected\n",
"edskRxVKTCt2grojTa74LhrQQ1H6szrwmBdWnbEfFGDng9HGcCSNnwCwZWqVf7Tk4q3qDJqx4xFRJMRqPoKu7BuKbfrjSRTv93",
"\n",
await signer.publicKeyHash(),
"\n------"
);

for (const derivationPath of derivationPaths) {
for (const curve of curves) {
const secretKey = await InMemorySigner.fromMnemonic({
mnemonic,
derivationPath,
curve,
}).secretKey();
const signer = await InMemorySigner.fromSecretKey(secretKey);
console.log(
derivationPath,
"\n",
curve,
"\n",
secretKey,
"\n",
await signer.publicKeyHash(),
"\n------"
);
}
}
})();
4 changes: 2 additions & 2 deletions src/components/OperationTile/Fee.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ export const Fee: React.FC<{

return (
<Center>
<Heading size="sm" color={colors.gray[450]} mr="4px">
<Heading size="md" color={colors.gray[450]} mr="4px">
Fee:
</Heading>
<Text size="sm" color={colors.gray[400]} data-testid="fee">
<Text color={colors.gray[400]} data-testid="fee">
{prettyTezAmount(totalFee)}
</Text>
</Center>
Expand Down
32 changes: 16 additions & 16 deletions src/components/OperationTile/OperationTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const TransactionTile: React.FC<{ operation: TransactionOperation }> = ({ operat
<Center>
<TransactionDirectionIcon isOutgoing={isOutgoing} mr="8px" />
<TzktLink operation={operation} mr="8px" color={titleColor}>
<Text fontWeight="600" size="sm" color={titleColor}>
<Text fontWeight="600" color={titleColor}>
{sign} {amount}
</Text>
</TzktLink>
Expand Down Expand Up @@ -85,10 +85,10 @@ const TransactionTile: React.FC<{ operation: TransactionOperation }> = ({ operat
</Flex>
)}
</Flex>
<Flex alignSelf="flex-end" align="center">
<Center>
<OperationTypeWrapper>Transaction</OperationTypeWrapper>
<OperationStatus operation={operation} />
</Flex>
</Center>
</Flex>
</Box>
</Flex>
Expand Down Expand Up @@ -147,10 +147,10 @@ const TokenTransferTile: React.FC<{
>
<Flex>
<TzktLink operation={operation} mr="8px" color={underlineColor}>
<Text display="inline" fontWeight="600" size="sm" color={titleColor}>
<Text display="inline" fontWeight="600" color={titleColor}>
{sign} {tokenAmount}
</Text>
<Text display="inline" fontWeight="600" size="sm">
<Text display="inline" fontWeight="600">
{" "}
{tokenNameSafe(token)}
</Text>
Expand All @@ -159,7 +159,7 @@ const TokenTransferTile: React.FC<{
</Tooltip>
) : (
<TzktLink operation={operation} mr="8px" color={underlineColor}>
<Text display="inline" fontWeight="600" size="sm" color={titleColor}>
<Text display="inline" fontWeight="600" color={titleColor}>
{sign} {tokenAmount}
</Text>
</TzktLink>
Expand Down Expand Up @@ -197,7 +197,7 @@ const TokenTransferTile: React.FC<{
</Flex>
)}
</Flex>
<Center alignSelf="flex-end">
<Center>
<OperationTypeWrapper>Token Transfer</OperationTypeWrapper>
<OperationStatus operation={operation} />
</Center>
Expand All @@ -221,7 +221,7 @@ const ContractCallTile: React.FC<{
<Center>
<ContractIcon mr="8px" />
<TzktLink operation={operation} mr="8px">
<Heading size="sm">Contract Call: {operation.parameter?.entrypoint}</Heading>
<Heading size="md">Contract Call: {operation.parameter?.entrypoint}</Heading>
</TzktLink>
<Fee operation={operation} />
</Center>
Expand Down Expand Up @@ -249,10 +249,10 @@ const ContractCallTile: React.FC<{
</Flex>
)}
</Flex>
<Flex alignSelf="flex-end" align="center">
<Center>
<OperationTypeWrapper>Contract Call</OperationTypeWrapper>
<OperationStatus operation={operation} />
</Flex>
</Center>
</Flex>
</Box>
</Flex>
Expand All @@ -270,7 +270,7 @@ const DelegationTile: React.FC<{ operation: DelegationOperation }> = ({ operatio
<Center>
<BakerIcon stroke={colors.gray[450]} mr="8px" />
<TzktLink operation={operation} mr="8px">
<Heading size="sm">{operationType}</Heading>
<Heading size="md">{operationType}</Heading>
</TzktLink>
<Fee operation={operation} />
</Center>
Expand Down Expand Up @@ -299,10 +299,10 @@ const DelegationTile: React.FC<{ operation: DelegationOperation }> = ({ operatio
)}
{!isDelegating && !showFromAddress && <Text color={colors.gray[450]}>N/A</Text>}
</Flex>
<Flex alignSelf="flex-end" align="center">
<Center>
<OperationTypeWrapper>{operationType}</OperationTypeWrapper>
<OperationStatus operation={operation} />
</Flex>
</Center>
</Flex>
</Box>
</Flex>
Expand All @@ -325,7 +325,7 @@ const OriginationTile: React.FC<{ operation: OriginationOperation }> = ({ operat
<Center>
<ContractIcon mr="8px" />
<TzktLink operation={operation} mr="8px">
<Heading size="sm">{contractTitle}</Heading>
<Heading size="md">{contractTitle}</Heading>
</TzktLink>
<Fee operation={operation} />
</Center>
Expand All @@ -347,10 +347,10 @@ const OriginationTile: React.FC<{ operation: OriginationOperation }> = ({ operat
</Flex>
)}
</Flex>
<Flex alignSelf="flex-end" align="center">
<Center>
<OperationTypeWrapper>Contract Origination</OperationTypeWrapper>
<OperationStatus operation={operation} />
</Flex>
</Center>
</Flex>
</Box>
</Flex>
Expand Down
2 changes: 1 addition & 1 deletion src/components/OperationTile/OperationTypeWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const OperationTypeWrapper: React.FC<PropsWithChildren> = ({ children })
}

return (
<Text data-testid="operation-type-wrapper" color={colors.gray[300]} mr="4px">
<Text data-testid="operation-type-wrapper" color={colors.gray[300]} size="sm" mr="4px">
{children}
</Text>
);
Expand Down

0 comments on commit 09e62a9

Please sign in to comment.