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

feat: add multiple rpcs #578

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions source/assets/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@
"trezorSiteWarning": "trezor.io has a rate limit for simultaneous requests, so we can't use it for now",
"symbol": "Symbol",
"youCanEdit": "You can edit this later if you need on network settings menu.",
"youCanAddMultipleRpcs": "You can add fallback RPCS using comma or semi-colon in the URL field.",
"accountLabelEditedSuccessfully": "Account label edited successfully!'",
"editAccount": "EDIT ACCOUNT",
"accountLabel": "Account Label",
Expand Down
1 change: 1 addition & 0 deletions source/assets/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@
"trezorSiteWarning": "trezor.io tiene un límite de tasa para solicitudes simultáneas, por lo que no podemos usarlo por ahora.",
"symbol": "Símbolo",
"youCanEdit": "Puedes editar esto más tarde si es necesario en el menú de configuración de la red.",
"youCanAddMultipleRpcs": "Puedes agregar RPCs de respaldo usando coma o punto y coma en el campo de URL.",
"accountLabelEditedSuccessfully": "¡La etiqueta de la cuenta se editó con éxito!",
"editAccount": "EDITAR CUENTA",
"accountLabel": "Etiqueta de la cuenta",
Expand Down
1 change: 1 addition & 0 deletions source/assets/locales/pt-br.json
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@
"trezorSiteWarning": "trezor.io has a rate limit for simultaneous requests, so we can't use it for now",
"symbol": "Symbol",
"youCanEdit": "You can edit this later if you need on network settings menu.",
"youCanAddMultipleRpcs": "You can add fallback RPCS using comma or semi-colon in the URL field.",
"accountLabelEditedSuccessfully": "Account label edited successfully!'",
"editAccount": "EDIT ACCOUNT",
"accountLabel": "Account Label",
Expand Down
8 changes: 4 additions & 4 deletions source/pages/Home/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const Home = () => {

//* Selectors
const { asset: fiatAsset, price: fiatPrice } = useSelector(
(state: RootState) => state.price.fiat
(priceState: RootState) => priceState.price.fiat
);
const isWalletImported = state?.isWalletImported;
const {
Expand All @@ -41,7 +41,7 @@ export const Home = () => {
isBitcoinBased,
lastLogin,
isLoadingBalances,
} = useSelector((state: RootState) => state.vault);
} = useSelector((vaultState: RootState) => vaultState.vault);

//* States
const [isTestnet, setIsTestnet] = useState(false);
Expand Down Expand Up @@ -105,7 +105,7 @@ export const Home = () => {
actualBalance,
]);

const formatFiatAmmount = useMemo(() => {
const formatFiatAmount = useMemo(() => {
if (isTestnet) {
return null;
}
Expand Down Expand Up @@ -148,7 +148,7 @@ export const Home = () => {
</p>
</div>

<p id="fiat-ammount">{formatFiatAmmount}</p>
<p id="fiat-amount">{formatFiatAmount}</p>
</div>

<div className="flex items-center justify-center pt-8 w-3/4 max-w-md">
Expand Down
8 changes: 4 additions & 4 deletions source/pages/Send/Approve.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const ApproveTransactionComponent = () => {
const { navigate, alert, useCopyClipboard } = useUtils();

const [copied, copy] = useCopyClipboard();
const [isReconectModalOpen, setIsReconectModalOpen] =
const [isReconnectModalOpen, setIsReconnectModalOpen] =
useState<boolean>(false);

const [tx, setTx] = useState<ITxState>();
Expand Down Expand Up @@ -207,7 +207,7 @@ export const ApproveTransactionComponent = () => {
return;
}
if (activeAccount.isLedgerWallet && isNecessaryReconnect) {
setIsReconectModalOpen(true);
setIsReconnectModalOpen(true);
setLoading(false);
return;
}
Expand Down Expand Up @@ -333,12 +333,12 @@ export const ApproveTransactionComponent = () => {
}}
/>
<DefaultModal
show={isReconectModalOpen}
show={isReconnectModalOpen}
title={t('settings.ledgerReconnection')}
buttonText={t('buttons.reconnect')}
description={t('settings.ledgerReconnectionMessage')}
onClose={() => {
setIsReconectModalOpen(false);
setIsReconnectModalOpen(false);
window.open(`${url}?isReconnect=true`, '_blank');
}}
/>
Expand Down