Skip to content

Commit

Permalink
Safe page: minor style update and bug fixes (#4086)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyd-eth authored Sep 27, 2023
1 parent c8ebb0c commit add44bc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,19 @@ export function DiffedSplitValue({
isFiniteDistributionLimit(splitProps.totalValue) &&
isFiniteDistributionLimit(diffSplitProps.totalValue)

const amountsAreEqual = isFiniteTotalValue
const percentsEqual =
splitProps.split.percent === diffSplitProps.split.percent

const valuesEqual = isFiniteTotalValue
? splitAmountsAreEqual({
split1: splitProps.split,
split2: diffSplitProps.split,
split1TotalValue: splitProps.totalValue,
split2TotalValue: diffSplitProps.totalValue,
})
: false
: percentsEqual

if (amountsAreEqual) return newValue
if (valuesEqual) return <div className="mr-4">{newValue}</div>

return (
<div className="flex">
Expand Down
22 changes: 10 additions & 12 deletions src/components/v2v3/shared/SplitItem/SplitAmountValue.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,16 @@ export function SplitAmountValue({
createTooltipTitle(currencyName, splitValue.sub(feeAmount))
}
>
<span className="pl-1">
{valueAfterFees ? (
<div>
<AmountInCurrency
amount={valueAfterFees}
currency={currencyName}
hideTooltip={hideTooltip}
/>
{props.valueSuffix ? <span> {props.valueSuffix}</span> : null}
</div>
) : null}
</span>
{valueAfterFees ? (
<>
<AmountInCurrency
amount={valueAfterFees}
currency={currencyName}
hideTooltip={hideTooltip}
/>
{props.valueSuffix ? <span> {props.valueSuffix}</span> : null}
</>
) : null}
</Tooltip>

{props.showFee && !isJuiceboxProject && (
Expand Down
2 changes: 1 addition & 1 deletion src/lib/safe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const generateSafeUrl = (address: string) =>

// Links to specific transaction on Gnosis Safe app
export const generateSafeTxUrl = (transaction: SafeTransactionType) =>
`https://gnosis-safe.io/app/eth:${transaction.safe}/transactions/tx?id=multisig_${transaction.safe}_${transaction.safeTxHash}`
`https://app.safe.global/transactions/tx?safe=eth:${transaction.safe}&id=multisig_${transaction.safe}_${transaction.safeTxHash}`

export const fetchExecutedSafeTransactions = async ({
safeAddress,
Expand Down

2 comments on commit add44bc

@vercel
Copy link

@vercel vercel bot commented on add44bc Sep 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on add44bc Sep 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.