Skip to content

Commit

Permalink
fix: bold formatting in views
Browse files Browse the repository at this point in the history
  • Loading branch information
slowbackspace committed Oct 24, 2023
1 parent 0d8c267 commit 4fdf906
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
16 changes: 8 additions & 8 deletions src/commands/asset/views/asset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,19 @@ export const getAssetView = (asset: Responses['asset'], jsonMode?: boolean): Say
type: 'section',
text: {
type: 'mrkdwn',
text: `*Fingerprint:\n\`${asset.fingerprint}\``,
text: `*Fingerprint*\n\`${asset.fingerprint}\``,
},
},
{
type: 'section',
fields: [
{
type: 'mrkdwn',
text: `*Policy:\n\`${asset.policy_id}\``,
text: `*Policy*\n\`${asset.policy_id}\``,
},
{
type: 'mrkdwn',
text: `*Name:\n\`${asset.asset_name}\``,
text: `*Name*\n\`${asset.asset_name}\``,
},
],
accessory: {
Expand All @@ -129,27 +129,27 @@ export const getAssetView = (asset: Responses['asset'], jsonMode?: boolean): Say
type: 'section',
text: {
type: 'mrkdwn',
text: `*Mint Tx:\n\`${asset.initial_mint_tx_hash}\``,
text: `*Mint Tx*\n\`${asset.initial_mint_tx_hash}\``,
},
},
{
type: 'section',
fields: [
{
type: 'mrkdwn',
text: `*Quantity:\n${asset.quantity}`,
text: `*Quantity*\n${asset.quantity}`,
},
{
type: 'mrkdwn',
text: `*Mint/Burn Count:\n${asset.mint_or_burn_count}`,
text: `*Mint/Burn Count*\n${asset.mint_or_burn_count}`,
},
],
},
{
type: 'section',
text: {
type: 'mrkdwn',
text: `*On-chain Metadata:\n\`${
text: `*On-chain Metadata*\n\`${
asset.onchain_metadata ? `\`\`\`${onchainMetadataString}\`\`\`` : 'No'
}\``,
},
Expand All @@ -158,7 +158,7 @@ export const getAssetView = (asset: Responses['asset'], jsonMode?: boolean): Say
type: 'section',
text: {
type: 'mrkdwn',
text: `*Off-chain Metadata:\n\`${
text: `*Off-chain Metadata*\n\`${
asset.metadata ? `\`\`\`${offchainMetadataString}\`\`\`` : 'No'
}\``,
},
Expand Down
16 changes: 8 additions & 8 deletions src/commands/tx/views/tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ export const getTxView = (
fields: [
{
type: 'mrkdwn',
text: `*Timestamp:\n${formatUnixTimestamp(tx.block_time)}`,
text: `*Timestamp*\n${formatUnixTimestamp(tx.block_time)}`,
},
{
type: 'mrkdwn',
text: `*Block:\n${tx.block_height}`,
text: `*Block*\n${tx.block_height}`,
},
],
},
Expand All @@ -53,11 +53,11 @@ export const getTxView = (
fields: [
{
type: 'mrkdwn',
text: `*Slot:\n${tx.slot}`,
text: `*Slot*\n${tx.slot}`,
},
{
type: 'mrkdwn',
text: `*Fees:\n${lovelaceToAda(tx.fees)} ADA`,
text: `*Fees*\n${lovelaceToAda(tx.fees)} ADA`,
},
],
},
Expand All @@ -66,13 +66,13 @@ export const getTxView = (
fields: [
{
type: 'mrkdwn',
text: `*Total Output:\n${lovelaceToAda(
text: `*Total Output*\n${lovelaceToAda(
tx.output_amount.find(o => o.unit === 'lovelace')?.quantity ?? 0,
)} ADA`,
},
{
type: 'mrkdwn',
text: `*Size:\n${tx.size} Bytes`,
text: `*Size*\n${tx.size} Bytes`,
},
],
},
Expand All @@ -81,7 +81,7 @@ export const getTxView = (
fields: [
{
type: 'mrkdwn',
text: `*Certificates:\n${
text: `*Certificates*\n${
tx.stake_cert_count +
tx.delegation_count +
tx.pool_update_count +
Expand All @@ -90,7 +90,7 @@ export const getTxView = (
},
{
type: 'mrkdwn',
text: `*Mints/Burns:\n${tx.asset_mint_or_burn_count}`,
text: `*Mints/Burns*\n${tx.asset_mint_or_burn_count}`,
},
],
},
Expand Down
2 changes: 1 addition & 1 deletion src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const loadConfig = () => {
throw Error('Set env variable DB_CONNECTION_STRING');
}

logger.info(`DB SSL settings: ${process.env.DATABASE_SSL}\nCA cert:\n${process.env.CA_CERT}`);
logger.info(`DB SSL settings: ${process.env.DATABASE_SSL}\nCA cert*\n${process.env.CA_CERT}`);

return {
db: {
Expand Down
16 changes: 8 additions & 8 deletions src/utils/formatting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,31 +44,31 @@ export const formatInputs = (inputs: Responses['tx_content_utxo']['inputs']) =>
fields: [
{
type: 'mrkdwn',
text: `*Tx Hash:\n\`${input.tx_hash}\``,
text: `*Tx Hash*\n\`${input.tx_hash}\``,
},
{
type: 'mrkdwn',
text: `*Index:\n${input.output_index}`,
text: `*Index*\n${input.output_index}`,
},
],
},
{
type: 'section',
text: {
type: 'mrkdwn',
text: `πŸ“˜ *Address:\n\`${input.address}\``,
text: `πŸ“˜ *Address*\n\`${input.address}\``,
},
},
{
type: 'section',
fields: [
{
type: 'mrkdwn',
text: `*Amount:\n${amount} ADA`,
text: `*Amount*\n${amount} ADA`,
},
{
type: 'mrkdwn',
text: `*Collateral:\n${input.collateral ? 'Yes' : 'No'}`,
text: `*Collateral*\n${input.collateral ? 'Yes' : 'No'}`,
},
],
},
Expand Down Expand Up @@ -112,19 +112,19 @@ export const formatOutputs = (outputs: Responses['tx_content_utxo']['outputs'])
type: 'section',
text: {
type: 'mrkdwn',
text: `πŸ“˜ *Address:\n\`${output.address}\``,
text: `πŸ“˜ *Address*\n\`${output.address}\``,
},
},
{
type: 'section',
fields: [
{
type: 'mrkdwn',
text: `*Amount:\n${amount} ADA`,
text: `*Amount*\n${amount} ADA`,
},
{
type: 'mrkdwn',
text: `*Collateral:\n${output.collateral ? 'Yes' : 'No'}`,
text: `*Collateral*\n${output.collateral ? 'Yes' : 'No'}`,
},
],
},
Expand Down

0 comments on commit 4fdf906

Please sign in to comment.