Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
Merge pull request #2289 from gnosis/release/1.10
Browse files Browse the repository at this point in the history
[RELEASE ⛰️ ] v1.10.0-RC.0
  • Loading branch information
alfetopito authored Jan 25, 2022
2 parents ab27be8 + 926736c commit adbba3e
Show file tree
Hide file tree
Showing 111 changed files with 7,076 additions and 347 deletions.
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"semi": false,
"singleQuote": true,
"printWidth": 120
}
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@
"workbox-routing": "^6.1.0"
},
"resolutions": {
"@walletconnect/ethereum-provider": "1.6.4"
"@walletconnect/ethereum-provider": "1.6.4",
"react-error-overlay": "6.0.9"
},
"scripts": {
"start:default": "craco start",
Expand Down
Binary file added public/audio/mooooo-send.mp3.asd
Binary file not shown.
Binary file added src/assets/images/wxdai.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/xdai.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/Confetti/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function Confetti({ start, variant }: { start: boolean; variant?:

return start && width && height ? (
<ReactConfetti
style={{ zIndex: 1401 }}
style={{ zIndex: 1401, maxWidth: '100%' }} // mod fix for horizontal slider
numberOfPieces={400}
recycle={false}
run={true}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Menu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const StyledMenuButton = styled.button`
}
`

const UNIbutton = styled(ButtonPrimary)`
export const UNIbutton = styled(ButtonPrimary)`
background-color: ${({ theme }) => theme.bg3};
background: radial-gradient(174.47% 188.91% at 1.84% 0%, #ff007a 0%, #2172e5 100%), #edeef2;
border: none;
Expand Down
12 changes: 7 additions & 5 deletions src/components/claim/ClaimModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import tokenLogo from '../../assets/images/token-logo.png'
import { useActiveWeb3React } from '../../hooks/web3'
import { useModalOpen, useToggleSelfClaimModal } from '../../state/application/hooks'
import { ApplicationModal } from '../../state/application/reducer'
import { useClaimCallback, useUserClaimData, useUserUnclaimedAmount } from '../../state/claim/hooks'
import { useUserHasSubmittedClaim } from '../../state/transactions/hooks'
import { useClaimCallback, useUserClaimData, useUserUnclaimedAmount } from 'state/claim/hooks'
import { useUserHasSubmittedClaim } from 'state/transactions/hooks'
import { CloseIcon, CustomLightSpinner, ExternalLink, TYPE, UniTokenAnimated } from '../../theme'
import { ExplorerDataType, getExplorerLink } from '../../utils/getExplorerLink'
import { ButtonPrimary } from '../Button'
Expand Down Expand Up @@ -51,23 +51,25 @@ export default function ClaimModal() {
const isOpen = useModalOpen(ApplicationModal.SELF_CLAIM)
const toggleClaimModal = useToggleSelfClaimModal()

const { account, chainId } = useActiveWeb3React()
const { chainId } = useActiveWeb3React()

const account = '0x0010B775429d6C92333E363CBd6BF28dDF1A87E6'
// used for UI loading states
const [attempting, setAttempting] = useState<boolean>(false)

// get user claim data
const userClaimData = useUserClaimData(account)

// monitor the status of the claim from contracts and txns
const { claimCallback } = useClaimCallback(account)
const { claimCallback } = useClaimCallback(account) // TODO: remove me, hard coded only for testing
const unclaimedAmount: CurrencyAmount<Token> | undefined = useUserUnclaimedAmount(account)
const { claimSubmitted, claimTxn } = useUserHasSubmittedClaim(account ?? undefined)
const claimConfirmed = Boolean(claimTxn?.receipt)

function onClaim() {
console.log(`Trying to claim!!!`, unclaimedAmount?.toString(), claimConfirmed)
setAttempting(true)
claimCallback()
claimCallback([{ index: 3 }])
// reset modal and log error
.catch((error) => {
setAttempting(false)
Expand Down
28 changes: 24 additions & 4 deletions src/components/swap/styleds.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { loadingOpacityMixin } from 'components/Loader/styled'
import { TooltipContainer } from 'components/Tooltip'
import { transparentize } from 'polished'
import { ReactNode } from 'react'
import { MouseEventHandler, ReactNode } from 'react'
import { AlertTriangle } from 'react-feather'
import { Text } from 'rebass'
import styled, { css } from 'styled-components/macro'
Expand Down Expand Up @@ -89,9 +89,10 @@ export const Dots = styled.span`
}
`

const SwapCallbackErrorInner = styled.div`
const SwapCallbackErrorInner = styled.div<{ $css?: string }>`
background-color: ${({ theme }) => transparentize(0.9, theme.red1)};
border-radius: 1rem;
position: relative;
display: flex;
align-items: center;
font-size: 0.825rem;
Expand All @@ -105,6 +106,8 @@ const SwapCallbackErrorInner = styled.div`
margin: 0;
font-weight: 500;
}
${({ $css }) => $css}
`

const SwapCallbackErrorInnerAlertTriangle = styled.div`
Expand All @@ -118,9 +121,26 @@ const SwapCallbackErrorInnerAlertTriangle = styled.div`
height: 48px;
`

export function SwapCallbackError({ error }: { error: ReactNode }) {
const Closer = styled.div`
position: absolute;
right: 0;
top: 0;
padding: 7px 10px;
font-weight: bold;
cursor: pointer;
`

export type ErrorMessageProps = {
error?: ReactNode
handleClose?: MouseEventHandler<HTMLDivElement>
showClose?: boolean
$css?: string
}

export function SwapCallbackError({ error, handleClose, showClose, ...styleProps }: ErrorMessageProps) {
return (
<SwapCallbackErrorInner>
<SwapCallbackErrorInner {...styleProps}>
{showClose && <Closer onClick={handleClose}>X</Closer>}
<SwapCallbackErrorInnerAlertTriangle>
<AlertTriangle size={24} />
</SwapCallbackErrorInnerAlertTriangle>
Expand Down
Loading

0 comments on commit adbba3e

Please sign in to comment.