This repository has been archived by the owner on Nov 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 363
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into feature-discoverability
- Loading branch information
Showing
120 changed files
with
2,982 additions
and
1,596 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
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,46 @@ | ||
name: Mint PR NFT | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- dev | ||
|
||
jobs: | ||
mint: | ||
environment: Manual | ||
name: Mint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check if already minted | ||
uses: web3actions/tx@d3833db41e58cb4e7f329027ad30211a22e1c5e5 | ||
with: | ||
rpc-node: ${{ secrets.RPC_NODE}} | ||
wallet-key: ${{ secrets.WALLET_KEY }} | ||
contract: ${{ secrets.CONTRACT_ADDRESS }} | ||
function: "tokenURI(uint256 _tokenId)" | ||
inputs: '[ ${{ github.event.number }} ]' | ||
value: "0" | ||
|
||
- name: Mint | ||
id: mint | ||
if: ${{ failure() }} | ||
uses: web3actions/tx@d3833db41e58cb4e7f329027ad30211a22e1c5e5 | ||
with: | ||
rpc-node: ${{ secrets.RPC_NODE}} | ||
wallet-key: ${{ secrets.WALLET_KEY }} | ||
contract: ${{ secrets.CONTRACT_ADDRESS }} | ||
function: "mint(address _to, uint256 _tokenId, string _uri)" | ||
inputs: '[ "${{ secrets.WALLET_ADDRESS }}", ${{ github.event.number }}, "https://github.com/gnosis/safe-react/pull/${{ github.event.number }}" ]' | ||
value: "0" | ||
|
||
- name: Set success comment | ||
if: steps.mint.outcome == 'success' | ||
uses: peter-evans/create-or-update-comment@v1 | ||
with: | ||
issue-number: ${{ github.event.number }} | ||
body: | | ||
[<img alt="GitMint NFT preview" width="200" src="https://gitsvg.katspaugh.workers.dev/?svg=1&url=https://github.com/gnosis/safe-react/pull/${{ github.event.number }}" />](https://blockscout.com/xdai/mainnet/token/${{ secrets.CONTRACT_ADDRESS }}/instance/${{ github.event.number }}) | ||
Dear @${{ github.event.pull_request.user.login }}, | ||
Thank you for your contribution! Please, let us know your Ethereum address to receive [this NFT on Gnosis Chain](https://epor.io/tokens/${{ secrets.CONTRACT_ADDRESS }}/${{ github.event.number }}?network=xDai). | ||
Cheers! 🏆 |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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
41 changes: 23 additions & 18 deletions
41
src/components/AppLayout/Header/components/ProviderDetails/ConnectDetails.tsx
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
81 changes: 81 additions & 0 deletions
81
src/components/AppLayout/Header/components/ProviderDetails/PairingDetails.tsx
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,81 @@ | ||
import { CSSProperties, ReactElement } from 'react' | ||
import Skeleton from '@material-ui/lab/Skeleton' | ||
import RefreshIcon from '@material-ui/icons/Refresh' | ||
import IconButton from '@material-ui/core/IconButton' | ||
import { Divider, Link } from '@gnosis.pm/safe-react-components' | ||
import styled from 'styled-components' | ||
import QRCode from 'qrcode.react' | ||
|
||
import Paragraph from 'src/components/layout/Paragraph' | ||
import Row from 'src/components/layout/Row' | ||
import usePairing from 'src/logic/wallets/pairing/hooks/usePairing' | ||
import { initPairing, isPairingModule } from 'src/logic/wallets/pairing/utils' | ||
|
||
// Hides first wallet in Onboard modal (pairing module) | ||
import 'src/components/AppLayout/Header/components/ProviderDetails/hidePairingModule.css' | ||
import { useGetPairingUri } from 'src/logic/wallets/pairing/hooks/useGetPairingUri' | ||
|
||
const StyledDivider = styled(Divider)` | ||
width: calc(100% + 40px); | ||
margin-left: -20px; | ||
` | ||
|
||
const QR_DIMENSION = 120 | ||
|
||
const qrRefresh: CSSProperties = { | ||
width: QR_DIMENSION, | ||
height: QR_DIMENSION, | ||
} | ||
|
||
const PairingDetails = ({ classes }: { classes: Record<string, string> }): ReactElement => { | ||
const uri = useGetPairingUri() | ||
const isPairingLoaded = isPairingModule() | ||
usePairing() | ||
|
||
return ( | ||
<> | ||
<StyledDivider /> | ||
|
||
<Row align="center" margin="lg"> | ||
<Paragraph className={classes.header} noMargin> | ||
Connect to Mobile | ||
</Paragraph> | ||
</Row> | ||
|
||
<Row className={classes.justifyCenter}> | ||
{uri ? ( | ||
<QRCode value={uri} size={QR_DIMENSION} /> | ||
) : isPairingLoaded ? ( | ||
<Skeleton variant="rect" width={QR_DIMENSION} height={QR_DIMENSION} /> | ||
) : ( | ||
<IconButton disableRipple style={qrRefresh} onClick={initPairing}> | ||
<RefreshIcon fontSize="large" /> | ||
</IconButton> | ||
)} | ||
</Row> | ||
|
||
<Row> | ||
<Paragraph className={classes.centerText} size="sm"> | ||
Scan this code in the{' '} | ||
<Link href="https://apps.apple.com/us/app/gnosis-safe/id1515759131">Gnosis Safe app</Link> to sign | ||
transactions with your mobile device. | ||
<br /> | ||
<Link href="https://help.gnosis-safe.io/en/articles/5584901-desktop-pairing">Learn more</Link> about this | ||
feature. | ||
</Paragraph> | ||
</Row> | ||
|
||
<Row className={classes.justifyCenter}> | ||
<a href="https://apps.apple.com/us/app/gnosis-safe/id1515759131"> | ||
<img | ||
src="https://tools.applemediaservices.com/api/badges/download-on-the-app-store/black/en-us?size=250x83&releaseDate=1599436800&h=93244e063e3bdf5b5b9f93aff647da09" | ||
alt="Download on the App Store" | ||
className={classes.appStore} | ||
/> | ||
</a> | ||
</Row> | ||
</> | ||
) | ||
} | ||
|
||
export default PairingDetails |
4 changes: 4 additions & 0 deletions
4
src/components/AppLayout/Header/components/ProviderDetails/hidePairingModule.css
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,4 @@ | ||
/* Hides pairing module from Onboard wallet selection modal */ | ||
.bn-onboard-modal-select-wallets li:first-of-type { | ||
display: none; | ||
} |
4 changes: 4 additions & 0 deletions
4
src/components/AppLayout/Header/components/WalletIcon/icons/icon-safe-mobile.svg
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
Oops, something went wrong.