forked from 5afe/safe-react
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #270 from aura-nw/euphoria
Add contract interaction and custom transaction feature
- Loading branch information
Showing
152 changed files
with
3,928 additions
and
3,051 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import { Accordion, AccordionSummary, AccordionDetails } from '@aura/safe-react-components' | ||
import { beutifyJson } from 'src/utils' | ||
import styled from 'styled-components' | ||
|
||
export const NoPaddingAccordion = styled(Accordion)` | ||
margin-bottom: 16px !important; | ||
border-radius: 8px !important; | ||
&.MuiAccordion-root { | ||
border: none !important; | ||
.MuiAccordionDetails-root { | ||
padding: 0; | ||
} | ||
} | ||
` | ||
|
||
export const StyledAccordionSummary = styled(AccordionSummary)` | ||
background-color: #363843 !important; | ||
border: none !important; | ||
height: 52px; | ||
&.Mui-expanded { | ||
background-color: #363843 !important; | ||
} | ||
.tx-nonce { | ||
margin: 0 16px 0 8px; | ||
min-width: 80px; | ||
} | ||
` | ||
export const StyledAccordionDetails = styled(AccordionDetails)` | ||
padding: 16px !important; | ||
background: #34353a !important; ; | ||
` | ||
|
||
export const Message = ({ msgData, index }) => { | ||
if (!msgData.typeUrl || !msgData.value) return <></> | ||
const Wrap = styled.div` | ||
white-space: pre-wrap; | ||
.string { | ||
color: #ce9178; | ||
} | ||
.number { | ||
color: #aac19e; | ||
} | ||
.boolean { | ||
color: #266781; | ||
} | ||
.null { | ||
color: #d33a3a; | ||
} | ||
.key { | ||
color: #569cd6; | ||
} | ||
` | ||
return ( | ||
<NoPaddingAccordion> | ||
<StyledAccordionSummary> | ||
{index + 1}. {msgData?.typeUrl?.split('Msg')?.at(-1)} | ||
</StyledAccordionSummary> | ||
<StyledAccordionDetails> | ||
<Wrap dangerouslySetInnerHTML={{ __html: beutifyJson(msgData?.value) }} /> | ||
</StyledAccordionDetails> | ||
</NoPaddingAccordion> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import { Accordion, AccordionDetails, AccordionSummary } from '@aura/safe-react-components' | ||
import { beutifyJson } from 'src/utils' | ||
import styled from 'styled-components' | ||
|
||
export const NoPaddingAccordion = styled(Accordion)` | ||
margin-bottom: 8px !important; | ||
border-radius: 4px !important; | ||
&.MuiAccordion-root { | ||
border: none !important; | ||
.MuiAccordionDetails-root { | ||
padding: 0; | ||
} | ||
} | ||
` | ||
|
||
export const StyledAccordionSummary = styled(AccordionSummary)` | ||
background-color: #363843 !important; | ||
border: none !important; | ||
min-height: 24px !important; | ||
font-size: 12px; | ||
&.Mui-expanded { | ||
background-color: #363843 !important; | ||
} | ||
.tx-nonce { | ||
margin: 0 16px 0 8px; | ||
min-width: 80px; | ||
} | ||
> div { | ||
padding: 0px !important; | ||
margin: 0px !important; | ||
} | ||
` | ||
export const StyledAccordionDetails = styled(AccordionDetails)` | ||
padding: 8px !important; | ||
background: #34353a !important; | ||
font-size: 12px !important; | ||
` | ||
|
||
export const Message = ({ msgData, index }) => { | ||
const Wrap = styled.div` | ||
white-space: pre-wrap; | ||
.string { | ||
color: #ce9178; | ||
} | ||
.number { | ||
color: #aac19e; | ||
} | ||
.boolean { | ||
color: #266781; | ||
} | ||
.null { | ||
color: #d33a3a; | ||
} | ||
.key { | ||
color: #569cd6; | ||
} | ||
` | ||
|
||
return ( | ||
<NoPaddingAccordion> | ||
<StyledAccordionSummary> | ||
{index + 1}. {msgData?.typeUrl.split('Msg').at(-1)} | ||
</StyledAccordionSummary> | ||
<StyledAccordionDetails> | ||
<Wrap dangerouslySetInnerHTML={{ __html: beutifyJson(msgData?.value) }} /> | ||
</StyledAccordionDetails> | ||
</NoPaddingAccordion> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.