Skip to content

Commit

Permalink
fix tx memo
Browse files Browse the repository at this point in the history
  • Loading branch information
HoangNDM committed Dec 5, 2023
1 parent 19b0e26 commit ef387ee
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/pages/Transactions/components/TxDetail/Message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,14 @@ const StyledStatus = styled.div`
}
`

const WrapperTxMemo = styled.div`
const Wrapper = styled.div`
display: flex;
flex-direction: column;
gap: 2;
margin-top: 12px !important;
.label {
margin-bottom: 12px;
}
`

const BtnImport = ({ onImport }) => {
Expand All @@ -45,10 +48,10 @@ const BtnImport = ({ onImport }) => {

const TransactionMemo = ({ memo }: { memo: string }) => {
return (
<WrapperTxMemo>
<strong>Transaction memo: </strong>
<Wrapper>
<strong className="label">Transaction memo: </strong>
<div>{memo}</div>
</WrapperTxMemo>
</Wrapper>
)
}

Expand Down Expand Up @@ -122,8 +125,8 @@ export default function TxMsg({ tx, txDetail, token, onImport }) {
</div>
</div>
))}
<div>
{msg[0]?.value?.funds.length > 0 ? <strong>Transaction funds:</strong> : <></>}
<Wrapper>
{msg[0]?.value?.funds.length > 0 ? <strong className="label">Transaction funds:</strong> : <></>}
{msg[0]?.value?.funds?.map((fund, index) => {
const foundToken = tokenList.find((token) => token.cosmosDenom === fund.denom || token.denom === fund.denom)
if (foundToken) {
Expand All @@ -134,7 +137,7 @@ export default function TxMsg({ tx, txDetail, token, onImport }) {
)
}
})}
</div>
</Wrapper>

{txDetail?.txMemo && <TransactionMemo memo={txDetail?.txMemo} />}
</div>
Expand Down

0 comments on commit ef387ee

Please sign in to comment.