Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy staging to production #141

Merged
merged 4 commits into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@pooltogether/v4-twab-delegator-js": "0.2.2",
"@pooltogether/v4-utils-js": "0.1.5",
"@pooltogether/wallet-connection": "1.0.3",
"@rainbow-me/rainbowkit": "^0.12.14",
"@rainbow-me/rainbowkit": "0.12.15",
"@reach/dialog": "^0.15.3",
"@reach/menu-button": "^0.15.3",
"@reach/tooltip": "^0.15.3",
Expand Down Expand Up @@ -108,6 +108,6 @@
"react-tooltip": "^4.2.21",
"tailwindcss": "^2.2.19",
"typescript": "4",
"wagmi": "^0.12.13"
"wagmi": "0.12.17"
}
}
8 changes: 4 additions & 4 deletions src/components/Input/TxButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { getNetworkNiceNameByChainId } from '@pooltogether/utilities'
import {
TransactionState,
TransactionStatus,
useConnectWallet,
useIsWalletConnected,
useIsWalletOnChainId
} from '@pooltogether/wallet-connection'
import { useConnectModal } from '@rainbow-me/rainbowkit'
import { useTranslation } from 'next-i18next'
import React, { useMemo } from 'react'
import { useSwitchNetwork } from 'wagmi'
Expand Down Expand Up @@ -36,7 +36,7 @@ export const TxButton = (props: TxButtonProps) => {
...buttonProps
} = props
const isWalletConnected = useIsWalletConnected()
const connectWallet = useConnectWallet()
const { openConnectModal } = useConnectModal()
const { switchNetwork } = useSwitchNetwork()

const { t } = useTranslation()
Expand All @@ -53,7 +53,7 @@ export const TxButton = (props: TxButtonProps) => {
if (!!_connectWallet) {
return [t('connectWallet'), _connectWallet, 'button']
}
return [t('connectWallet'), connectWallet, 'button']
return [t('connectWallet'), openConnectModal, 'button']
} else if (status === TransactionStatus.pendingUserConfirmation) {
return [t('confirmInWallet'), () => null, 'button']
} else if (status === TransactionStatus.pendingBlockchainConfirmation) {
Expand All @@ -69,7 +69,7 @@ export const TxButton = (props: TxButtonProps) => {
isWalletOnProperNetwork,
_connectWallet,
t,
connectWallet,
openConnectModal,
networkName,
switchNetwork,
chainId,
Expand Down
5 changes: 4 additions & 1 deletion src/components/Modal/DepositModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
PrizePool
} from '@pooltogether/v4-client-js'
import { useTransaction } from '@pooltogether/wallet-connection'
import { useConnectModal } from '@rainbow-me/rainbowkit'
import { ApprovalType } from '@views/Deposit/DepositTrigger/DepositModal'
import { RSV } from 'eth-permit/dist/rpc'
import { useCallback, useEffect, useState } from 'react'
Expand Down Expand Up @@ -99,6 +100,8 @@ export const DepositModal: React.FC<{
setSelectedViewId(ViewIds.deposit)
}

const { openConnectModal } = useConnectModal()

return (
<BottomSheetWithViewState
snapPoints={snapToFull}
Expand Down Expand Up @@ -131,7 +134,7 @@ export const DepositModal: React.FC<{
// reviewView
sendDepositTransaction={sendDepositTransaction}
clearDepositTransaction={() => setDepositTransactionId('')}
connectWallet={() => setSelectedViewId(ViewIds.walletConnection)}
connectWallet={openConnectModal}
approvalType={approvalType}
setApprovalType={setApprovalType}
eip2612DepositPermit={eip2612DepositPermit}
Expand Down
8 changes: 6 additions & 2 deletions src/constants/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ export const BRIDGE_URLS = Object.freeze({
{ url: 'https://app.optimism.io/bridge', title: 'Optimism bridge' },
{ url: 'https://wallet.polygon.technology/bridge', title: 'Polygon bridge' },
{ url: 'https://bridge.avax.network/', title: 'Avalanche bridge' },
{ url: 'https://bridge.arbitrum.io/', title: 'Arbitrum bridge' }
{ url: 'https://bridge.arbitrum.io/', title: 'Arbitrum bridge' },
{ url: 'https://across.to/bridge', title: 'Across bridge' }
// { url: 'https://zapper.fi/bridge', title: 'Zapper' },
// { url: 'https://app.hop.exchange/send?token=USDC', title: 'Hop Protocol' }
],
Expand All @@ -214,7 +215,10 @@ export const BRIDGE_URLS = Object.freeze({
// { url: 'https://app.hop.exchange/send?token=USDC', title: 'Hop Protocol' }
],
[CHAIN_ID.avalanche]: [{ url: 'https://bridge.avax.network/', title: 'Avalanche bridge' }],
[CHAIN_ID.optimism]: [{ url: 'https://app.optimism.io/bridge', title: 'Optimism bridge' }],
[CHAIN_ID.optimism]: [
{ url: 'https://app.optimism.io/bridge', title: 'Optimism bridge' },
{ url: 'https://across.to/bridge', title: 'Across bridge' }
],
[CHAIN_ID.arbitrum]: [{ url: 'https://bridge.arbitrum.io/', title: 'Arbitrum bridge' }]
})

Expand Down
4 changes: 2 additions & 2 deletions src/views/Account/Rewards/RewardsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -709,14 +709,14 @@ const ClaimModalReceipt = (props: {
<TwitterIntentButton
url='https://app.pooltogether.com?utm_campaign=in-app-share&utm_source=app&utm_medium=twitter&utm_content=rewards-claim'
text={t('rewardsTweet', {
amountClaimed: `$${numberWithCommas(cachedClaimableUsd, { precision: 0 })}`
amountClaimed: `$${numberWithCommas(cachedClaimableUsd, { precision: 2 })}`
})}
hashTags={['PoolTogether']}
/>
<LensterPostButton
url='https://app.pooltogether.com?utm_campaign=in-app-share&utm_source=app&utm_medium=lenster&utm_content=rewards-claim'
text={t('rewardsLensPost', {
amountClaimed: `$${numberWithCommas(cachedClaimableUsd, { precision: 0 })}`
amountClaimed: `$${numberWithCommas(cachedClaimableUsd, { precision: 2 })}`
})}
hashTags={['PoolTogether']}
/>
Expand Down
4 changes: 0 additions & 4 deletions src/views/Account/V3DepositList/PrizePoolDepositView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import {
Transaction,
TransactionState,
TransactionStatus,
useConnectWallet,
useIsWalletConnected,
useTransaction,
useUsersAddress
} from '@pooltogether/wallet-connection'
Expand Down Expand Up @@ -162,8 +160,6 @@ const DepositFormView = (props: DepositFormViewProps) => {
const { chainId, ticket, token, amountToDeposit, form, depositTx, setReviewDepositView } = props

const { t } = useTranslation()
const connectWallet = useConnectWallet()
const isWalletConnected = useIsWalletConnected()

const {
handleSubmit,
Expand Down
5 changes: 4 additions & 1 deletion src/views/Deposit/DepositTrigger/DepositModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
PrizePool
} from '@pooltogether/v4-client-js'
import { useTransaction } from '@pooltogether/wallet-connection'
import { useConnectModal } from '@rainbow-me/rainbowkit'
import { RSV } from 'eth-permit/dist/rpc'
import { useRouter } from 'next/router'
import { useTranslation } from 'next-i18next'
Expand Down Expand Up @@ -83,6 +84,8 @@ export const DepositModal: React.FC<{

const { t } = useTranslation()

const { openConnectModal } = useConnectModal()

const views: ModalWithViewStateView[] = [
{
id: ViewIds.explore,
Expand Down Expand Up @@ -156,7 +159,7 @@ export const DepositModal: React.FC<{
// reviewView
sendDepositTransaction={sendDepositTransaction}
clearDepositTransaction={() => setDepositTransactionId('')}
connectWallet={() => setSelectedViewId(ViewIds.walletConnection)}
connectWallet={openConnectModal}
approvalType={approvalType}
setApprovalType={setApprovalType}
eip2612DepositPermit={eip2612DepositPermit}
Expand Down
4 changes: 2 additions & 2 deletions src/views/Prizes/MultiDrawsCard/PrizeClaimSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,14 @@ export const PrizeClaimSheet = (props: PrizeClaimSheetProps) => {
<TwitterIntentButton
url='https://app.pooltogether.com?utm_campaign=in-app-share&utm_source=app&utm_medium=twitter&utm_content=prize-claim'
text={t('prizesTweet', {
amountClaimed: `$${numberWithCommas(claimAmountTwitter, { precision: 0 })}`
amountClaimed: `$${numberWithCommas(claimAmountTwitter, { precision: 2 })}`
})}
hashTags={['PoolTogether']}
/>
<LensterPostButton
url='https://app.pooltogether.com?utm_campaign=in-app-share&utm_source=app&utm_medium=lenster&utm_content=prize-claim'
text={t('prizesLensPost', {
amountClaimed: `$${numberWithCommas(claimAmountTwitter, { precision: 0 })}`
amountClaimed: `$${numberWithCommas(claimAmountTwitter, { precision: 2 })}`
})}
hashTags={['PoolTogether']}
/>
Expand Down
Loading
Loading