Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:hop-protocol/hop into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
shanefontaine committed Jun 12, 2024
2 parents a0bcbb7 + b388ed4 commit badd6b8
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hop-protocol/frontend",
"version": "0.0.13",
"version": "0.0.15",
"description": "Hop Protocol Frontend",
"author": "Authereum Labs, Inc.",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions packages/frontend/src/pages/Rewards/Rewards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import { getChainName } from '#utils/getChainName.js'
export function Rewards() {
return (
<Box>
{configs.map((config: any, i) => {
{configs.map((config: any) => {
const chainName = getChainName(config.chainId)

return (
<RewardsWidget
key={i}
key={config.chainId}
requiredChainId={config.chainId}
rewardsContractAddress={config.rewardsContractAddress}
merkleBaseUrl={config.merkleBaseUrl}
Expand Down
6 changes: 3 additions & 3 deletions packages/frontend/src/pages/Rewards/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ if (isGoerli) {
chainId: 10,
rewardsContractAddress: '0x45269F59aA76bB491D0Fc4c26F468D8E1EE26b73',
merkleBaseUrl: getQueryParam('merkleBaseUrl') ?? 'https://raw.githubusercontent.com/hop-protocol/optimism-refund-merkle-rewards/master'
}/*, {
}, {
chainId: 42161,
rewardsContractAddress: '',
rewardsContractAddress: '0xb3c18710fE030a75A3A981a1AbAC0db984e51853',
merkleBaseUrl: 'https://raw.githubusercontent.com/hop-protocol/arbitrum-refund-merkle-rewards/master'
}*/]
}]
}

export { configs }
8 changes: 7 additions & 1 deletion packages/frontend/src/pages/Rewards/useRewards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { BigNumber, Contract, utils } from 'ethers'
import { DateTime } from 'luxon'
import { ShardedMerkleTree } from './merkle'
import { ERC20__factory } from '@hop-protocol/sdk/contracts'
import { ChainSlug } from '@hop-protocol/sdk'
import { findNetworkBySlug, networkIdToSlug } from '#utils/networks.js'
import { formatError } from '#utils/format.js'
import { getProviderByNetworkName } from '#utils/getProvider.js'
Expand Down Expand Up @@ -391,7 +392,12 @@ export const useRewards = (props: Props) => {
}

const hasRewards = !!(address && claimableAmount?.gt(0))
let txHistoryLink = `https://${isGoerli ? 'goerli.explorer' : 'explorer'}.hop.exchange/?startDate=2022-09-23`
// TODO: read from api
let startDate = '2022-09-23' // OP
if (chainSlug === ChainSlug.Arbitrum) {
startDate = '2024-06-12' // ARB
}
let txHistoryLink = `https://${isGoerli ? 'goerli.explorer' : 'explorer'}.hop.exchange/?startDate=${startDate}`
if (address) {
txHistoryLink += `&account=${address}`
}
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/Send/useSend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ export function useSend(): SendResponseProps {
toTokenAmount,
])

const showFeeRefund = feeRefundEnabled && [ChainSlug.Optimism].includes(toNetwork?.slug as ChainSlug) && !!feeRefund && !!feeRefundUsd && !!feeRefundTokenSymbol
const showFeeRefund = feeRefundEnabled && [ChainSlug.Optimism, ChainSlug.Arbitrum].includes(toNetwork?.slug as ChainSlug) && !!feeRefund && !!feeRefundUsd && !!feeRefundTokenSymbol
const feeRefundDisplay = feeRefund && feeRefundUsd && feeRefundTokenSymbol ? `${feeRefund} ($${feeRefundUsd})` : ''
const maxButtonFixedAmountToSubtract = fromToken?.symbol === 'ETH' ? relayFeeEth : BigNumber.from(0)

Expand Down
1 change: 1 addition & 0 deletions packages/v2-explorer-frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
.env.development.local
.env.test.local
.env.production.local
*.env

npm-debug.log*
yarn-debug.log*
Expand Down
1 change: 1 addition & 0 deletions packages/v2-sdk-demo/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
dist
*.tsbuildinfo
*.env
1 change: 1 addition & 0 deletions packages/v2-sdk/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
dist
*.tsbuildinfo
*.env

0 comments on commit badd6b8

Please sign in to comment.