diff --git a/cypress/e2e/happypath/sendfunds_relay.cy.js b/cypress/e2e/happypath/sendfunds_relay.cy.js index 6888f03fed..8e6f96800a 100644 --- a/cypress/e2e/happypath/sendfunds_relay.cy.js +++ b/cypress/e2e/happypath/sendfunds_relay.cy.js @@ -45,7 +45,7 @@ function visit(url) { cy.visit(url) } -// TODO: Relay only allows 5 txs per hour. +// TODO: Relay only allows 5 txs per day. describe('Send funds with relay happy path tests', { defaultCommandTimeout: 300000 }, () => { before(async () => { cy.clearLocalStorage().then(() => { diff --git a/cypress/e2e/pages/create_tx.pages.js b/cypress/e2e/pages/create_tx.pages.js index 315211344b..37361e213c 100644 --- a/cypress/e2e/pages/create_tx.pages.js +++ b/cypress/e2e/pages/create_tx.pages.js @@ -47,7 +47,7 @@ const viewTransactionBtn = 'View transaction' const transactionDetailsTitle = 'Transaction details' const QueueLabel = 'needs to be executed first' const TransactionSummary = 'Send ' -const transactionsPerHrStr = 'free transactions left this hour' +const transactionsPerHrStr = 'free transactions left today' const maxAmountBtnStr = 'Max' const nextBtnStr = 'Next' diff --git a/src/components/tx/RemainingRelays/index.tsx b/src/components/tx/RemainingRelays/index.tsx index d349b0cd0b..41a3b60b05 100644 --- a/src/components/tx/RemainingRelays/index.tsx +++ b/src/components/tx/RemainingRelays/index.tsx @@ -1,18 +1,18 @@ import { SvgIcon, Tooltip, Typography } from '@mui/material' import InfoIcon from '@/public/images/notifications/info.svg' -import { MAX_HOUR_RELAYS } from '@/hooks/useRemainingRelays' +import { MAX_DAY_RELAYS } from '@/hooks/useRemainingRelays' import css from '../BalanceInfo/styles.module.css' import type { RelayCountResponse } from '@safe-global/safe-gateway-typescript-sdk' const RemainingRelays = ({ relays, tooltip }: { relays?: RelayCountResponse; tooltip?: string }) => { if (!tooltip) { - tooltip = `${relays?.limit ?? MAX_HOUR_RELAYS} transactions per hour for free` + tooltip = `${relays?.limit ?? MAX_DAY_RELAYS} transactions per day for free` } return (
- {relays?.remaining ?? MAX_HOUR_RELAYS} free transactions left this hour + {relays?.remaining ?? MAX_DAY_RELAYS} free transactions left today diff --git a/src/hooks/useRemainingRelays.ts b/src/hooks/useRemainingRelays.ts index 9903453847..6f6642c8b9 100644 --- a/src/hooks/useRemainingRelays.ts +++ b/src/hooks/useRemainingRelays.ts @@ -4,7 +4,7 @@ import { FEATURES, hasFeature } from '@/utils/chains' import { useCurrentChain } from '@/hooks/useChains' import { getRelayCount } from '@safe-global/safe-gateway-typescript-sdk' -export const MAX_HOUR_RELAYS = 5 +export const MAX_DAY_RELAYS = 5 export const useRelaysBySafe = (txOrigin?: string) => { const chain = useCurrentChain() @@ -35,7 +35,7 @@ export const useLeastRemainingRelays = (ownerAddresses: string[]) => { return result.find((r) => r.remaining === min) }) .catch(() => { - return { remaining: 0, limit: MAX_HOUR_RELAYS } + return { remaining: 0, limit: MAX_DAY_RELAYS } }) // eslint-disable-next-line react-hooks/exhaustive-deps }, [chain, ownerAddresses, safe.txHistoryTag]) diff --git a/src/services/exceptions/ErrorCodes.ts b/src/services/exceptions/ErrorCodes.ts index b2b380d7db..59f1dbb7c7 100644 --- a/src/services/exceptions/ErrorCodes.ts +++ b/src/services/exceptions/ErrorCodes.ts @@ -38,7 +38,7 @@ enum ErrorCodes { _616 = '616: Failed to retrieve recommended nonce', _619 = '619: Error fetching data from master-copies', _620 = '620: Error loading chains', - _630 = '630: Error fetching remaining hourly relays', + _630 = '630: Error fetching remaining daily relays', _631 = '631: Transaction failed to be relayed', _632 = '632: Error fetching relay task status', _633 = '633: Notification (un-)registration failed',